소스 검색

商城小程序修改 绑定appid部分代码

xgb 2 주 전
부모
커밋
685dccc854

+ 2 - 0
fs-service/src/main/java/com/fs/common/param/BaseQueryParam.java

@@ -18,5 +18,7 @@ public class BaseQueryParam extends BaseEntity implements Serializable {
     private Integer limit;
     @ApiModelProperty(value = "搜索字符串")
     private String keyword;
+    @ApiModelProperty(value = "当前的appid")
+    private String appId;
 
 }

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsMenuScrm.java

@@ -33,5 +33,7 @@ public class FsMenuScrm extends BaseEntity
 
     private Integer menuType;//菜单类型
 
+    private String appIds;
+
 
 }

+ 25 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductCategoryScrm.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 
@@ -40,6 +41,13 @@ public class FsStoreProductCategoryScrm extends BaseEntity
     @Excel(name = "删除状态")
     private Integer isDel;
 
+    private String appIds;
+
+    /**
+     * 根据appId来区分分类时
+     */
+    @TableField(exist = false)
+    private String appId;
     public Long getStoreId() {
         return storeId;
     }
@@ -51,6 +59,23 @@ public class FsStoreProductCategoryScrm extends BaseEntity
     @Excel(name = "关联店铺id(没有关联则为默认店铺)")
     private Long storeId;
 
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppIds() {
+        return appIds;
+    }
+
+    public void setAppIds(String appIds) {
+        this.appIds = appIds;
+    }
+
     public void setCateId(Long cateId)
     {
         this.cateId = cateId;

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

@@ -310,4 +310,12 @@ public class FsStoreProductScrm extends BaseEntity
     @Excel(name = "是否药品")
     private String isDrug;
 
+    @TableField(exist = false)
+    private String appId;
+
+    /** 所属小程序app_id,多个用逗号隔开 */
+    @Excel(name = "所属小程序app_id")
+    private String appIds;
+
+
 }

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

@@ -79,6 +79,9 @@ public interface FsStoreProductCategoryScrmMapper
             "<if test = 'maps.storeId != null    '> " +
             "and c.store_id =#{maps.storeId} " +
             "</if>" +
+            "<if test = 'maps.appId != null and maps.appId != \" \" '> " +
+            " and ((FIND_IN_SET(#{maps.appId}, c.app_ids) > 0)) " +
+            "</if>"+
             " order by c.sort asc "+
             "</script>"})
     List<FsStoreProductCategoryScrm> selectFsStoreProductCategoryListQuery(@Param("maps") FsStoreProductCategoryScrm param);

+ 12 - 5
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -2,6 +2,7 @@ package com.fs.hisStore.mapper;
 
 import java.util.List;
 
+import com.fs.common.param.BaseQueryParam;
 import com.fs.his.param.FsStoreProductListSParam;
 import com.fs.his.vo.FsStoreProductListSVO;
 import com.fs.his.vo.OptionsVO;
@@ -142,6 +143,9 @@ public interface FsStoreProductScrmMapper
             " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
             "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
             " </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);
@@ -192,6 +196,9 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.cateId != null    '> " +
             "and p.cate_id =#{maps.cateId}  " +
             "</if>" +
+            "<if test = 'maps.appId != null and maps.appId != \" \" '> " +
+            " and ((FIND_IN_SET(#{maps.appId}, p.app_ids) > 0)) " +
+            "</if>"+
             "<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\"  '> " +
             "order by p.sort desc " +
             "</if>" +
@@ -248,7 +255,7 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and  p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}"+
             "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config);
