|
@@ -5,14 +5,9 @@ import com.ym.mec.biz.dal.entity.CourseScheduleStatistics;
|
|
|
import com.ym.mec.biz.service.CourseScheduleStatisticsService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
-import com.ym.mec.util.date.DateUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.redisson.api.RBucket;
|
|
|
-import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Service
|
|
@@ -20,8 +15,6 @@ public class CourseScheduleStatisticsServiceImpl extends BaseServiceImpl<Long, C
|
|
|
|
|
|
@Autowired
|
|
|
private CourseScheduleStatisticsDao courseScheduleStatisticsDao;
|
|
|
- @Autowired
|
|
|
- private RedissonClient redissonClient;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, CourseScheduleStatistics> getDAO() {
|
|
@@ -29,36 +22,7 @@ public class CourseScheduleStatisticsServiceImpl extends BaseServiceImpl<Long, C
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void init(List<Long> courseScheduleIds) {
|
|
|
- String bucketKey = "CourseScheduleStatistics:updateTime";
|
|
|
- RBucket<String> bucket = redissonClient.getBucket(bucketKey);
|
|
|
- String updateTime = bucket.get();
|
|
|
- Date date = new Date();
|
|
|
- if(StringUtils.isEmpty(updateTime)){
|
|
|
- updateTime = DateUtil.format(DateUtil.addHours(date,1),DateUtil.EXPANDED_DATE_TIME_FORMAT);
|
|
|
- }
|
|
|
- //获取修改时间在指定时间之后的课程列表
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void syncStudentNum(List<Long> courseScheduleIds) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void syncAttendance(List<Long> courseScheduleIds) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void syncHomework(List<Long> courseScheduleIds) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void syncServiceTar(List<Long> courseScheduleIds) {
|
|
|
-
|
|
|
+ public void courseScheduleStatistics() {
|
|
|
+ List<CourseScheduleStatistics> updateCourseScheduleStatisticsList = courseScheduleStatisticsDao.queryUpdateCourseScheduleStatistics();
|
|
|
}
|
|
|
}
|