ソースを参照

总后台--商品管理新增归属小程序功能

cgp 1 日 前
コミット
b4ec41b593

+ 7 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -318,4 +318,11 @@ public class FsStoreProductScrm extends BaseEntity
      */
     private Integer isGift;
 
+    /** 所属小程序app_id,多个用逗号隔开 */
+    @Excel(name = "所属小程序app_id")
+    private String appIds;
+
+    @TableField(exist = false)
+    private String appId;
+
 }

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -147,6 +147,9 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.isGift != null'> " +
             "and p.is_gift =#{maps.isGift} " +
             "</if>" +
+            "<if test = 'maps.appId != null and maps.appId != \" \" '> " +
+            " and ((FIND_IN_SET(#{maps.appId}, p.app_ids) > 0)) " +
+            "</if>"+
             " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps") FsStoreProductScrm fsStoreProduct);

+ 6 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java

@@ -269,4 +269,10 @@ public class FsStoreProductAddEditParam implements Serializable
     //erp类型 1-聚水潭 2-兔灵
     private Integer erpType;
     private Integer isGift;
+
+    /** 所属小程序app_id,多个用逗号隔开 */
+    @Excel(name = "所属小程序app_id")
+    private String appIds;
+
+    private String appId;
 }

+ 6 - 3
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -70,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="storeId" column="store_id"/>
         <result property="erpType" column="erp_type"/>
         <result property="isGift" column="is_gift"/>
+        <result property="appIds" column="app_ids"/>
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
@@ -80,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,
                is_display,tui_cate_id,company_ids,is_drug,drug_image,drug_reg_cert_no,common_name,dosage_form,
                unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,dosage,
-               adverse_reactions,contraindications,precautions,is_audit,store_id,erp_type,is_gift
+               adverse_reactions,contraindications,precautions,is_audit,store_id,erp_type,is_gift,app_ids
                from fs_store_product_scrm
     </sql>
 
@@ -92,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                p.integral, p.product_type, p.prescribe_code, p.prescribe_spec, p.prescribe_factory, p.prescribe_name,
                p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
                p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
-               p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.erp_type,p.is_gift
+               p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.erp_type,p.is_gift,p.app_ids
         from fs_store_product_scrm p
     </sql>
 
@@ -258,6 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="storeId != null and storeId != ''">store_id ,</if>
             <if test="erpType != null and erpType != ''">erp_type ,</if>
             <if test="isGift != null ">is_gift,</if>
+            <if test="appIds != null and appIds != '' ">app_ids,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -324,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="storeId != null and storeId != ''">#{storeId} ,</if>
             <if test="erpType != null and storeId != ''">#{erpType} ,</if>
             <if test="isGift != null ">#{isGift},</if>
+            <if test="appIds != null and appIds != '' ">#{appIds},</if>
          </trim>
     </insert>
 
@@ -394,7 +397,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="storeId != null and storeId != ''">store_id = #{storeId} ,</if>
             <if test="erpType != null and erpType != ''">erp_type = #{erpType} ,</if>
             <if test="isGift != null">is_gift = #{isGift} ,</if>
-
+            <if test="appIds != null and appIds != ''">app_ids = #{appIds} ,</if>
         </trim>
         where product_id = #{productId}
     </update>