+    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config,@Param("appId") String appId);
     @Select({"<script> " +"select p.* from fs_store_product_scrm p " +
             //新增审核状态及所属店铺审核状态
             "<if test='config.isAudit == \"1\" '>" +
@@ -260,7 +267,7 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and  p.is_hot=1 and p.is_display=1 order by p.sort desc limit #{count}"+
             "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config);
+    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config,@Param("appId") String appId);
     @Select({"<script> " +"select p.* from fs_store_product_scrm p " +
             //新增审核状态及所属店铺审核状态
             "<if test='config.isAudit == \"1\" '>" +
@@ -272,8 +279,8 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and  p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}"+
             "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config);
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config);
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config, @Param("param") BaseQueryParam param);
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config, @Param("param") BaseQueryParam param);
     @Select({"<script> " +
             "select p.* from fs_store_product_scrm p " +
             //新增审核状态及所属店铺审核状态
@@ -286,7 +293,7 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and  p.is_good=1 and p.is_display=1 order by p.sort desc"+
             "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig  config);
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig  config, @Param("param") BaseQueryParam param);
     @Select({"<script> " +
             "select count(1) from fs_store_product_scrm  " +
             "where 1=1 " +

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

@@ -267,4 +267,6 @@ public class FsStoreProductAddEditParam implements Serializable
         // 指定企业
     private String companyIds;
 
+    /** 所属小程序app_id,多个用逗号隔开 */
+    private String appIds;
 }

+ 6 - 5
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreProductScrmService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.fs.common.core.domain.R;
+import com.fs.common.param.BaseQueryParam;
 import com.fs.hisStore.domain.FsStoreProductScrm;
 import com.fs.hisStore.domain.FsStoreProductRuleScrm;
 import com.fs.his.param.FsStoreProductListSParam;
@@ -96,15 +97,15 @@ public interface IFsStoreProductScrmService
     void incProductStock(Long num, Long productId, Long productAttrValueId);
 
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count);
+    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count,String appId);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
+    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count,String appId);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count, BaseQueryParam param);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(BaseQueryParam param);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(BaseQueryParam param);
 
     Long selectFsStoreProductCount(int type);
     Long selectFsStoreProductCount(int type,Long companyId);

+ 11 - 10
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -15,6 +15,7 @@ import com.fs.common.BeanCopyUtils;
 import com.fs.common.core.domain.R;
 import com.fs.common.exception.CustomException;
 import com.fs.common.exception.ServiceException;
+import com.fs.common.param.BaseQueryParam;
 import com.fs.common.utils.DateUtils;
 import com.fs.company.cache.ICompanyCacheService;
 import com.fs.erp.domain.ErpGoods;
