fix copy bug & add 拷贝开关字段 1-开启 不拷贝 不是1抽取到的都拷贝(空或者0 都拷贝)

This commit is contained in:
limqhz
2022-02-21 14:41:09 +08:00
parent 0e4a271200
commit 348121af3a
8 changed files with 48 additions and 16 deletions

View File

@@ -40,18 +40,18 @@ public class CopyLessonTask {
/**
* 每周一九点
*/
// @Scheduled(cron = "0 */1 * * * ?")
@Scheduled(cron = "0 */1 * * * ?")
public void execute(){
logger.info("开始执行拷贝课程批处理");
LocalTime time = LocalTime.parse("09:00");
LocalDate date = LocalDate.parse("2022-02-21");
LocalTime time = LocalTime.now();
LocalDate date = LocalDate.now();
logger.info(time.toString());
logger.info(date.toString());
int cWeek = date.getDayOfWeek().getValue();
List<Venue> venueList = venueService.findAlls();
for (Venue venue : venueList) {
if (VenueTypeEnum.BASKETBALL.value != venue.getType()
&& venue.getCopyWeek() != null && cWeek == venue.getCopyWeek()){
&& venue.getCopyWeek() != null && cWeek == venue.getCopyWeek() && !"1".equals(venue.getCopyControl())){
// 非篮球馆有课程
LocalTime copyTime = venue.getCopyTime();
if (checkTime(time,copyTime)){

View File

@@ -3,9 +3,9 @@ spring:
# url: jdbc:mysql://yingdiandian.mysql.rds.aliyuncs.com:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8
# username: yingdd
# password: Yingdd2015
url: jdbc:mysql://120.27.209.4:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8&useAffectedRows=true
url: jdbc:mysql://127.0.0.1:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8&useAffectedRows=true
username: root
password: hyty1234
password: 123456
redis:
host: 127.0.0.1
password:

View File

@@ -3,7 +3,7 @@ spring:
# url: jdbc:mysql://yingdiandian.mysql.rds.aliyuncs.com:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8
# username: yingdd
# password: Yingdd2015
url: jdbc:mysql://120.27.209.4:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8&useAffectedRows=true
url: jdbc:mysql://127.0.0.1:3306/smart_venue?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8&useAffectedRows=true
username: root
password: 123456
redis: