Browse Source

Merge remote-tracking branch 'origin/master'

liweifan 3 năm trước cách đây
mục cha
commit
da90d4bd3a

+ 5 - 5
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -994,7 +994,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             throw new BizException("订单不存在!");
         }
 
-        //lock_改为0,课程&组状态改为ING
+        //lock_改为0,课程组状态改为ING
         List<Long> scheduleIds = paymentList.stream().map(CourseScheduleStudentPayment::getCourseId).collect(Collectors.toList());
         baseMapper.updateLock(scheduleIds);
         UpdateWrapper<CourseGroup> warp = new UpdateWrapper<>();
@@ -1392,10 +1392,10 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
                     .in(CourseSchedule::getStatus, statusList)
                     .gt(CourseSchedule::getClassDate, DateUtil.getNowStr()));
 
-            if (CollectionUtils.isEmpty(scheduleList)) {//无人购课直接跳出本次循环
-                idList.add(freeTimeConfig.getTeacherId());
-                continue;
-            }
+//            if (CollectionUtils.isEmpty(scheduleList)) {//无人购课直接跳出本次循环
+//                idList.add(freeTimeConfig.getTeacherId());
+//                continue;
+//            }
 
             //获取一周配置格式化
             List<DateVo> monday = JSONObject.parseArray(freeTimeConfig.getMonday(), DateVo.class);

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -399,7 +399,7 @@
         AND p.subject_id_=#{param.subjectId}) sp ON t.user_id_=sp.teacherId
 
         WHERE t.user_id_ IN (SELECT teacher_id_ FROM teacher_free_time GROUP BY teacher_id_)
-        <if test="param.teacherIdList !=null">
+        <if test="param.teacherIdList != null and param.teacherIdList.size>0">
             AND t.user_id_ IN
             <foreach collection="param.teacherIdList" item="item" open="(" separator="," close=")">
                 #{item}
@@ -514,7 +514,7 @@
     </insert>
 
     <update id="updateLock" parameterType="java.util.List">
-        UPDATE course_schedule SET lock_ = 0,status_='ING' WHERE id_ IN
+        UPDATE course_schedule SET lock_ = 0 WHERE id_ IN
         <foreach collection="list" item="item" open="(" separator="," close=")">
             #{item}
         </foreach>