瀏覽代碼

导出的筛选条件

yuhongqi 2 周之前
父節點
當前提交
b51d3336b8
共有 1 個文件被更改,包括 25 次插入1 次删除
  1. 25 1
      fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductMapper.java

+ 25 - 1
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductMapper.java

@@ -208,7 +208,31 @@ public interface FsStoreProductMapper
             " p.create_time,p.update_time,p.is_postage,p.is_del,p.give_integral, p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral," +
             " p.product_type,p.prescribe_code,p.prescribe_spec,p.prescribe_factory,p.prescribe_name,ave.sku,ave.stock,ave.price,ave.bar_code,ave.group_bar_code,ave.weight,ave.volume," +
             "ave.brokerage,ave.brokerage_two,ave.brokerage_three,ave.agent_price,p.warehouse_id,p.warehouse_code  FROM fs_store_product p " +
-            "  LEFT JOIN fs_store_product_attr_value ave on p.product_id=ave.product_id WHERE  p.product_id is not null " +
+            "  LEFT JOIN fs_store_product_attr_value ave on p.product_id=ave.product_id " +
+            "  LEFT JOIN fs_store_product_category pc on p.cate_id=pc.cate_id " +
+            " WHERE p.product_id is not null " +
+            "<if test = 'maps.productName != null and maps.productName !=\"\"'> " +
+            "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
+            "</if>" +
+            "<if test = 'maps.barCode != null and maps.barCode !=\"\"'> " +
+            "and ave.bar_code like CONCAT('%',#{maps.barCode},'%') " +
+            "</if>" +
+            "<if test = 'maps.cateId != null'> " +
+            "and (pc.cate_id =#{maps.cateId} or pc.pid=#{maps.cateId}) " +
+            "</if>" +
+            "<if test = 'maps.productType != null'> " +
+            "and p.product_type =#{maps.productType} " +
+            "</if>" +
+            "<if test = 'maps.isShow != null'> " +
+            "and p.is_show =#{maps.isShow} " +
+            "</if>" +
+            "<if test = 'maps.warehouseId != null'> " +
+            "and p.warehouse_id =#{maps.warehouseId} " +
+            "</if>" +
+            "<if test = 'maps.warehouseCode != null and maps.warehouseCode != \"\"'> " +
+            "and p.warehouse_code =#{maps.warehouseCode} " +
+            "</if>" +
+            " order by p.product_id desc " +
             "</script>"})
     List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps")FsStoreProduct fsStoreProduct);