From 157fb021709f47fa669ceed98f2560ca98ec74d8 Mon Sep 17 00:00:00 2001 From: tuyp Date: Fri, 17 Jul 2026 15:40:20 +0800 Subject: [PATCH] 春节备份 --- src/main/java/com/subsidy/common/configure/WebLogAspect.java | 4 ++-- src/main/java/com/subsidy/controller/OssController.java | 4 ++-- src/main/java/com/subsidy/controller/SignInRecordController.java | 2 +- src/main/java/com/subsidy/jobs/DudaoJob.java | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------- src/main/java/com/subsidy/jobs/PushJob.java | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------- src/main/java/com/subsidy/jobs/RenSheJuJob.java | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------- src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java | 2 ++ src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java | 8 ++++---- src/main/java/com/subsidy/service/impl/MemberServiceImpl.java | 2 +- src/main/java/com/subsidy/util/ConstantUtils.java | 4 ++-- src/main/java/com/subsidy/util/OSSUtils.java | 4 ++-- src/main/java/com/subsidy/util/VodUtil.java | 1 + src/main/resources/application-dev.properties | 26 +++++++++++++------------- src/main/resources/application-prod.properties | 3 ++- src/main/resources/application.properties | 4 ++-- src/main/resources/mapper/DudaoMapper.xml | 2 +- src/main/resources/mapper/MemberMapper.xml | 5 ++--- src/main/resources/mapper/OprMemDictMapper.xml | 6 +++--- src/main/resources/mapper/SignInRecordMapper.xml | 2 +- 19 files changed, 234 insertions(+), 231 deletions(-) diff --git a/src/main/java/com/subsidy/common/configure/WebLogAspect.java b/src/main/java/com/subsidy/common/configure/WebLogAspect.java index ebfe688..e3eff47 100644 --- a/src/main/java/com/subsidy/common/configure/WebLogAspect.java +++ b/src/main/java/com/subsidy/common/configure/WebLogAspect.java @@ -30,9 +30,9 @@ public class WebLogAspect { public void logBeforeController(JoinPoint joinPoint) { -// RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); + RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); //这个RequestContextHolder是Springmvc提供来获得请求的东西 -// HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest(); + HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest(); // 记录下请求内容 // logger.info("####requestUrl : " + request.getRequestURL().toString()); diff --git a/src/main/java/com/subsidy/controller/OssController.java b/src/main/java/com/subsidy/controller/OssController.java index 8eefa3e..8db2840 100644 --- a/src/main/java/com/subsidy/controller/OssController.java +++ b/src/main/java/com/subsidy/controller/OssController.java @@ -29,10 +29,10 @@ import java.util.List; @RequestMapping("/oss") public class OssController { - public static final String keyId = "LTAI5tPAH7P7WQVeowo517BE"; + public static final String keyId = "LTAI5tLUBG4B6QxhHrhddc7p"; - public static final String secret = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + public static final String secret = "eber38QGHZixTQ6bFfrd80kbg67jIP"; @Value("${spring.profiles.active}") diff --git a/src/main/java/com/subsidy/controller/SignInRecordController.java b/src/main/java/com/subsidy/controller/SignInRecordController.java index bd4cc92..7be3411 100644 --- a/src/main/java/com/subsidy/controller/SignInRecordController.java +++ b/src/main/java/com/subsidy/controller/SignInRecordController.java @@ -62,7 +62,7 @@ public class SignInRecordController { @PostMapping("signInStatus") @ApiOperation("判断学生当天有没有打卡 {memberId 学生id}") -// @LoginRequired + @LoginRequired @TimeRequired public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO) { return ResponseData.generateCreatedResponse(0, signInRecordService.signInStatus(signInRecordDO)); diff --git a/src/main/java/com/subsidy/jobs/DudaoJob.java b/src/main/java/com/subsidy/jobs/DudaoJob.java index 936af5b..67e87ad 100644 --- a/src/main/java/com/subsidy/jobs/DudaoJob.java +++ b/src/main/java/com/subsidy/jobs/DudaoJob.java @@ -1,58 +1,58 @@ -package com.subsidy.jobs; - -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; - -import java.io.IOException; - -/** - * 企业职工线上培训 - */ -@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 { - if ("prod".equals(env)){ - dudaoService.classBaseInfo(); - } - } - - @Scheduled(cron = "0 5 2 * * ?") - public void classHourBehavior() throws IOException { - if ("prod".equals(env)){ - dudaoService.classHourBehavior(); - } - } - - @Scheduled(cron = "0 10 2 * * ?") - public void uploadChapterBehavior() throws IOException { - if ("prod".equals(env)){ - dudaoService.uploadChapterBehavior(); - } - } - - @Scheduled(cron = "0 15 2 * * ?") - public void uploadClassAnswerQuestionBehavior() throws IOException { - if ("prod".equals(env)){ - dudaoService.uploadClassAnswerQuestionBehavior(); - } - } - - @Scheduled(cron = "0 20 2 * * ?") - public void uploadClassCode()throws IOException { - if ("prod".equals(env)){ - dudaoService.uploadClassCode(); - } - } - -} +//package com.subsidy.jobs; +// +//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; +// +//import java.io.IOException; +// +///** +// * 企业职工线上培训 +// */ +//@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 { +// if ("prod".equals(env)){ +// dudaoService.classBaseInfo(); +// } +// } +// +// @Scheduled(cron = "0 5 2 * * ?") +// public void classHourBehavior() throws IOException { +// if ("prod".equals(env)){ +// dudaoService.classHourBehavior(); +// } +// } +// +// @Scheduled(cron = "0 10 2 * * ?") +// public void uploadChapterBehavior() throws IOException { +// if ("prod".equals(env)){ +// dudaoService.uploadChapterBehavior(); +// } +// } +// +// @Scheduled(cron = "0 15 2 * * ?") +// public void uploadClassAnswerQuestionBehavior() throws IOException { +// if ("prod".equals(env)){ +// dudaoService.uploadClassAnswerQuestionBehavior(); +// } +// } +// +// @Scheduled(cron = "0 20 2 * * ?") +// public void uploadClassCode()throws IOException { +// if ("prod".equals(env)){ +// dudaoService.uploadClassCode(); +// } +// } +// +//} diff --git a/src/main/java/com/subsidy/jobs/PushJob.java b/src/main/java/com/subsidy/jobs/PushJob.java index a401302..245e20a 100644 --- a/src/main/java/com/subsidy/jobs/PushJob.java +++ b/src/main/java/com/subsidy/jobs/PushJob.java @@ -1,77 +1,77 @@ -package com.subsidy.jobs; - -import com.subsidy.service.PushDataService; -import com.subsidy.service.impl.PushDataServiceImpl; -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 PushJob { - - @Value("${spring.profiles.active}") - private String env; - - @Autowired - private PushDataService pushDataService; - - /** - * POST-4:学时 - */ - @Scheduled(cron = "0 0 4 * * ?") - public void post4() throws IOException { - if ("prod".equals(env)) { - pushDataService.post4(); - } - } - - /** - * POST-5: 考试 - */ - @Scheduled(cron = "0 10 4 * * ?") - public void post5() throws IOException { - if ("prod".equals(env)) { - pushDataService.post5(); - } - } - - /** - * POST-6: 答疑 - */ - @Scheduled(cron = "0 20 4 * * ?") - public void post6() throws IOException { - if ("prod".equals(env)) { - pushDataService.post6(); - } - } - - /** - * POST-7:人脸 - */ - @Scheduled(cron = "0 30 4 * * ?") - public void post7() throws IOException { - if ("prod".equals(env)) { - pushDataService.post7(); - } - } - - - /** - * 定时发短信 - */ - @Scheduled(cron = "0 0 9 * * ?") - public void sendWarning(){ - pushDataService.sendWarning(); - } - - - - - -} +//package com.subsidy.jobs; +// +//import com.subsidy.service.PushDataService; +//import com.subsidy.service.impl.PushDataServiceImpl; +//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 PushJob { +// +// @Value("${spring.profiles.active}") +// private String env; +// +// @Autowired +// private PushDataService pushDataService; +// +// /** +// * POST-4:学时 +// */ +// @Scheduled(cron = "0 0 4 * * ?") +// public void post4() throws IOException { +// if ("prod".equals(env)) { +// pushDataService.post4(); +// } +// } +// +// /** +// * POST-5: 考试 +// */ +// @Scheduled(cron = "0 10 4 * * ?") +// public void post5() throws IOException { +// if ("prod".equals(env)) { +// pushDataService.post5(); +// } +// } +// +// /** +// * POST-6: 答疑 +// */ +// @Scheduled(cron = "0 20 4 * * ?") +// public void post6() throws IOException { +// if ("prod".equals(env)) { +// pushDataService.post6(); +// } +// } +// +// /** +// * POST-7:人脸 +// */ +// @Scheduled(cron = "0 30 4 * * ?") +// public void post7() throws IOException { +// if ("prod".equals(env)) { +// pushDataService.post7(); +// } +// } +// +// +// /** +// * 定时发短信 +// */ +// @Scheduled(cron = "0 0 9 * * ?") +// public void sendWarning(){ +// pushDataService.sendWarning(); +// } +// +// +// +// +// +//} diff --git a/src/main/java/com/subsidy/jobs/RenSheJuJob.java b/src/main/java/com/subsidy/jobs/RenSheJuJob.java index c396f67..113febf 100644 --- a/src/main/java/com/subsidy/jobs/RenSheJuJob.java +++ b/src/main/java/com/subsidy/jobs/RenSheJuJob.java @@ -64,65 +64,65 @@ public class RenSheJuJob { private String env; - /** -// * POST-3:班级基本信息信息采集接口 +// /** +//// * POST-3:班级基本信息信息采集接口 +//// */ +// @Scheduled(cron = "0 0 1 * * ?") +// public void classBaseInfo() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.classBaseInfo(); +// } +// } +// +// /** +// * POST-4:学时信息采集接口 // */ - @Scheduled(cron = "0 0 1 * * ?") - public void classBaseInfo() throws IOException { - if ("prod".equals(env)) { - renSheJuService.classBaseInfo(); - } - } - - /** - * POST-4:学时信息采集接口 - */ - @Scheduled(cron = "0 5 1 * * ?") - public void classHourBehavior() throws IOException { - if ("prod".equals(env)) { - renSheJuService.classHourBehavior(); - } - } - - /** - * POST-5:考试信息采集接口 - */ - @Scheduled(cron = "0 10 1 * * ?") - public void uploadChapterBehavior() throws IOException { - if ("prod".equals(env)) { - renSheJuService.uploadChapterBehavior(); - } - } - - /** - * POST-6:答疑辅导采集接口 - */ - @Scheduled(cron = "0 15 1 * * ?") - public void uploadClassAnswerQuestionBehavior() throws IOException { - if ("prod".equals(env)) { - renSheJuService.uploadClassAnswerQuestionBehavior(); - } - } - - /** - * POST-7 班级活跃度/实名认证照片信息采集接口 - */ - @Scheduled(cron = "0 20 1 * * ?") - public void uploadImage() throws IOException { - if ("prod".equals(env)) { - renSheJuService.uploadImage(); - } - } - - /** - * POST-8 获取培训待绑定的(班级编号,项目编号)列表 - */ - @Scheduled(cron = "0 25 1 * * ?") - public void getClassCodeByPrivateKey() throws IOException { - if ("prod".equals(env)) { - renSheJuService.getClassCodeByPrivateKey(); - } - } +// @Scheduled(cron = "0 5 1 * * ?") +// public void classHourBehavior() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.classHourBehavior(); +// } +// } +// +// /** +// * POST-5:考试信息采集接口 +// */ +// @Scheduled(cron = "0 10 1 * * ?") +// public void uploadChapterBehavior() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.uploadChapterBehavior(); +// } +// } +// +// /** +// * POST-6:答疑辅导采集接口 +// */ +// @Scheduled(cron = "0 15 1 * * ?") +// public void uploadClassAnswerQuestionBehavior() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.uploadClassAnswerQuestionBehavior(); +// } +// } +// +// /** +// * POST-7 班级活跃度/实名认证照片信息采集接口 +// */ +// @Scheduled(cron = "0 20 1 * * ?") +// public void uploadImage() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.uploadImage(); +// } +// } +// +// /** +// * POST-8 获取培训待绑定的(班级编号,项目编号)列表 +// */ +// @Scheduled(cron = "0 25 1 * * ?") +// public void getClassCodeByPrivateKey() throws IOException { +// if ("prod".equals(env)) { +// renSheJuService.getClassCodeByPrivateKey(); +// } +// } // /** // * POST-8 上下游班级数据绑定接口 diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index ba5d485..af023e0 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -187,6 +187,8 @@ public class AdministerServiceImpl extends ServiceImpl imageClassIds = dudaoMapper.imageClassIds("0"); Set classIds = new HashSet<>(); -// classIds.add(488L); +// classIds.add(535L); vodClassIds.stream().forEach(x->classIds.add(x)); examClassIds.stream().forEach(x->classIds.add(x)); @@ -176,7 +176,7 @@ public class DudaoServiceImpl implements DudaoService { List vodClassIds = dudaoMapper.vodClassIds("0"); // List vodClassIds = new ArrayList<>(); -// vodClassIds.add(488L); +// vodClassIds.add(535L); List result = new ArrayList<>(); @@ -307,7 +307,7 @@ public class DudaoServiceImpl implements DudaoService { List classIds = dudaoMapper.dailyExamBasic("0"); // ListclassIds = new ArrayList<>(); -// classIds.add(488L); +// classIds.add(535L); try { if (classIds.size() > 0) { diff --git a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java index 1980568..80d57d8 100644 --- a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java @@ -737,7 +737,7 @@ public class MemberServiceImpl extends ServiceImpl imple CheckStatusVO checkStatusVO = new CheckStatusVO(); MemberDO memberDO1 = this.baseMapper.selectById(memberDO.getId()); - if (memberDO1.getFirstLogin() == 1) { + if (null != memberDO1.getFirstLogin() && memberDO1.getFirstLogin() == 1) { checkStatusVO.setSMSStatus(true); } else { checkStatusVO.setSMSStatus(false); diff --git a/src/main/java/com/subsidy/util/ConstantUtils.java b/src/main/java/com/subsidy/util/ConstantUtils.java index d19e82f..cbc408a 100644 --- a/src/main/java/com/subsidy/util/ConstantUtils.java +++ b/src/main/java/com/subsidy/util/ConstantUtils.java @@ -65,12 +65,12 @@ public class ConstantUtils { /** * 短信 RAM账号AccessKey ID */ - public static final String ACCESS_KEY_ID = "LTAI5tPAH7P7WQVeowo517BE"; + public static final String ACCESS_KEY_ID = "LTAI5tLUBG4B6QxhHrhddc7p"; /** * 短信 RAM账号AccessKey Secret */ - public static final String SECRET = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + public static final String SECRET = "eber38QGHZixTQ6bFfrd80kbg67jIP"; /** * 腾讯云点播视频转码模板 diff --git a/src/main/java/com/subsidy/util/OSSUtils.java b/src/main/java/com/subsidy/util/OSSUtils.java index d42c59f..e328952 100644 --- a/src/main/java/com/subsidy/util/OSSUtils.java +++ b/src/main/java/com/subsidy/util/OSSUtils.java @@ -17,10 +17,10 @@ import java.util.UUID; public class OSSUtils { // @Value("${aliyun.oss.accessKeyId}") - private static String accessKeyId = "LTAI5tPAH7P7WQVeowo517BE"; + private static String accessKeyId = "LTAI5tLUBG4B6QxhHrhddc7p"; // @Value("${aliyun.oss.accessKeySecret}") - private static String secretAccessKey = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + private static String secretAccessKey = "eber38QGHZixTQ6bFfrd80kbg67jIP"; // @Value("${aliyun.oss.endpoint}") private static String endPoint = "oss-cn-beijing.aliyuncs.com"; diff --git a/src/main/java/com/subsidy/util/VodUtil.java b/src/main/java/com/subsidy/util/VodUtil.java index 79c3da0..9eef253 100644 --- a/src/main/java/com/subsidy/util/VodUtil.java +++ b/src/main/java/com/subsidy/util/VodUtil.java @@ -120,4 +120,5 @@ public class VodUtil { throw new HttpException(99999, e.getMessage()); } } + } diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 59fd1aa..4757f92 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -2,21 +2,21 @@ spring.server.port=23457 # 数据源配置 -#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 -##spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 -#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -##spring.datasource.username=ykadmin_new -##spring.datasource.password=youkedb608@good -#spring.datasource.username=devloper -#spring.datasource.password=dev@1553$ - -# 数据源配置 -spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.datasource.username=root -spring.datasource.password=ykhladmin302 +#spring.datasource.username=ykadmin_new +#spring.datasource.password=youkedb608@good +spring.datasource.username=devloper +spring.datasource.password=dev@1553$ + +# 数据源配置 +#spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +#spring.datasource.username=root +#spring.datasource.password=ykhladmin302 spring.datasource.druid.initialSize=5 spring.datasource.druid.minIdle=5 diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 4deb985..7ffd991 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -2,7 +2,8 @@ spring.server.port=23459 # 数据源配置 -spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +#spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://rm-uf62202s176hufw8x0o.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=ykadmin_new diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index cc0c047..1f8db53 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -42,8 +42,8 @@ spring.cache.ehcache.config=classpath:ehcache.xml # 阿里云短信 sms.product=Dysmsapi sms.domain=dysmsapi.aliyuncs.com -sms.accessKeyId=LTAI5tPAH7P7WQVeowo517BE -sms.accessKeySecret=0ueqhIfdAZyw5lWlBVSLpAxTtx37RY +sms.accessKeyId=LTAI5tLUBG4B6QxhHrhddc7p +sms.accessKeySecret=eber38QGHZixTQ6bFfrd80kbg67jIP #wechat.app-id=wx7785293ff5e31f14 #wechat.app-secret=25d57cad61fc1b45b3afa46d4c35e8f6 #wechat.agentId=1000008 diff --git a/src/main/resources/mapper/DudaoMapper.xml b/src/main/resources/mapper/DudaoMapper.xml index 178fc66..4288534 100644 --- a/src/main/resources/mapper/DudaoMapper.xml +++ b/src/main/resources/mapper/DudaoMapper.xml @@ -437,7 +437,7 @@ 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 class_id = #{classId} + and t1.class_id = #{classId} SELECT - m.* + distinct m.* FROM member m LEFT JOIN class_member_mapping cmm ON cmm.member_id = m.id @@ -413,8 +413,7 @@ AND m.delete_date IS NULL AND cmm.delete_date IS NULL AND s.signInCount is null - GROUP BY - m.id + diff --git a/src/main/resources/mapper/SignInRecordMapper.xml b/src/main/resources/mapper/SignInRecordMapper.xml index 8a47022..153f572 100644 --- a/src/main/resources/mapper/SignInRecordMapper.xml +++ b/src/main/resources/mapper/SignInRecordMapper.xml @@ -39,7 +39,7 @@ and t3.delete_date is null and t3.id = #{id} - AND t.course_name like concat('%',#{courseName} ,'%') + AND t2.course_name like concat('%',#{courseName} ,'%') and t.class_name like concat('%',#{className} ,'%') -- libgit2 0.25.0