瀏覽代碼

医健宝功能新增

吴树波 1 周之前
父節點
當前提交
ff8d57ebfb

+ 2 - 14
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -222,6 +222,7 @@ public interface FsStoreProductScrmMapper
             "where is_del=0 and is_show=1 and product_id=#{productId} " +
             "</script>"})
     FsStoreProductQueryVO selectFsStoreProductByIdQueryOld(Long productId);
+
     @Select({"<script> " +
             "select p.* from fs_store_product_scrm p  " +
             //新增审核状态及所属店铺审核状态
@@ -234,7 +235,7 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and p.product_id=#{productId} " +
             "</script>"})
-    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId, String storeId,@Param("config") MedicalMallConfig config);
+    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}" +
             " where product_id=#{productId} and stock >= #{num}")
     int decProductAttrStock(@Param("productId")Long productId, @Param("num")Integer cartNum);
@@ -274,19 +275,6 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "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);
-    @Select("SELECT COUNT(*) OVER (PARTITION BY fsp.product_name) AS storeCount,p1.storeIds,fsp.* " +
-            "FROM fs_store_product_scrm fsp " +
-            "left join (select GROUP_CONCAT(distinct fsp1.store_id SEPARATOR ',' ) AS storeIds,fsp1.product_name " +
-            "from  fs_store_product_scrm fsp1 group by fsp1.product_name) p1 on p1.product_name = fsp.product_name "+
-            "inner join fs_store_scrm fs on fs.store_id = fsp.store_id " +
-            "<if test='config.isAudit == \"1\" '>" +
-            "and fs.is_audit = '1'" +
-            "</if>" +
-            "where fsp.is_del=0 and fsp.is_show=1 " +
-            "<if test='config.isAudit == \"1\" '>" +
-            "and fsp.is_audit = '1'" +
-            "</if>" +
-            "and fsp.is_best=1 and fsp.is_display=1 order by fsp.sort desc,fsp.product_id desc")
     List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config);
     @Select("select p.* from fs_store_product_scrm p " +
             //新增审核状态及所属店铺审核状态

+ 3 - 0
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -965,6 +965,9 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
     @Override
     public R sendUserLogsInfoMsgSop(SendUserLogsInfoMsgParam param) {
         List<String> sopUserLogsIds = sopUserLogsMapper.getSopUserLogsIds(param);
+        if(sopUserLogsIds == null || sopUserLogsIds.isEmpty()){
+            throw new BaseException("SOP没有可发送的营期数据");
+        }
         String[] ids = sopUserLogsIds.toArray(new String[0]);
         param.setIds(ids);
         processQwSopLogsBySendMsg(param,param.getDraftStrategy());

+ 15 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -430,4 +430,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
+    <select id="selectFsStoreProductTuiListQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        SELECT COUNT(*) OVER (PARTITION BY fsp.product_name) AS storeCount,p1.storeIds,fsp.*
+        FROM fs_store_product_scrm fsp
+        left join (select GROUP_CONCAT(distinct fsp1.store_id SEPARATOR ',' ) AS storeIds,fsp1.product_name
+        from  fs_store_product_scrm fsp1 group by fsp1.product_name) p1 on p1.product_name = fsp.product_name
+        inner join fs_store_scrm fs on fs.store_id = fsp.store_id
+        <if test='config.isAudit == "1" '>
+        and fs.is_audit = '1'
+        </if>
+        where fsp.is_del=0 and fsp.is_show=1
+        <if test='config.isAudit == "1" '>
+        and fsp.is_audit = '1'
+        </if>
+        and fsp.is_best=1 and fsp.is_display=1 order by fsp.sort desc,fsp.product_id desc
+    </select>
 </mapper>