Browse Source

fix: 部分优化

xdd 1 tháng trước cách đây
mục cha
commit
4f1a6a4380

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsStoreProduct.java

@@ -1,6 +1,9 @@
 package com.fs.store.domain;
 
 import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 import lombok.Data;
@@ -25,6 +28,7 @@ public class FsStoreProduct extends BaseEntity
     @Excel(name = "商品图片")
     private String image;
 
+    @TableField(strategy = FieldStrategy.IGNORED)
     private String video;
 
     /** 轮播图 */

+ 7 - 1
fs-service-system/src/main/java/com/fs/store/service/cache/impl/FsUserCourseCacheServiceImpl.java

@@ -35,6 +35,12 @@ public class FsUserCourseCacheServiceImpl implements IFsUserCourseCacheService {
         if(courseId == null) {
             return "-";
         }
-        return COURSE_ID_AND_NAME.get(courseId, e-> fsUserCourseService.selectFsUserCourseByCourseId(courseId).getCourseName());
+        return COURSE_ID_AND_NAME.get(courseId, e-> {
+            FsUserCourse course = fsUserCourseService.selectFsUserCourseByCourseId(courseId);
+            if(course == null) {
+                return "-";
+            }
+            return course.getCourseName();
+        });
     }
 }

+ 14 - 14
fs-service-system/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -538,28 +538,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND company_user_id = #{maps.companyUserId}
             </if>
             <if test= 'maps.sTime != null '>
-                and DATE(l.create_time) &gt;= DATE(#{maps.sTime})
+                and DATE(create_time) &gt;= DATE(#{maps.sTime})
             </if>
             <if test='maps.eTime != null '>
-                and DATE(l.create_time) &lt;= DATE(#{maps.eTime})
+                and DATE(create_time) &lt;= DATE(#{maps.eTime})
             </if>
             <if test= 'maps.scheduleStartTime != null '>
-                and DATE(l.camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
+                and DATE(camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
             </if>
             <if test='maps.scheduleEndTime != null '>
-                and DATE(l.camp_period_time) &lt;= DATE(#{maps.scheduleEndTime})
+                and DATE(camp_period_time) &lt;= DATE(#{maps.scheduleEndTime})
             </if>
             <if test= 'maps.upSTime != null '>
-                and DATE(l.update_time) &gt;= DATE(#{maps.upSTime})
+                and DATE(update_time) &gt;= DATE(#{maps.upSTime})
             </if>
             <if test='maps.upETime != null '>
-                and DATE(l.update_time) &lt;= DATE(#{maps.upETime})
+                and DATE(update_time) &lt;= DATE(#{maps.upETime})
             </if>
             <if test="maps.sourceType != null">
                 and send_type = #{maps.sourceType}
             </if>
             <if test="maps.sopIds != null and maps.sopIds.size() > 0">
-            and l.sop_id in
+            and sop_id in
                 AND sop_id IN
                 <foreach item="sopId" index="index" collection="maps.sopIds" open="(" separator="," close=")">
                     #{sopId}
@@ -593,28 +593,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND company_user_id = #{maps.companyUserId}
             </if>
             <if test= 'maps.sTime != null '>
-                and DATE(l.create_time) &gt;= DATE(#{maps.sTime})
+                and DATE(create_time) &gt;= DATE(#{maps.sTime})
             </if>
             <if test='maps.eTime != null '>
-                and DATE(l.create_time) &lt;= DATE(#{maps.eTime})
+                and DATE(create_time) &lt;= DATE(#{maps.eTime})
             </if>
             <if test= 'maps.scheduleStartTime != null '>
-                and DATE(l.camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
+                and DATE(camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
             </if>
             <if test='maps.scheduleEndTime != null '>
-                and DATE(l.camp_period_time) &lt;= DATE(#{maps.scheduleEndTime})
+                and DATE(camp_period_time) &lt;= DATE(#{maps.scheduleEndTime})
             </if>
             <if test= 'maps.upSTime != null '>
-                and DATE(l.update_time) &gt;= DATE(#{maps.upSTime})
+                and DATE(update_time) &gt;= DATE(#{maps.upSTime})
             </if>
             <if test='maps.upETime != null '>
-                and DATE(l.update_time) &lt;= DATE(#{maps.upETime})
+                and DATE(update_time) &lt;= DATE(#{maps.upETime})
             </if>
             <if test="maps.sourceType != null">
                 and send_type = #{maps.sourceType}
             </if>
             <if test="maps.sopIds != null and maps.sopIds.size() > 0">
-                and l.sop_id in
+                and sop_id in
                 AND sop_id IN
                 <foreach item="sopId" index="index" collection="maps.sopIds" open="(" separator="," close=")">
                     #{sopId}