fix copy bug

This commit is contained in:
limqhz
2022-02-21 11:37:37 +08:00
parent a71b8c0d44
commit 276aa88269
4 changed files with 9 additions and 6 deletions

View File

@@ -43,8 +43,8 @@ public class CopyLessonTask {
@Scheduled(cron = "0 */1 * * * ?")
public void execute(){
logger.info("开始执行拷贝课程批处理");
LocalTime time = LocalTime.now();
LocalDate date = LocalDate.now();
LocalTime time = LocalTime.parse("09:00");
LocalDate date = LocalDate.parse("2022-02-21");
logger.info(time.toString());
logger.info(date.toString());
int cWeek = date.getDayOfWeek().getValue();
@@ -59,7 +59,7 @@ public class CopyLessonTask {
LocalDate endDate = date.plusDays(-1);
String startTime = dtf.format(startDate);
String endTime = dtf.format(endDate);
List<VenueLesson> allForCopy = venueLessonService.findAllForCopy(startTime, endTime);
List<VenueLesson> allForCopy = venueLessonService.findAllForCopy(startTime, endTime,venue.getId());
if (allForCopy!= null && allForCopy.size()>0){
logger.info("需要操作的课程数为:" + allForCopy.size());
Integer copyTarget = venue.getCopyTarget();