From 01bc5cbcc972fcc1c122d0c141e7c9c5d2cbe5d7 Mon Sep 17 00:00:00 2001 From: tuyp Date: Thu, 1 Jun 2023 18:57:53 +0800 Subject: [PATCH] 补贴培训第一次上课 --- src/main/java/com/subsidy/jobs/DudaoJob.java | 23 ++++++++++++++++++----- src/main/java/com/subsidy/jobs/RenSheJuJob.java | 35 +++++++++++++++++++++++++++-------- src/main/java/com/subsidy/jobs/ShehuihuaJob.java | 63 +++++++++++++++++++++++++++++++++++++++------------------------ src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java | 1 + src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java | 2 +- src/main/resources/application.properties | 2 +- src/main/resources/mapper/ClassDictMapper.xml | 2 +- src/main/resources/mapper/DudaoMapper.xml | 20 ++++++++++---------- src/main/resources/mapper/OprAdmDictMapper.xml | 2 +- src/main/resources/mapper/OprMemDictMapper.xml | 2 +- src/main/resources/mapper/RenSheJuMapper.xml | 46 +++++++++++++++++++++++----------------------- src/main/resources/mapper/SignInRecordMapper.xml | 2 +- 12 files changed, 124 insertions(+), 76 deletions(-) diff --git a/src/main/java/com/subsidy/jobs/DudaoJob.java b/src/main/java/com/subsidy/jobs/DudaoJob.java index bfb0a59..67e87ad 100644 --- a/src/main/java/com/subsidy/jobs/DudaoJob.java +++ b/src/main/java/com/subsidy/jobs/DudaoJob.java @@ -2,6 +2,7 @@ // //import com.subsidy.service.DudaoService; //import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; //import org.springframework.scheduling.annotation.Scheduled; //import org.springframework.stereotype.Component; // @@ -13,33 +14,45 @@ //@Component //public class DudaoJob { // +// @Value("${spring.profiles.active}") +// private String env; // // @Autowired // private DudaoService dudaoService; // // @Scheduled(cron = "0 0 2 * * ?") // public void classBaseInfo() throws IOException { -// dudaoService.classBaseInfo(); +// if ("prod".equals(env)){ +// dudaoService.classBaseInfo(); +// } // } // // @Scheduled(cron = "0 5 2 * * ?") // public void classHourBehavior() throws IOException { -// dudaoService.classHourBehavior(); +// if ("prod".equals(env)){ +// dudaoService.classHourBehavior(); +// } // } // // @Scheduled(cron = "0 10 2 * * ?") // public void uploadChapterBehavior() throws IOException { -// dudaoService.uploadChapterBehavior(); +// if ("prod".equals(env)){ +// dudaoService.uploadChapterBehavior(); +// } // } // // @Scheduled(cron = "0 15 2 * * ?") // public void uploadClassAnswerQuestionBehavior() throws IOException { -// dudaoService.uploadClassAnswerQuestionBehavior(); +// if ("prod".equals(env)){ +// dudaoService.uploadClassAnswerQuestionBehavior(); +// } // } // // @Scheduled(cron = "0 20 2 * * ?") // public void uploadClassCode()throws IOException { -// dudaoService.uploadClassCode(); +// if ("prod".equals(env)){ +// dudaoService.uploadClassCode(); +// } // } // //} diff --git a/src/main/java/com/subsidy/jobs/RenSheJuJob.java b/src/main/java/com/subsidy/jobs/RenSheJuJob.java index 4c7041b..71f62d0 100644 --- a/src/main/java/com/subsidy/jobs/RenSheJuJob.java +++ b/src/main/java/com/subsidy/jobs/RenSheJuJob.java @@ -9,6 +9,7 @@ import com.subsidy.util.IpAddressUtil; import com.subsidy.util.websocket.WebSocketUtil; import com.subsidy.vo.opr.InsertLastStudyRecordVO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -35,12 +36,18 @@ public class RenSheJuJob { @Autowired private OprMemDictMapper oprMemDictMapper; + @Value("${spring.profiles.active}") + private String env; + + /** * POST-2:班级基本信息信息采集接口 */ @Scheduled(cron = "0 0 1 * * ?") public void classBaseInfo() throws IOException { - renSheJuService.classBaseInfo(); + if ("prod".equals(env)){ + renSheJuService.classBaseInfo(); + } } /** @@ -48,7 +55,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 5 1 * * ?") public void classHourBehavior() throws IOException { - renSheJuService.classHourBehavior(); + if ("prod".equals(env)){ + renSheJuService.classHourBehavior(); + } } /** @@ -56,7 +65,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 10 1 * * ?") public void uploadChapterBehavior() throws IOException { - renSheJuService.uploadChapterBehavior(); + if ("prod".equals(env)){ + renSheJuService.uploadChapterBehavior(); + } } /** @@ -64,7 +75,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 15 1 * * ?") public void uploadClassAnswerQuestionBehavior() throws IOException { - renSheJuService.uploadClassAnswerQuestionBehavior(); + if ("prod".equals(env)){ + renSheJuService.uploadClassAnswerQuestionBehavior(); + } } /** @@ -72,7 +85,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 20 1 * * ?") public void uploadImage() throws IOException { - renSheJuService.uploadImage(); + if ("prod".equals(env)){ + renSheJuService.uploadImage(); + } } /** @@ -80,7 +95,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 25 1 * * ?") public void getClassCodeByPrivateKey() throws IOException { - renSheJuService.getClassCodeByPrivateKey(); + if ("prod".equals(env)){ + renSheJuService.getClassCodeByPrivateKey(); + } } /** @@ -88,7 +105,9 @@ public class RenSheJuJob { */ @Scheduled(cron = "0 30 1 * * ?") public void uploadClassCode() throws IOException { - renSheJuService.uploadClassCode(); + if ("prod".equals(env)){ + renSheJuService.uploadClassCode(); + } } // /** @@ -121,7 +140,7 @@ public class RenSheJuJob { } - @Scheduled(cron = "00 55 23 * * ?") + @Scheduled(cron = "00 50 18 * * ?") @Transactional(rollbackFor = Exception.class) public void cancelLogin() { diff --git a/src/main/java/com/subsidy/jobs/ShehuihuaJob.java b/src/main/java/com/subsidy/jobs/ShehuihuaJob.java index 7c850e1..59773a1 100644 --- a/src/main/java/com/subsidy/jobs/ShehuihuaJob.java +++ b/src/main/java/com/subsidy/jobs/ShehuihuaJob.java @@ -1,19 +1,22 @@ -package com.subsidy.jobs; - -import com.subsidy.service.ShehuihuaService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import java.io.IOException; - -/**` - * 社会化、学徒制数据推送 - */ -@Component -public class ShehuihuaJob { - - +//package com.subsidy.jobs; +// +//import com.subsidy.service.ShehuihuaService; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.scheduling.annotation.Scheduled; +//import org.springframework.stereotype.Component; +// +//import java.io.IOException; +// +///**` +// * 社会化、学徒制数据推送 +// */ +//@Component +//public class ShehuihuaJob { +// +// @Value("${spring.profiles.active}") +// private String env; +// // @Autowired // private ShehuihuaService shehuihuaService; // @@ -22,7 +25,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 0 2 * * ?") // public void getClassCodeByPrivateKey()throws IOException { -// shehuihuaService.getClassCodeByPrivateKey(); +// if ("prod".equals(env)){ +// shehuihuaService.getClassCodeByPrivateKey(); +// } // } // // /** @@ -30,7 +35,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 5 2 * * ?") // public void uploadClass() throws IOException { -// shehuihuaService.uploadClass(); +// if ("prod".equals(env)){ +// shehuihuaService.uploadClass(); +// } // } // // /** @@ -38,7 +45,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 10 2 * * ?") // public void classHourBehavior() throws IOException { -// shehuihuaService.classHourBehavior(); +// if ("prod".equals(env)){ +// shehuihuaService.classHourBehavior(); +// } // } // // /** @@ -46,7 +55,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 15 2 * * ?") // public void uploadChapterBehavior() throws IOException { -// shehuihuaService.uploadChapterBehavior(); +// if ("prod".equals(env)){ +// shehuihuaService.uploadChapterBehavior(); +// } // } // // /** @@ -54,7 +65,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 20 2 * * ?") // public void uploadClassAnswerQuestionBehavior()throws IOException { -// shehuihuaService.uploadClassAnswerQuestionBehavior(); +// if ("prod".equals(env)){ +// shehuihuaService.uploadClassAnswerQuestionBehavior(); +// } // } // // /** @@ -62,7 +75,9 @@ public class ShehuihuaJob { // */ // @Scheduled(cron = "0 25 2 * * ?") // public void uploadImage()throws IOException { -// shehuihuaService.uploadImage(); +// if ("prod".equals(env)){ +// shehuihuaService.uploadImage(); +// } // } - -} +// +//} diff --git a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java index 09bbeab..7b20d9d 100644 --- a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java @@ -122,6 +122,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { } renshejuHistoryMapper.insert(renshejuHistoryDO); return rensheResponseVO; +// return null; } else { RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_2); diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index cbb7da3..02122fb 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -633,7 +633,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl testPlays(VodPlayHistoryDO vodPlayHistoryDO) { - String classIds = "400"; + String classIds = "402"; String[] classIdArr = classIds.split(","); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 71c7dba..cc0c047 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 -spring.profiles.active=dev +spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100 diff --git a/src/main/resources/mapper/ClassDictMapper.xml b/src/main/resources/mapper/ClassDictMapper.xml index 610ac7d..ec0bc71 100644 --- a/src/main/resources/mapper/ClassDictMapper.xml +++ b/src/main/resources/mapper/ClassDictMapper.xml @@ -256,7 +256,7 @@ FROM vod_play_history t1 WHERE - DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL diff --git a/src/main/resources/mapper/DudaoMapper.xml b/src/main/resources/mapper/DudaoMapper.xml index 7125819..2ea1aa2 100644 --- a/src/main/resources/mapper/DudaoMapper.xml +++ b/src/main/resources/mapper/DudaoMapper.xml @@ -22,7 +22,7 @@ FROM vod_play_history t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id LEFT JOIN company_dict t3 ON t.company_id = t3.id @@ -43,7 +43,7 @@ FROM exercise_done_result t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id LEFT JOIN company_dict t3 ON t.company_id = t3.id @@ -64,7 +64,7 @@ FROM answering_question t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id LEFT JOIN company_dict t3 ON t.company_id = t3.id @@ -85,7 +85,7 @@ FROM image_check_record t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL AND t.result = 1 ) t2 ON t.id = t2.class_id @@ -117,7 +117,7 @@ FROM vod_play_history t1 WHERE - DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL GROUP BY @@ -140,7 +140,7 @@ FROM opr_mem_dict t1 WHERE - DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL AND opr_type = "登出" @@ -155,7 +155,7 @@ FROM opr_mem_dict t1 WHERE - DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL AND opr_type = "登录" @@ -179,7 +179,7 @@ WHERE t1.delete_date IS NULL AND t2.class_type = #{classType} - AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( + AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) @@ -200,7 +200,7 @@ LEFT JOIN member t3 ON t1.ask_id = t3.id LEFT JOIN company_dict t4 ON t2.company_id = t4.id WHERE - DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.update_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL AND t2.delete_date IS NULL @@ -216,7 +216,7 @@ class_dict t1 LEFT JOIN company_dict t3 ON t1.company_id = t3.id WHERE - DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL and t1.class_code is not NULL diff --git a/src/main/resources/mapper/OprAdmDictMapper.xml b/src/main/resources/mapper/OprAdmDictMapper.xml index 4c8bc7b..eae979a 100644 --- a/src/main/resources/mapper/OprAdmDictMapper.xml +++ b/src/main/resources/mapper/OprAdmDictMapper.xml @@ -70,7 +70,7 @@ FROM opr_adm_dict WHERE - create_date < (NOW() -interval 1 day) + create_date < (NOW() -interval 0 day) diff --git a/src/main/resources/mapper/OprMemDictMapper.xml b/src/main/resources/mapper/OprMemDictMapper.xml index 92e8ffd..6db07b8 100644 --- a/src/main/resources/mapper/OprMemDictMapper.xml +++ b/src/main/resources/mapper/OprMemDictMapper.xml @@ -52,7 +52,7 @@ FROM opr_mem_dict WHERE - create_date < (NOW() -interval 1 day) + create_date < (NOW() -interval 0 day) @@ -346,7 +346,7 @@ exercise_done_result t1 WHERE t1.delete_date IS NULL - AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND class_id = #{classId} AND member_id = #{memberId} @@ -377,7 +377,7 @@ LEFT JOIN class_dict t2 ON t1.class_id = t2.id LEFT JOIN member t3 ON t1.ask_id = t3.id WHERE - DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t1.update_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.delete_date IS NULL AND t2.delete_date IS NULL AND t3.delete_date IS NULL @@ -392,7 +392,7 @@ left join class_dict t2 on t.class_id = t2.id WHERE t.delete_date IS NULL - AND DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( + AND DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) @@ -418,7 +418,7 @@ class_id = #{classId} AND t1.delete_date IS NULL and t2.delete_date is null - AND DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( + AND DATE_FORMAT( DATE_ADD( t1.update_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) @@ -437,7 +437,7 @@ LEFT JOIN member t2 ON t1.member_id = t2.id WHERE class_id = #{classId} - AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.paper_id IS NOT NULL AND t1.result = 1 @@ -457,7 +457,7 @@ WHERE t1.delete_date is null and class_id = #{classId} - AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t1.paper_id IS NULL AND t1.result = 1 and t1.member_id @@ -480,7 +480,7 @@ LEFT JOIN member t2 ON t1.member_id = t2.id WHERE t1.delete_date is null - AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) and class_id = #{classId} AND t1.paper_id IS not NULL AND t1.result = 1 @@ -500,7 +500,7 @@ FROM vod_play_history t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id WHERE @@ -519,7 +519,7 @@ FROM exercise_done_result t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id WHERE @@ -538,7 +538,7 @@ FROM answering_question t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL ) t2 ON t.id = t2.class_id WHERE @@ -557,7 +557,7 @@ FROM image_check_record t WHERE - DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) + DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND t.delete_date IS NULL AND t.result = 1 ) t2 ON t.id = t2.class_id diff --git a/src/main/resources/mapper/SignInRecordMapper.xml b/src/main/resources/mapper/SignInRecordMapper.xml index 99f6940..38951e0 100644 --- a/src/main/resources/mapper/SignInRecordMapper.xml +++ b/src/main/resources/mapper/SignInRecordMapper.xml @@ -55,7 +55,7 @@ delete_date IS NULL AND date(sign_in_date) = date_sub( curdate(), - interval 1 day) + interval 0 day) -- libgit2 0.25.0