Bladeren bron

增加商品种类功能

peicj 2 weken geleden
bovenliggende
commit
f11d4de812

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/StoreOrderController.java

@@ -133,7 +133,7 @@ public class StoreOrderController extends AppBaseController
     @ApiOperation("获取商品详情")
     @GetMapping("/getProductDetails")
     public R getProductDetails(@RequestParam(value="productId") Long productId, HttpServletRequest request){
-        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId);
+        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId, null);
         if(product==null){
             return R.error("商品不存在或已下架");
         }

+ 3 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsStoreProduct.java

@@ -190,4 +190,7 @@ public class FsStoreProduct extends BaseEntity
     @Excel(name = "是否特殊商品 1是 0否")
     private Integer specialProducts;
 
+    @Excel(name = "商品种类:1.普通商品2.保健品3.药品")
+    private Integer productKind;
+
 }

+ 3 - 0
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductAttrValueMapper.java

@@ -108,6 +108,9 @@ public interface FsStoreProductAttrValueMapper
             "<if test = 'maps.tuiCateId != null and maps.tuiCateId !=0    '> " +
             "and p.tui_cate_id =#{maps.tuiCateId} " +
             "</if>" +
+            "<if test = 'maps.productKind != null    '> " +
+            "and p.product_kind =#{maps.productKind} " +
+            "</if>" +
             " order by v.id desc "+
             "</script>"})
     List<FsStoreProductAttrValueQueryVO> selectStoreProductAttrValueListQuery(@Param("maps")FsStoreProductAttrValueQueryParam param);

+ 48 - 14
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductMapper.java

@@ -86,6 +86,9 @@ public interface FsStoreProductMapper
             "<if test = 'maps.specialProducts != null    '> " +
             "and p.special_products =#{maps.specialProducts} " +
             "</if>" +
+            "<if test = 'maps.productKind != null    '> " +
+            "and p.product_kind =#{maps.productKind} " +
+            "</if>" +
             " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps")FsStoreProduct fsStoreProduct);
@@ -116,12 +119,19 @@ public interface FsStoreProductMapper
             "<if test = 'maps.warehouseCode != null    '> " +
             "and p.warehouse_code =#{maps.warehouseCode} " +
             "</if>" +
