Browse Source

opt: 下单查询参数拓展

muti_db
Yen 12 months ago
parent
commit
3a9be1da7b
  1. 1
      src/main/java/com/qs/serve/modules/goods/entity/so/GoodsImminentBatchQuery.java
  2. 5
      src/main/resources/mapper/goods/GoodsImminentBatchMapper.xml
  3. 3
      src/main/resources/mapper/goods/GoodsSpuMapper.xml

1
src/main/java/com/qs/serve/modules/goods/entity/so/GoodsImminentBatchQuery.java

@ -22,6 +22,7 @@ public class GoodsImminentBatchQuery {
/** 供应商编码 */
private String supplierCode;
private String spuCodeOrName;
/** 选中的商品规则 */
private String searchCateRuleId;

5
src/main/resources/mapper/goods/GoodsImminentBatchMapper.xml

@ -136,7 +136,10 @@
<sql id="spuWherePart">
<if test="query.spuName != null and query.spuName != ''"> and `goods_spu`.`name` like concat('%',#{query.spuName},'%') </if>
<if test="query.skuCode != null and query.skuCode != ''"> and `goods_spu`.`goods_spu` like concat('%',#{query.skuCode},'%') </if>
<if test="query.spuCodeOrName != null and query.spuCodeOrName != ''">
and (`goods_spu`.`name` like concat('%',#{query.spuCodeOrName},'%') or `goods_spu`.`spu_code` like concat('%',#{query.spuCodeOrName},'%'))
</if>
<if test="query.spuCode != null and query.spuCode != ''"> and `goods_spu`.`spu_code` like concat('%',#{query.spuCode},'%') </if>
<if test="query.bookCodeList!=null and query.bookCodeList.size > 0">
and `goods_spu`.`book_belong` in
<foreach collection="query.bookCodeList" item ="selectId" index="i" open="(" close=")" separator=",">

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

@ -159,6 +159,9 @@
and `goods_spu`.`del_flag` = 0
<if test="query.id != null"> and `goods_spu`.`id` = #{query.id}</if>
<if test="query.spuCode != null and query.spuCode != ''"> and `goods_spu`.`spu_code` like concat('%', #{query.spuCode},'%')</if>
<if test="query.spuCodeOrName != null and query.spuCodeOrName != ''">
and (`goods_spu`.`spu_code` like concat('%', #{query.spuCodeOrName},'%') or `goods_spu`.`spu_code` like concat('%', #{query.spuCodeOrName},'%') )
</if>
<if test="query.name != null and query.name != ''"> and `goods_spu`.`name` like concat('%', #{query.name},'%') </if>
<if test="query.categoryFirst != null"> and `goods_spu`.`category_first` = #{query.categoryFirst}</if>
<if test="query.categorySecond != null"> and `goods_spu`.`category_second` = #{query.categorySecond}</if>

Loading…
Cancel
Save