Browse Source

存货查询SQL BUG

contract
15989082884@163.com 2 years ago
parent
commit
4a5370b0d6
  1. 2
      src/main/resources/mapper/goods/GoodsSpuMapper.xml

2
src/main/resources/mapper/goods/GoodsSpuMapper.xml

@ -83,7 +83,7 @@
<if test="query.delFlag != null and query.delFlag != ''"> and `goods_spu`.`del_flag` = #{query.delFlag}</if> <if test="query.delFlag != null and query.delFlag != ''"> and `goods_spu`.`del_flag` = #{query.delFlag}</if>
<if test="query.searchValue != null and query.searchValue != ''"> and (`goods_spu`.`name` like concat('%',#{query.searchValue},'%') or `goods_spu`.`goods_spu` like concat('%',#{query.searchValue},'%')) </if> <if test="query.searchValue != null and query.searchValue != ''"> and (`goods_spu`.`name` like concat('%',#{query.searchValue},'%') or `goods_spu`.`goods_spu` like concat('%',#{query.searchValue},'%')) </if>
<if test="query.selectIds!=null and query.selectIds.size > 0"> <if test="query.selectIds!=null and query.selectIds.size > 0">
and `goods_spu`.`id` and `goods_spu`.`id` in
<foreach collection="query.selectIds" item ="selectId" index="i" open="(" close=")" separator=","> <foreach collection="query.selectIds" item ="selectId" index="i" open="(" close=")" separator=",">
#{selectId} #{selectId}
</foreach> </foreach>

Loading…
Cancel
Save