+            "<if test = 'maps.productKind != null    '> " +
+            "and p.product_kind =#{maps.productKind} " +
+            "</if>" +
             " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductBarCodeListVO(@Param("maps")FsStoreProduct fsStoreProduct);
 
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_best=1 and is_display=1 order by sort desc limit #{count}")
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count);
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_best=1 and is_display=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc limit #{count}" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(@Param("count") int count, @Param("productKind") Integer productKind);
     @Select("select * from fs_store_product where  is_del=0 and is_show=1 order by sort desc limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductByCateIdQuery(Long cateId);
     @Select({"<script> " +
@@ -139,6 +149,9 @@ public interface FsStoreProductMapper
             "<if test = 'maps.specialProducts != null    '> " +
             "and p.special_products =#{maps.specialProducts}  " +
             "</if>" +
+            "<if test = 'maps.productKind != null    '> " +
+            "and p.product_kind =#{maps.productKind} " +
+            "</if>" +
             "<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\"  '> " +
             "order by p.sort desc " +
             "</if>" +
@@ -162,8 +175,9 @@ public interface FsStoreProductMapper
     @Select({"<script> " +
             "select p.* from fs_store_product p  " +
             "where is_del=0 and is_show=1 and product_id=#{productId} " +
+            "<if test = 'productKind != null'> and p.product_kind = #{productKind} </if>" +
             "</script>"})
-    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId);
+    FsStoreProductQueryVO selectFsStoreProductByIdQuery(@Param("productId") Long productId, @Param("productKind") Integer productKind);
     @Update("update fs_store_product set stock=stock-#{num}, sales=sales+#{num}" +
             " where product_id=#{productId} and stock >= #{num}")
     int decProductAttrStock(@Param("productId")Long productId, @Param("num")Integer cartNum);
@@ -178,16 +192,36 @@ public interface FsStoreProductMapper
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
     @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_hot=1 and is_display=1 and special_products=1 order by sort desc limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuerySp(int count);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc limit #{count}")
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_best=1 and is_display=1 order by sort desc")
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_best=1 and is_display=1 and special_products=1 order by sort desc")
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp();
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc")
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 and special_products=1 order by sort desc")
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp();
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_good=1 and is_display=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc limit #{count}" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(@Param("count") int count, @Param("productKind") Integer productKind);
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_best=1 and is_display=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("productKind") Integer productKind);
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_best=1 and is_display=1 and special_products=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp(@Param("productKind") Integer productKind);
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_good=1 and is_display=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("productKind") Integer productKind);
+    @Select({"<script> " +
+            "select * from fs_store_product where is_del=0 and is_show=1 and is_good=1 and is_display=1 and special_products=1 " +
+            "<if test = 'productKind != null'> and product_kind = #{productKind} </if>" +
+            " order by sort desc" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp(@Param("productKind") Integer productKind);
     @Select({"<script> " +
             "select count(1) from fs_store_product  " +
             "where 1=1 " +
@@ -212,7 +246,7 @@ public interface FsStoreProductMapper
             " p.vip_price, p.ot_price, p.postage,p.unit_name,p.sort,p.sales,p.is_show,p.is_hot,p.is_benefit,p.is_best,p.is_new,p.description," +
             " 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_code  FROM fs_store_product p " +
+            "ave.brokerage,ave.brokerage_two,ave.brokerage_three,ave.agent_price,p.warehouse_code,p.product_kind  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 " +
             "</script>"})
     List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps")FsStoreProduct fsStoreProduct);

+ 3 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreProductAddEditParam.java

@@ -123,6 +123,9 @@ public class FsStoreProductAddEditParam implements Serializable
     /** 商品类型:1非处方 2处方 */
     private Integer productType;
 
+    /** 商品种类:1.普通商品2.保健品3.药品 */
+    private Integer productKind;
+
     /** 国药准字 */
     private String prescribeCode;
 

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreProductAttrValueQueryParam.java

@@ -14,5 +14,7 @@ public class FsStoreProductAttrValueQueryParam extends BaseQueryParam implements
     String productName;
     @ApiModelProperty(value = "推广分类")
     Integer tuiCateId;
+    @ApiModelProperty(value = "商品种类")
+    private Integer productKind;
 
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreProductQueryParam.java

@@ -25,4 +25,6 @@ public class FsStoreProductQueryParam extends BaseQueryParam implements Serializ
     private Integer isDisplay=1;
     private String appId;
     private Integer specialProducts;
+    @ApiModelProperty(value = "商品种类")
+    private Integer productKind;
 }

+ 7 - 7
fs-service-system/src/main/java/com/fs/store/service/IFsStoreProductService.java

@@ -75,12 +75,12 @@ public interface IFsStoreProductService
 
     R addOrEdit(FsStoreProductAddEditParam fsStoreProduct);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count);
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count, Integer productKind);
 
 
     List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(FsStoreProductQueryParam param);
 
-    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId);
+    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId, Integer productKind);
 
     void decProductStock(Long productId, Long productAttrValueId, Integer cartNum);
 
@@ -93,13 +93,13 @@ public interface IFsStoreProductService
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuerySp(int count);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count, Integer productKind);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp();
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(Integer productKind);
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp(Integer productKind);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
-    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp();
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(Integer productKind);
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp(Integer productKind);
 
     Long selectFsStoreProductCount(int type);
 

+ 14 - 14
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreProductServiceImpl.java

@@ -553,8 +553,8 @@ public class FsStoreProductServiceImpl implements IFsStoreProductService
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductTuiQuery(count);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count, Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductTuiQuery(count, productKind);
     }
 
 
@@ -565,8 +565,8 @@ public class FsStoreProductServiceImpl implements IFsStoreProductService
     }
 
     @Override
-    public FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId) {
-        return fsStoreProductMapper.selectFsStoreProductByIdQuery(productId);
+    public FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId, Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductByIdQuery(productId, productKind);
     }
 
     @Override
