Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

ct 1 dzień temu
rodzic
commit
3433414d0d

+ 9 - 4
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreProductScrmController.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
@@ -137,12 +138,16 @@ public class FsStoreProductScrmController extends BaseController
     @PostMapping(value = "/addOrEdit")
     public R addOrEdit(@RequestBody FsStoreProductAddEditParam fsStoreProduct)
     {
-        if (fsStoreProduct.getIsShow() ==1){
-            logger.info("商品上架:{}",fsStoreProduct.getProductName()+new Date());
+        if(ObjectUtils.isNotNull(fsStoreProduct.getIsShow())) {
+            if (fsStoreProduct.getIsShow() ==1){
+                logger.info("商品上架:{}",fsStoreProduct.getProductName()+new Date());
+            }
         }
 
-        if (fsStoreProduct.getIsDisplay() ==1){
-            logger.info("商品前端展示:{}",fsStoreProduct.getProductName()+new Date());
+        if(ObjectUtils.isNotNull(fsStoreProduct.getIsDisplay())) {
+            if (fsStoreProduct.getIsDisplay() ==1){
+                logger.info("商品前端展示:{}",fsStoreProduct.getProductName()+new Date());
+            }
         }
         return fsStoreProductService.addOrEdit(fsStoreProduct);
     }

+ 9 - 5
fs-service/src/main/resources/mapper/sop/QwSopMapper.xml

@@ -425,13 +425,17 @@
         FROM sop_user_logs log
         RIGHT JOIN qw_sop ON log.sop_id = qw_sop.id
         <where>
-        <![CDATA[
+            <![CDATA[
             log.start_time <= CURDATE()
+            ]]>
             AND log.status = 1
-            AND qw_sop.status in(2,3)
-            AND qw_sop.is_auto_sop = 1 AND log.start_time >= #{startDate}
-            AND log.start_time <= #{endDate}
-         ]]>
+            AND qw_sop.status in(2,3,6)
+            <if test="startDate!=null and endDate!=null">
+                <![CDATA[
+                AND log.start_time >= #{startDate}
+                AND log.start_time <= #{endDate}
+            ]]>
+            </if>
             <if test="companyId != null">
                 AND qw_sop.company_id = ${companyId}
             </if>

+ 20 - 12
fs-service/src/main/resources/mapper/sop/SopUserLogsMapper.xml

@@ -436,23 +436,31 @@
         </where>
     </select>
     <select id="querySopUserLogsByParam" resultType="com.fs.sop.domain.SopUserLogs">
-        <![CDATA[
         SELECT DISTINCT log.id as id,
-                        log.qw_user_id as qw_user_id,
-                        log.start_time as start_time,
-                        log.sop_id as sop_id
+        log.qw_user_id as qw_user_id,
+        log.start_time as start_time,
+        log.sop_id as sop_id
         FROM sop_user_logs log
-                 LEFT JOIN qw_sop ON log.sop_id = qw_sop.id
-        WHERE log.start_time <= CURDATE()
-          AND log.status = 1
-          AND qw_sop.status in(2,3)
-          AND (
-            (qw_sop.is_auto_sop = 1 AND log.start_time >= #{startDate}
+        LEFT JOIN qw_sop ON log.sop_id = qw_sop.id
+        <where>
+            <![CDATA[
+            log.start_time <= CURDATE()
+            ]]>
+            AND log.status = 1
+            AND qw_sop.status in(2,3)
+
+            <if test="startDate != null and endDate != null">
+                AND (
+                <![CDATA[
+                log.start_time >= #{startDate}
                 AND log.start_time <= #{endDate}
+            ]]>
+
                 )
-            )
+            </if>
+
+        </where>
         ORDER BY log.start_time DESC
-        ]]>
     </select>
 
     <select id="getSopUserLogsInfoById" resultType="com.fs.sop.domain.SopUserLogs">