|
@@ -227,13 +227,13 @@ public interface FsStoreProductScrmMapper
|
|
|
"select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ " 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 " +
|
|
|
+ " where p.is_del=0 and p.is_show=1 " +
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "and p.is_audit = '1'" +
|
|
|
+ " and p.is_audit = '1' " +
|
|
|
"</if>" +
|
|
|
- "and p.product_id=#{productId} " +
|
|
|
+ " and p.product_id=#{productId} " +
|
|
|
"</script>"})
|
|
|
FsStoreProductQueryVO selectFsStoreProductByIdQuery(@Param("productId") Long productId, @Param("storeId") String storeId, @Param("config") MedicalMallConfig config);
|
|
|
@Update("update fs_store_product_scrm set stock=stock-#{num}, sales=sales+#{num}" +
|
|
@@ -242,50 +242,58 @@ public interface FsStoreProductScrmMapper
|
|
|
@Update("update fs_store_product_scrm set stock=stock+#{num}, sales=sales-#{num}" +
|
|
|
" where product_id=#{productId}")
|
|
|
int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
|
|
|
- @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ @Select({"<script> " +
|
|
|
+ "select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
"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 " +
|
|
|
+ " where p.is_del=0 and p.is_show=1 " +
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "and p.is_audit = '1' " +
|
|
|
+ " and p.is_audit = '1' " +
|
|
|
"</if>" +
|
|
|
- "and p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
- List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count,@Param("config") MedicalMallConfig config);
|
|
|
- @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ " 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);
|
|
|
+ @Select({"<script> " +
|
|
|
+ "select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ " 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 " +
|
|
|
+ " where p.is_del=0 and p.is_show=1 " +
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "and p.is_audit = '1'" +
|
|
|
+ " and p.is_audit = '1' " +
|
|
|
"</if>" +
|
|
|
- "and p.is_hot=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
- List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count,@Param("config") MedicalMallConfig config);
|
|
|
- @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "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);
|
|
|
+ @Select({"<script> " +
|
|
|
+ "select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ " 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 " +
|
|
|
+ " where p.is_del=0 and p.is_show=1 " +
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "and p.is_audit = '1'" +
|
|
|
+ " and p.is_audit = '1' " +
|
|
|
"</if>" +
|
|
|
- "and p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
+ " and p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}" +
|
|
|
+ "</script>"})
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count,@Param("config") MedicalMallConfig config);
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig config);
|
|
|
- @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ @Select({"<script> " +
|
|
|
+ "select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ " 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 " +
|
|
|
+ " where p.is_del=0 and p.is_show=1 " +
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- "and p.is_audit = '1'" +
|
|
|
+ " and p.is_audit = '1' " +
|
|
|
"</if>" +
|
|
|
- "and p.is_good=1 and p.is_display=1 order by p.sort desc")
|
|
|
+ " and p.is_good=1 and p.is_display=1 order by p.sort desc" +
|
|
|
+ "</script>"})
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig config);
|
|
|
@Select({"<script> " +
|
|
|
"select count(1) from fs_store_product_scrm " +
|