소스 검색

1、服务指标逻辑调整;
2、本周应布置课外训练推送;

Joburgess 5 년 전
부모
커밋
0191b8dcc9

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.enums.GroupType;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -79,7 +80,8 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
      * @param monday:
      * @return java.util.List<com.ym.mec.biz.dal.dto.StudentServeDto>
      */
-    List<StudentServeDto> getBeServiceStudents(@Param("monday") String monday);
+    List<StudentServeDto> getBeServiceStudents(@Param("monday") String monday,
+                                               @Param("courseExpireDate")Date courseExpireDate);
 
     /**
      * @describe 更新指定学员的服务指标或运营指标

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServeServiceImpl.java

@@ -61,7 +61,7 @@ public class StudentServeServiceImpl implements StudentServeService {
         LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
         Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
 
-        List<StudentServeDto> serviceStudents = studentDao.getBeServiceStudents(monDayDate.toString());
+        List<StudentServeDto> serviceStudents = studentDao.getBeServiceStudents(monDayDate.toString(), !sunDayDate.isAfter(LocalDate.now())?new Date():nextMonday);
         if(CollectionUtils.isEmpty(serviceStudents)){
             return;
         }

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -395,7 +395,7 @@
             s.teacher_id_,
             cs.group_type_,
             cs.teach_mode_,
-            IF(CONCAT( cs.class_date_, ' ', cs.end_class_time_ )&lt;NOW() AND (sa.status_ != 'NORMAL' OR sa.status_ IS NULL), NULL, cs.class_date_) course_start_time_
+            IF(CONCAT( cs.class_date_, ' ', cs.end_class_time_ )&lt;#{courseExpireDate} AND (sa.status_ != 'NORMAL' OR sa.status_ IS NULL), NULL, cs.class_date_) course_start_time_
         FROM
             student s
             LEFT JOIN course_schedule_student_payment cssp ON cssp.user_id_ = s.user_id_