|
@@ -134,7 +134,9 @@ public interface FsStoreProductScrmMapper
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductByCateIdQuery(Long cateId);
|
|
|
@Select({"<script> " +
|
|
|
"select p.* from fs_store_product_scrm p " +
|
|
|
- "where is_del=0 and is_show=1 " +
|
|
|
+ //新增审核状态及所属店铺审核状态
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1'" +
|
|
|
"<if test = 'maps.productName != null and maps.productName !=\"\" '> " +
|
|
|
"and (p.product_name like CONCAT('%',#{maps.productName},'%') or p.keyword like concat('%',#{maps.productName},'%') ) " +
|
|
|
"</if>" +
|
|
@@ -169,7 +171,10 @@ public interface FsStoreProductScrmMapper
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(@Param("maps")FsStoreProductQueryParam param);
|
|
|
@Select({"<script> " +
|
|
|
"select p.* from fs_store_product_scrm p " +
|
|
|
- "where is_del=0 and is_show=1 and product_id=#{productId} " +
|
|
|
+ //新增审核状态及所属店铺审核状态
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1'" +
|
|
|
+ "and p.product_id=#{productId} " +
|
|
|
"</script>"})
|
|
|
FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId);
|
|
|
@Update("update fs_store_product_scrm set stock=stock-#{num}, sales=sales+#{num}" +
|
|
@@ -178,15 +183,25 @@ 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 * from fs_store_product_scrm where is_del=0 and is_show=1 and is_new=1 and is_display=1 order by sort desc limit #{count}")
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1' and p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count);
|
|
|
- @Select("select * from fs_store_product_scrm where is_del=0 and is_show=1 and is_hot=1 and is_display=1 order by sort desc limit #{count}")
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1' and p.is_hot=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
|
|
|
- @Select("select * from fs_store_product_scrm where is_del=0 and is_show=1 and is_good=1 and is_display=1 order by sort desc limit #{count}")
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1' and p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
|
|
|
- @Select("select * from fs_store_product_scrm where is_del=0 and is_show=1 and is_best=1 and is_display=1 order by sort desc,product_id desc")
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1' and p.is_best=1 and p.is_display=1 order by p.sort desc,p.product_id desc")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
|
|
|
- @Select("select * from fs_store_product_scrm where is_del=0 and is_show=1 and is_good=1 and is_display=1 order by sort desc")
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where p.is_del=0 and p.is_show=1 and p.is_audit = '1' and p.is_good=1 and p.is_display=1 order by p.sort desc")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
|
|
|
@Select({"<script> " +
|
|
|
"select count(1) from fs_store_product_scrm " +
|
|
@@ -287,4 +302,13 @@ public interface FsStoreProductScrmMapper
|
|
|
List<FsStoreProductRuleScrm> selectFsStoreProductRuleList();
|
|
|
|
|
|
void batchAudit(ProductAuditDTO auditDTO);
|
|
|
+
|
|
|
+ FsStoreProductScrm selectFsStoreProductByIdAudit(Long productId);
|
|
|
+
|
|
|
+ @Select({"<script> " +
|
|
|
+ "select p.* from fs_store_product_scrm p " +
|
|
|
+ "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
|
|
|
+ "where find_in_set(p.product_id,#{ids}) " +
|
|
|
+ "</script>"})
|
|
|
+ List<FsStoreProductActivityListVO> selectFsStoreProductByIdsAudit(String productIds);
|
|
|
}
|