原来的代码如下:
<select id="findByGoodsUid" resultType="com.pisen.cloud.luna.ms.goods.base.domain.GoodsConfigQuery" parameterType="java.util.List">
SELECT * FROM goods_config_query
WHERE goods_uid IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</select>
应该指定查询出来的字段分别对应到实体中的各个字段,解决代码如下:
<select id="findByGoodsUid" resultType="com.pisen.cloud.luna.ms.goods.base.domain.GoodsConfigQuery" parameterType="java.util.List">
SELECT
goods_uid goodsUid,
tenement_id tenementId,
inner_frist innerFrist,
inner_normal innerNormal,
inner_danger innerDanger
FROM goods_config_query
WHERE goods_uid IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</select>