@@ -609,28 +609,28 @@ public class FsStoreProductServiceImpl implements IFsStoreProductService
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductGoodQuery(count);
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count, Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductGoodQuery(count, productKind);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery() {
-        return fsStoreProductMapper.selectFsStoreProductTuiListQuery();
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductTuiListQuery(productKind);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp() {
-        return fsStoreProductMapper.selectFsStoreProductTuiListQuerySp();
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuerySp(Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductTuiListQuerySp(productKind);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery() {
-        return fsStoreProductMapper.selectFsStoreProductGoodListQuery();
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductGoodListQuery(productKind);
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp() {
-        return fsStoreProductMapper.selectFsStoreProductGoodListQuerySp();
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuerySp(Integer productKind) {
+        return fsStoreProductMapper.selectFsStoreProductGoodListQuerySp(productKind);
     }
 
     @Override

+ 3 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductExportVO.java

@@ -195,4 +195,7 @@ public class FsStoreProductExportVO implements Serializable {
      */
     @Excel(name = "仓库代码")
     private String warehouseCode;
+
+    @Excel(name = "商品种类:1.普通商品2.保健品3.药品")
+    private Integer productKind;
 }

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductListVO.java

@@ -83,4 +83,8 @@ public class FsStoreProductListVO  implements Serializable
      */
     private Integer specialProducts;
 
+    /**
+     * 商品种类:1.普通商品2.保健品3.药品
+     */
+    private Integer productKind;
 }

+ 8 - 1
fs-service-system/src/main/resources/mapper/store/FsStoreProductMapper.xml

@@ -48,10 +48,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDisplay"    column="is_display"    />
         <result property="tuiCateId"    column="tui_cate_id"    />
         <result property="specialProducts"    column="special_products"    />
+        <result property="productKind"    column="product_kind"    />
+
+
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
-        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_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,warehouse_id,warehouse_code,special_products from fs_store_product
+        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_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,warehouse_id,warehouse_code,special_products,product_kind from fs_store_product
     </sql>
 
     <select id="selectFsStoreProductList" parameterType="FsStoreProduct" resultMap="FsStoreProductResult">
@@ -98,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="warehouseId != null"> and warehouse_id = #{warehouseId}</if>
             <if test="warehouseCode != null"> and warehouse_code = #{warehouseCode}</if>
             <if test="specialProducts != null"> and special_products = #{specialProducts}</if>
+            <if test="productKind != null"> and product_kind = #{productKind}</if>
         </where>
     </select>
 
@@ -153,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="warehouseId != null">warehouse_id,</if>
             <if test="warehouseCode != null">warehouse_code,</if>
             <if test="specialProducts != null">special_products,</if>
+            <if test="productKind != null">product_kind,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -199,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="warehouseId != null">#{warehouseId},</if>
             <if test="warehouseCode != null">#{warehouseCode},</if>
             <if test="specialProducts != null">#{specialProducts},</if>
+            <if test="productKind != null">#{productKind},</if>
          </trim>
     </insert>
 
@@ -249,6 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
             <if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
             <if test="specialProducts != null">special_products = #{specialProducts},</if>
+            <if test="productKind != null">product_kind = #{productKind},</if>
         </trim>
         where product_id = #{productId}
     </update>

+ 16 - 0
fs-user-app/src/main/java/com/fs/app/controller/AppBaseController.java

@@ -36,6 +36,22 @@ public class AppBaseController {
 		}
 	}
 
+	/**
+	 * 获取商品种类,默认为1
+	 */
+	protected Integer getProductKind()
+	{
+		String headValue = ServletUtils.getRequest().getHeader("productKind");
+		if (StringUtils.isNotEmpty(headValue)) {
+			try {
+				return Integer.parseInt(headValue);
+			} catch (NumberFormatException e) {
+				return 1;
+			}
+		}
+		return 1;
+	}
+
 	protected boolean isCurrentUser(Long userId) {
 		if (userId == null || StringUtils.isEmpty(getUserId())) {
 			return false;

+ 33 - 12
fs-user-app/src/main/java/com/fs/app/controller/ProductController.java

@@ -41,6 +41,20 @@ public class ProductController extends  AppBaseController {
     @Autowired
     private IFsCoursePlaySourceConfigService coursePlaySourceConfigService;
 
+    private void applyProductKind(FsStoreProductQueryParam param) {
+        Integer productKind = getProductKind();
+        if (productKind != null) {
+            param.setProductKind(productKind);
+        }
+    }
+
+    private void applyProductKind(FsStoreProductAttrValueQueryParam param) {
+        Integer productKind = getProductKind();
+        if (productKind != null) {
+            param.setProductKind(productKind);
+        }
+    }
+
     /**
      * 获取用户信息
      * @return R
@@ -111,6 +125,7 @@ public class ProductController extends  AppBaseController {
                 param.setSpecialProducts(1);
             }
         }
+        applyProductKind(param);
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setIsDisplay(1);
         List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
@@ -128,6 +143,7 @@ public class ProductController extends  AppBaseController {
                 param.setSpecialProducts(1);
             }
         }
+        applyProductKind(param);
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setIsDisplay(1);
         List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
@@ -138,7 +154,7 @@ public class ProductController extends  AppBaseController {
     @ApiOperation("获取商品详情")
     @GetMapping("/getProductDetails")
     public R getProductDetails(@RequestParam(value="productId") Long productId){
-        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId);
+        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId, getProductKind());
         if(product==null){
             return R.error("商品不存在或已下架");
         }
@@ -178,7 +194,7 @@ public class ProductController extends  AppBaseController {
     @ApiOperation("获取商品详情")
     @GetMapping("/getProductDetailsV2")
     public R getProductDetailsV2(@RequestParam(value="productId") Long productId){
-        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId);
+        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId, getProductKind());
         if(product==null){
             return R.error("商品不存在或已下架");
         }
@@ -262,13 +278,13 @@ public class ProductController extends  AppBaseController {
     @ApiOperation("获取推荐商品列表")
     @GetMapping("/getTuiProduct")
     public R getTuiProduct(){
-        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductTuiQuery(10);
+        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductTuiQuery(10, getProductKind());
         return R.ok().put("data", productList);
     }
     @ApiOperation("获取喜欢商品列表")
     @GetMapping("/getGoodsProduct")
     public R getGoodsProduct(){
-        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductGoodQuery(10);
+        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductGoodQuery(10, getProductKind());
         return R.ok().put("data", productList);
     }
     @ApiOperation("获取推荐商品数据")
@@ -283,10 +299,11 @@ public class ProductController extends  AppBaseController {
         }
         PageHelper.startPage(param.getPage(), param.getPageSize());
         List<FsStoreProductListQueryVO> list = new ArrayList<>();
+        Integer productKind = getProductKind();
         if (flag){
-            list=productService.selectFsStoreProductTuiListQuerySp();
+            list=productService.selectFsStoreProductTuiListQuerySp(productKind);
         }else {
-            list=productService.selectFsStoreProductTuiListQuery();
+            list=productService.selectFsStoreProductTuiListQuery(productKind);
         }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
@@ -304,10 +321,11 @@ public class ProductController extends  AppBaseController {
         }
         PageHelper.startPage(param.getPage(), param.getPageSize());
         List<FsStoreProductListQueryVO> list = new ArrayList<>();
+        Integer productKind = getProductKind();
         if (flag){
-            list=productService.selectFsStoreProductTuiListQuerySp();
+            list=productService.selectFsStoreProductTuiListQuerySp(productKind);
         }else {
-            list=productService.selectFsStoreProductTuiListQuery();
+            list=productService.selectFsStoreProductTuiListQuery(productKind);
         }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
@@ -324,10 +342,11 @@ public class ProductController extends  AppBaseController {
         }
         PageHelper.startPage(param.getPage(), param.getPageSize());
         List<FsStoreProductListQueryVO> list = new ArrayList<>();
+        Integer productKind = getProductKind();
         if (flag){
-            list=productService.selectFsStoreProductGoodListQuerySp();
+            list=productService.selectFsStoreProductGoodListQuerySp(productKind);
         }else {
-            list=productService.selectFsStoreProductGoodListQuery();
+            list=productService.selectFsStoreProductGoodListQuery(productKind);
         }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
@@ -346,10 +365,11 @@ public class ProductController extends  AppBaseController {
         }
         PageHelper.startPage(param.getPage(), param.getPageSize());
         List<FsStoreProductListQueryVO> list = new ArrayList<>();
+        Integer productKind = getProductKind();
         if (flag){
-            list=productService.selectFsStoreProductGoodListQuerySp();
+            list=productService.selectFsStoreProductGoodListQuerySp(productKind);
         }else {
-            list=productService.selectFsStoreProductGoodListQuery();
+            list=productService.selectFsStoreProductGoodListQuery(productKind);
         }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
@@ -359,6 +379,7 @@ public class ProductController extends  AppBaseController {
     @ApiOperation("获取推广商品列表")
     @GetMapping("/getStoreProductAttrValueList")
     public R getStoreProductAttrValueList(FsStoreProductAttrValueQueryParam param){
+        applyProductKind(param);
         PageHelper.startPage(param.getPage(), param.getPageSize());
         List<FsStoreProductAttrValueQueryVO> productList=attrValueService.selectStoreProductAttrValueListQuery(param);
         PageInfo<FsStoreProductAttrValueQueryVO> listPageInfo=new PageInfo<>(productList);