定时用户课程过期修改
This commit is contained in:
@@ -19,6 +19,7 @@ public class CourseConsumer {
|
||||
@RabbitListener(queues = DelayQueueConfig.COURSE_QUEUE)
|
||||
public void courseConsumer(String userCourseBuyId) {
|
||||
UserCourseBuyEntity userCourseBuyEntity = userCourseBuyDao.selectById(userCourseBuyId);
|
||||
if (userCourseBuyEntity!=null){
|
||||
if (userCourseBuyEntity.getStartTime()==null) {
|
||||
//未开始学习,超过一年自动开始
|
||||
userCourseBuyEntity.setStartTime(DateUtils.addYears(userCourseBuyEntity.getCreateTime(),1));
|
||||
@@ -29,5 +30,6 @@ public class CourseConsumer {
|
||||
userCourseBuyDao.deleteById(userCourseBuyEntity.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user