|
@@ -227,36 +227,6 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean updateOperatingTempTag() {
|
|
|
- /*List<StudentCourseTimesDto> studentCourseTimesDtoList = courseScheduleStudentPaymentDao.queryStudentNotStartCourseTimesOfOnline();
|
|
|
- Map<Integer, StudentCourseTimesDto> map = studentCourseTimesDtoList.stream().collect(Collectors.toMap(StudentCourseTimesDto::getUserId, s -> s));
|
|
|
- //查询服务指标为0的用户
|
|
|
- List<Student> unlabeledStudentList = studentDao.queryByOperatingTempTag(0);
|
|
|
-
|
|
|
- List<Student> updateStudentList = new ArrayList<Student>();
|
|
|
- StudentCourseTimesDto dto = null;
|
|
|
- for (Student s : unlabeledStudentList) {
|
|
|
- if (s.getOperatingTag() == 1) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- dto = map.get(s.getUserId());
|
|
|
- if (dto != null) {
|
|
|
- if (dto.getTotalCourseTimes() > 0 && dto.getTotalCourseTimes() != dto.getFreePracticeCourseTimes()) {
|
|
|
- s.setOperatingTempTag(1);
|
|
|
- s.setOperatingTag(1);
|
|
|
- updateStudentList.add(s);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- List<Student> labeledStudentList = studentDao.queryByOperatingTempTag(1);
|
|
|
- for (Student s : labeledStudentList) {
|
|
|
- dto = map.get(s.getUserId());
|
|
|
- if (dto == null || dto.getTotalCourseTimes() == dto.getFreePracticeCourseTimes()) {
|
|
|
- s.setOperatingTempTag(0);
|
|
|
- s.setOperatingTag(0);
|
|
|
- updateStudentList.add(s);
|
|
|
- }
|
|
|
- }*/
|
|
|
String month = DateUtil.format(new Date(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
studentOperatingVisitDao.deleteByUserId(month);
|
|
|
List<Integer> operatingUserIds = studentDao.queryByOperatingTag(1);
|
|
@@ -268,6 +238,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
studentOperatingVisitDao.batchAdd(operatingUserIds,month);
|
|
|
}
|
|
|
}
|
|
|
+ //更新学员基本信息
|
|
|
return true;
|
|
|
}
|
|
|
|