فهرست منبع

医健宝:优化通过店铺选中对应的药品

liupeng 1 هفته پیش
والد
کامیت
7954dd1614

+ 5 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductAttrValueScrmMapper.java

@@ -85,7 +85,7 @@ public interface FsStoreProductAttrValueScrmMapper
     int incProductAttrStock(@Param("num")Long num,@Param("productId") Long productId,@Param("productAttrValueId") Long productAttrValueId);
     @Select({"<script> " +
             "select v.*,p.product_name,p.product_type,c.cate_name  from fs_store_product_attr_value_scrm v inner join fs_store_product_scrm p on p.product_id=v.product_id left join fs_store_product_category_scrm c on c.cate_id=p.cate_id   " +
-            "where 1=1 and v.bar_code is not null " +
+            "where 1=1 and v.bar_code is not null and  p.is_show=1" +
             "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
             "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
             "</if>" +
@@ -104,6 +104,10 @@ public interface FsStoreProductAttrValueScrmMapper
             "and find_in_set(#{maps.companyId},p.company_ids)  " +
             "</if>" +
 
+            "<if test = 'maps.storeId != null    '> " +
+            "and p.store_id = #{maps.storeId}  " +
+            "</if>" +
+
             " order by v.id desc "+
             "</script>"})
     List<FsStoreProductAttrValueVO> selectFsStoreProductAttrValueListVO(@Param("maps")FsProductAttrValueParam param);

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsProductAttrValueParam.java

@@ -13,4 +13,5 @@ public class FsProductAttrValueParam implements Serializable
     private Integer isShow;
     Integer tuiCateId;
     private Long companyId;
+    private Long storeId;
 }