@@ -690,28 +691,28 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductNewQuery(count,medicalMallConfig);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count,String appId) {
+        return fsStoreProductMapper.selectFsStoreProductNewQuery(count,medicalMallConfig,appId);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductHotQuery(count,medicalMallConfig);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count,String appId) {
+        return fsStoreProductMapper.selectFsStoreProductHotQuery(count,medicalMallConfig,appId);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductGoodQuery(count,medicalMallConfig);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count, BaseQueryParam param) {
+        return fsStoreProductMapper.selectFsStoreProductGoodQuery(count,medicalMallConfig,param);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery() {
-        return fsStoreProductMapper.selectFsStoreProductTuiListQuery(medicalMallConfig);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(BaseQueryParam param) {
+        return fsStoreProductMapper.selectFsStoreProductTuiListQuery(medicalMallConfig,param);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery() {
-        return fsStoreProductMapper.selectFsStoreProductGoodListQuery(medicalMallConfig);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(BaseQueryParam param) {
+        return fsStoreProductMapper.selectFsStoreProductGoodListQuery(medicalMallConfig,param);
     }
 
     @Override

+ 6 - 1
fs-service/src/main/resources/mapper/hisStore/FsMenuScrmMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="sort"    column="sort"    />
         <result property="menuType"    column="menu_type"    />
+        <result property="appIds"    column="app_ids"    />
     </resultMap>
 
     <sql id="selectFsMenuVo">
-        select menu_id, menu_name,menu_type, icon, is_show,link_type,link_url, create_time, update_time,sort from fs_menu
+        select menu_id, menu_name,menu_type, icon, is_show,link_type,link_url, create_time, update_time,sort,app_ids from fs_menu
     </sql>
 
     <select id="selectFsMenuList" parameterType="FsMenuScrm" resultMap="FsMenuResult">
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null "> and link_url = #{linkUrl}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="menuType != null "> and menu_type = #{menuType}</if>
+            <if test="appIds != null and appIds != ''"> and app_ids = #{appIds}</if>
         </where>
         order by sort asc
     </select>
@@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">link_url,</if>
             <if test="sort != null">sort,</if>
             <if test="menuType != null">menu_type,</if>
+            <if test="appIds != null">app_ids,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="menuName != null">#{menuName},</if>
@@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">#{linkUrl},</if>
             <if test="sort != null">#{sort},</if>
             <if test="menuType != null">#{menuType},</if>
+            <if test="appIds != null">#{appIds},</if>
          </trim>
     </insert>
 
@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">link_url = #{linkUrl},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="menuType != null">menu_type = #{menuType},</if>
+            <if test="appIds != null and appIds != ''">app_ids = #{appIds},</if>
         </trim>
         where menu_id = #{menuId}
     </update>

+ 6 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreProductCategoryScrmMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="isDel"    column="is_del"    />
         <result property="storeId"    column="store_id"    />
+        <result property="appIds"    column="app_ids"    />
     </resultMap>
 
     <sql id="selectFsStoreProductCategoryVo">
-        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del,store_id from fs_store_product_category_scrm
+        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del,store_id,app_ids from fs_store_product_category_scrm
     </sql>
 
     <select id="selectFsStoreProductCategoryList" parameterType="FsStoreProductCategoryScrm" resultMap="FsStoreProductCategoryResult">
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isShow != null "> and is_show = #{isShow}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
             <if test="storeId != null "> and store_id = #{storeId}</if>
+            <if test="appId != null  and appId != ''"> and ((FIND_IN_SET(#{appId}, app_ids) > 0)) </if>
         </where>
     </select>
 
@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
             <if test="isDel != null">is_del,</if>
             <if test="storeId != null">store_id,</if>
+            <if test="appIds != null">app_ids,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pid != null">#{pid},</if>
@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isDel != null">#{isDel},</if>
             <if test="storeId != null">#{storeId},</if>
+            <if test="appIds != null">#{appIds},</if>
          </trim>
     </insert>
 
@@ -76,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="appIds != null">app_ids = #{appIds},</if>
         </trim>
         where cate_id = #{cateId}
     </update>

+ 20 - 4
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="precautions" column="precautions"/>
         <result property="isAudit" column="is_audit"/>
         <result property="storeId" column="store_id"/>
+        <result property="appIds"    column="app_ids"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
@@ -78,7 +79,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
+               adverse_reactions,contraindications,precautions,is_audit,store_id,app_ids
                from fs_store_product_scrm
     </sql>
 
@@ -90,7 +91,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.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.app_ids
         from fs_store_product_scrm p
         select product_id, video, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, agent_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name, is_display, tui_cate_id, company_ids, store_id, 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 from fs_store_product_scrm
     </sql>
@@ -255,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="precautions != null and precautions != ''">precautions ,</if>
             <if test="isAudit != null and isAudit != ''">is_audit ,</if>
             <if test="storeId != null and storeId != ''">store_id ,</if>
+            <if test="appIds != null and appIds != ''">app_ids, </if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -319,6 +321,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="precautions != null and precautions != ''">#{precautions} ,</if>
             <if test="isAudit != null and isAudit != ''">#{isAudit} ,</if>
             <if test="storeId != null and storeId != ''">#{storeId} ,</if>
+            <if test="appIds != null and appIds != ''">#{appIds}, </if>
          </trim>
     </insert>
 
@@ -387,7 +390,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="precautions != null and precautions != ''">precautions = #{precautions} ,</if>
             <if test="isAudit != null and isAudit != ''">is_audit = #{isAudit} ,</if>
             <if test="storeId != null and storeId != ''">store_id = #{storeId} ,</if>
-
+            <if test="appIds != null and appIds != ''">app_ids = #{appIds}, </if>
         </trim>
         where product_id = #{productId}
     </update>
@@ -443,7 +446,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         where fsp.is_del=0 and fsp.is_show=1
         <if test='config.isAudit == "1" '>
-        and fsp.is_audit = '1'
+            and fsp.is_audit = '1'
+        </if>
+        <if test = 'param.appId != null and param.appId != ""'>
+            and ((FIND_IN_SET(#{param.appId}, fsp.app_ids) > 0))
         </if>
         and fsp.is_best=1 and fsp.is_display=1 order by fsp.sort desc,fsp.product_id desc
     </select>
@@ -463,6 +469,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test='config.isAudit == "1"'>
             and p.is_audit = '1'
         </if>
+        <if test='appId != null and appId != "" '>
+            and ((FIND_IN_SET(#{appId}, p.app_ids) > 0))
+        </if>
         and p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}
     </select>
     <select id="selectFsStoreProductHotQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
@@ -471,6 +480,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
         </if>
         where p.is_del=0 and p.is_show=1
+        <if test='appId != null and appId != "" '>
+            and ((FIND_IN_SET(#{appId}, p.app_ids) > 0))
+        </if>
         <if test='config.isAudit == "1" '>
         and p.is_audit = '1'
         </if>
@@ -484,6 +496,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where p.is_del=0 and p.is_show=1
         <if test='config.isAudit == "1" '>
         and p.is_audit = '1'
+
+        </if>
+        <if test = 'param.appId != null and param.appId != ""'>
+            and ((FIND_IN_SET(#{param.appId}, p.app_ids) > 0))
         </if>
         and  p.is_good=1 and p.is_display=1 order by p.sort desc
     </select>

+ 3 - 2
fs-user-app/src/main/java/com/fs/app/controller/store/IndexScrmController.java

@@ -58,10 +58,11 @@ public class IndexScrmController extends AppBaseController {
 	@ApiOperation("获取首页数据")
 	@GetMapping("/getIndexData")
 	public R getIndexData(HttpServletRequest request){
+		String appId=request.getHeader("appId");
 		List<FsArticleCateListQueryVO> articleCateList=articleCateService.selectFsArticleCateListQuery();
 		List<FsAdvListQueryVO> advList=advService.selectFsAdvListQuery(1);
-		List<FsStoreProductListQueryVO> newProductList=productService.selectFsStoreProductNewQuery(10);
-		List<FsStoreProductListQueryVO> hotProductList=productService.selectFsStoreProductHotQuery(10);
+		List<FsStoreProductListQueryVO> newProductList=productService.selectFsStoreProductNewQuery(10,appId);
+		List<FsStoreProductListQueryVO> hotProductList=productService.selectFsStoreProductHotQuery(10,appId);
 		IndexVO vo=IndexVO.builder().articleCateList(articleCateList).advList(advList).newProductList(newProductList).hotProductList(hotProductList).build();
 		return R.ok().put("data", vo);
 	}

+ 14 - 4
fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java

@@ -58,12 +58,14 @@ public class ProductScrmController extends AppBaseController {
      * @return     */
     @ApiOperation("获取分类")
     @GetMapping("/getProductCate")
-    public R getProductCate(@RequestParam(name = "storeId",required = false) Long storeId){
+    public R getProductCate(@RequestParam(name = "storeId",required = false) Long storeId, HttpServletRequest request){
         try {
+            String appId=request.getHeader("appId");
             FsStoreProductCategoryScrm param=new FsStoreProductCategoryScrm();
             param.setIsShow(1);
             param.setIsDel(0);
             param.setStoreId(storeId);
+            param.setAppId(appId);
             List<FsStoreProductCategoryScrm> list=categoryService.selectFsStoreProductCategoryListQuery(param);
             return R.ok().put("data",list);
         } catch (Exception e){
@@ -89,6 +91,8 @@ public class ProductScrmController extends AppBaseController {
     @ApiOperation("获取商品列表")
     @GetMapping("/getProducts")
     public R getProducts(FsStoreProductQueryParam param, HttpServletRequest request){
+        String appId=request.getHeader("appId");
+        param.setAppId(appId);
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setIsDisplay(1);
         List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
@@ -251,14 +255,18 @@ public class ProductScrmController extends AppBaseController {
     @ApiOperation("获取喜欢商品列表")
     @GetMapping("/getGoodsProduct")
     public R getGoodsProduct(BaseQueryParam param,HttpServletRequest request){
-        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductGoodQuery(10);
+        String appId=request.getHeader("appId");
+        param.setAppId(appId);
+        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductGoodQuery(10,param);
         return R.ok().put("data", productList);
     }
     @ApiOperation("获取推荐商品数据")
     @GetMapping("/getTuiProducts")
     public R getTuiProducts(BaseQueryParam param, HttpServletRequest request){
+        String appId=request.getHeader("appId");
+        param.setAppId(appId);
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductTuiListQuery();
+        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductTuiListQuery(param);
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
     }
@@ -266,7 +274,9 @@ public class ProductScrmController extends AppBaseController {
     @GetMapping("/getGoodsProducts")
     public R getGoodsProducts(BaseQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductGoodListQuery();
+        String appId=request.getHeader("appId");
+        param.setAppId(appId);
+        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductGoodListQuery(param);
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);