|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.hisStore.mapper;
|
|
package com.fs.hisStore.mapper;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
import com.fs.common.annotation.DataSource;
|
|
import com.fs.common.annotation.DataSource;
|
|
|
import com.fs.common.enums.DataSourceType;
|
|
import com.fs.common.enums.DataSourceType;
|
|
@@ -196,7 +197,9 @@ public interface FsStoreProductScrmMapper
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
"select distinct p.* from fs_store_product_scrm p " +
|
|
"select distinct p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
//新增审核状态及所属店铺审核状态
|
|
|
|
|
+ "<if test = 'maps.isStores != null and maps.isStores == 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 and p.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 !=\"\" '> " +
|
|
"<if test = 'maps.productName != null and maps.productName !=\"\" '> " +
|
|
|
"and (p.product_name like CONCAT('%',#{maps.productName},'%') or p.keyword like concat('%',#{maps.productName},'%') ) " +
|
|
"and (p.product_name like CONCAT('%',#{maps.productName},'%') or p.keyword like concat('%',#{maps.productName},'%') ) " +
|
|
@@ -275,61 +278,23 @@ public interface FsStoreProductScrmMapper
|
|
|
@Update("update fs_store_product_scrm set stock=stock+#{num}, sales=sales-#{num}" +
|
|
@Update("update fs_store_product_scrm set stock=stock+#{num}, sales=sales-#{num}" +
|
|
|
" where product_id=#{productId}")
|
|
" where product_id=#{productId}")
|
|
|
int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
|
|
int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
|
|
|
- @Select({"<script> " +
|
|
|
|
|
- "select p.* from fs_store_product_scrm p " +
|
|
|
|
|
|
|
+
|
|
|
|
|
+ List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(Map<String, Object> params);
|
|
|
|
|
+
|
|
|
|
|
+ List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(Map<String, Object> params);
|
|
|
|
|
+ @Select("select p.* from fs_store_product_scrm p " +
|
|
|
//新增审核状态及所属店铺审核状态
|
|
//新增审核状态及所属店铺审核状态
|
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
"<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>" +
|
|
"</if>" +
|
|
|
- " where p.is_del=0 and p.is_show=1 " +
|
|
|
|
|
- "<if test='config.isAudit == \"1\" '>" +
|
|
|
|
|
- " and p.is_audit = '1' " +
|
|
|
|
|
- "</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);
|
|
|
|
|
- @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 " +
|
|
|
|
|
- "<if test='config.isAudit == \"1\" '>" +
|
|
|
|
|
- " and p.is_audit = '1' " +
|
|
|
|
|
- "</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);
|
|
|
|
|
- @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\" '>" +
|
|
"<if test='config.isAudit == \"1\" '>" +
|
|
|
- " and p.is_audit = '1' " +
|
|
|
|
|
|
|
+ "and p.is_audit = '1'" +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
- " and p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}" +
|
|
|
|
|
- "</script>"})
|
|
|
|
|
|
|
+ "and p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}")
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count,@Param("config") MedicalMallConfig config);
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count,@Param("config") MedicalMallConfig config);
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig config, @Param("param") BaseQueryParam param);
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig config, @Param("param") BaseQueryParam param);
|
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig config, @Param("param") BaseQueryParam param);
|
|
List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig config, @Param("param") BaseQueryParam param);
|
|
|
- List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@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 " +
|
|
|
|
|
- "</if>" +
|
|
|
|
|
- " where p.is_del=0 and p.is_show=1 " +
|
|
|
|
|
- "<if test='config.isAudit == \"1\" '>" +
|
|
|
|
|
- " and p.is_audit = '1' " +
|
|
|
|
|
- "</if>" +
|
|
|
|
|
- " 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({"<script> " +
|
|
|
"select count(1) from fs_store_product_scrm " +
|
|
"select count(1) from fs_store_product_scrm " +
|
|
|
"where 1=1 " +
|
|
"where 1=1 " +
|