|
@@ -86,6 +86,9 @@ public interface FsStoreProductMapper
|
|
|
"<if test = 'maps.specialProducts != null '> " +
|
|
"<if test = 'maps.specialProducts != null '> " +
|
|
|
"and p.special_products =#{maps.specialProducts} " +
|
|
"and p.special_products =#{maps.specialProducts} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.productKind != null '> " +
|
|
|
|
|
+ "and p.product_kind =#{maps.productKind} " +
|
|
|
|
|
+ "</if>" +
|
|
|
" order by p.product_id desc "+
|
|
" order by p.product_id desc "+
|
|
|
"</script>"})
|
|
"</script>"})
|
|
|
List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps")FsStoreProduct fsStoreProduct);
|
|
List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps")FsStoreProduct fsStoreProduct);
|
|
@@ -116,12 +119,19 @@ public interface FsStoreProductMapper
|
|
|
"<if test = 'maps.warehouseCode != null '> " +
|
|
"<if test = 'maps.warehouseCode != null '> " +
|
|
|
"and p.warehouse_code =#{maps.warehouseCode} " +
|
|
"and p.warehouse_code =#{maps.warehouseCode} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.productKind != null '> " +
|
|
|
|
|
+ "and p.product_kind =#{maps.productKind} " +
|
|
|
|
|
+ "</if>" +
|
|
|
" order by p.product_id desc "+
|
|
" order by p.product_id desc "+
|
|
|
"</script>"})
|
|
"</script>"})
|
|
|
List<FsStoreProductListVO> selectFsStoreProductBarCodeListVO(@Param("maps")FsStoreProduct fsStoreProduct);
|
|
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}")
|
|
@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);
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductByCateIdQuery(Long cateId);
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
@@ -139,6 +149,9 @@ public interface FsStoreProductMapper
|
|
|
"<if test = 'maps.specialProducts != null '> " +
|
|
"<if test = 'maps.specialProducts != null '> " +
|
|
|
"and p.special_products =#{maps.specialProducts} " +
|
|
"and p.special_products =#{maps.specialProducts} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.productKind != null '> " +
|
|
|
|
|
+ "and p.product_kind =#{maps.productKind} " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\" '> " +
|
|
"<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\" '> " +
|
|
|
"order by p.sort desc " +
|
|
"order by p.sort desc " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -162,8 +175,9 @@ public interface FsStoreProductMapper
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
"select p.* from fs_store_product p " +
|
|
"select p.* from fs_store_product p " +
|
|
|
"where is_del=0 and is_show=1 and product_id=#{productId} " +
|
|
"where is_del=0 and is_show=1 and product_id=#{productId} " +
|
|
|
|
|
+ "<if test = 'productKind != null'> and p.product_kind = #{productKind} </if>" +
|
|
|
"</script>"})
|
|
"</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}" +
|
|
@Update("update fs_store_product set stock=stock-#{num}, sales=sales+#{num}" +
|
|
|
" where product_id=#{productId} and stock >= #{num}")
|
|
" where product_id=#{productId} and stock >= #{num}")
|
|
|
int decProductAttrStock(@Param("productId")Long productId, @Param("num")Integer cartNum);
|
|
int decProductAttrStock(@Param("productId")Long productId, @Param("num")Integer cartNum);
|
|
@@ -178,16 +192,36 @@ public interface FsStoreProductMapper
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
|
|
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}")
|
|
@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);
|
|
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({"<script> " +
|
|
|
"select count(1) from fs_store_product " +
|
|
"select count(1) from fs_store_product " +
|
|
|
"where 1=1 " +
|
|
"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.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.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," +
|
|
" 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 " +
|
|
" LEFT JOIN fs_store_product_attr_value ave on p.product_id=ave.product_id WHERE p.product_id is not null " +
|
|
|
"</script>"})
|
|
"</script>"})
|
|
|
List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps")FsStoreProduct fsStoreProduct);
|
|
List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps")FsStoreProduct fsStoreProduct);
|