Przeglądaj źródła

看课记录查询修改 营期 创建时间 更新时间 任意可以查询

xgb 1 tydzień temu
rodzic
commit
a3f6fdf6fe

+ 4 - 2
fs-service/src/main/java/com/fs/course/service/impl/FsCourseWatchLogServiceImpl.java

@@ -645,8 +645,10 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
     public List<FsCourseWatchLogListVO> selectFsCourseWatchLogListVO(FsCourseWatchLogListParam param) {
 
         // 因为selectFsCourseWatchLogListVO 这个方法中查询了看课日志记录表 需要限制创建时间必传
-        if(StringUtils.isEmpty(param.getSTime()) || StringUtils.isEmpty(param.getETime())){
-            throw new RuntimeException("请输入创建时间");
+        if((StringUtils.isEmpty(param.getSTime()) || StringUtils.isEmpty(param.getETime())) &&
+                (StringUtils.isEmpty(param.getUpSTime()) || StringUtils.isEmpty(param.getUpETime())) &&
+                (StringUtils.isEmpty(param.getScheduleEndTime()) || StringUtils.isEmpty(param.getScheduleStartTime()))){
+            throw new RuntimeException("请输入创建时间或营期时间或更新时间其中一个");
         }
 
         // 待看课-未注册

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

@@ -128,16 +128,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and l.create_time &lt;= #{maps.eTime}
             </if>
             <if test= 'maps.scheduleStartTime != null '>
-                and DATE(l.camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
+                and l.camp_period_time &gt;= #{maps.scheduleStartTime}
             </if>
             <if test='maps.scheduleEndTime != null '>
-                and DATE(l.camp_period_time) &lt;= DATE(#{maps.scheduleEndTime})
+                and l.camp_period_time &lt;= #{maps.scheduleEndTime}
             </if>
             <if test= 'maps.upSTime != null '>
-                and DATE(l.update_time) &gt;= DATE(#{maps.upSTime})
+                and l.update_time &gt;= #{maps.upSTime}
             </if>
             <if test='maps.upETime != null '>
-                and DATE(l.update_time) &lt;= DATE(#{maps.upETime})
+                and l.update_time &lt;= #{maps.upETime}
             </if>
             <if test="maps.sopIds != null and maps.sopIds.size() > 0">
                 and l.sop_id in