diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java index 624856c..e4ab4ab 100644 --- a/src/main/java/com/subsidy/controller/AdministerController.java +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -273,4 +273,10 @@ public class AdministerController { administerService.exportManageMember(manageMemberDTO); } + @PostMapping("selfExport") + @ApiOperation("自助导出 id导出") + public void selfExport(@RequestBody ClassDictDO classDictDO){ + administerService.selfExport(classDictDO); + } + } diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index 4e24d4d..cf76582 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -222,4 +222,6 @@ public class MemberController { } + + } diff --git a/src/main/java/com/subsidy/dto/administer/SelfExportVO.java b/src/main/java/com/subsidy/dto/administer/SelfExportVO.java new file mode 100644 index 0000000..b9553df --- /dev/null +++ b/src/main/java/com/subsidy/dto/administer/SelfExportVO.java @@ -0,0 +1,30 @@ +package com.subsidy.dto.administer; + +import com.subsidy.util.excel.ExcelColumn; +import lombok.Data; + +@Data +public class SelfExportVO { + + @ExcelColumn(col = 1,value = "姓名") + private String userName; + + @ExcelColumn(col = 2,value = "视频") + private String vodName; + + @ExcelColumn(col = 3,value = "开始时间") + private String startTime; + + @ExcelColumn(col = 4,value = "结束时间") + private String endTime; + + @ExcelColumn(col = 5,value = "学习时长") + private String playLength; + + @ExcelColumn(col = 6,value = "有效时长") + private String studyLength; + + @ExcelColumn(col = 7,value = "视频时长") + private String vodLength; + +} diff --git a/src/main/java/com/subsidy/jobs/RenSheJuJob.java b/src/main/java/com/subsidy/jobs/RenSheJuJob.java new file mode 100644 index 0000000..3726ea7 --- /dev/null +++ b/src/main/java/com/subsidy/jobs/RenSheJuJob.java @@ -0,0 +1,12 @@ +package com.subsidy.jobs; + +import org.springframework.stereotype.Component; + +/** + * 人社局数据对接 + */ +@Component +public class RenSheJuJob { + + +} diff --git a/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java b/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java index b3682dd..23f76ae 100644 --- a/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java +++ b/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java @@ -14,9 +14,16 @@ import org.springframework.stereotype.Repository; * @author DengMin * @since 2022-07-13 */ - @Repository +@Repository public interface ActivityDetectionMapper extends BaseMapper { - IPage getCheckHistory(IPage iPage,Long classId,Long memberId); + /** + * 获取验证历史 + */ + IPage getCheckHistory(IPage iPage, Long classId, Long memberId); + /** + * 获取今天成功次数 + */ + int todayCnt(Long classId, Long memberId, Integer checkType, Integer status); } diff --git a/src/main/java/com/subsidy/mapper/AdministerMapper.java b/src/main/java/com/subsidy/mapper/AdministerMapper.java index aa323d4..29caedc 100644 --- a/src/main/java/com/subsidy/mapper/AdministerMapper.java +++ b/src/main/java/com/subsidy/mapper/AdministerMapper.java @@ -2,7 +2,9 @@ package com.subsidy.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.dto.administer.SelfExportVO; import com.subsidy.model.AdministerDO; +import com.subsidy.model.ClassDictDO; import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.member.ClassSignVO; @@ -59,5 +61,9 @@ public interface AdministerMapper extends BaseMapper { */ IPage operators(IPage page, String userName); + /** + * 自助导出 + */ + List selfExport(ClassDictDO classDictDO); } diff --git a/src/main/java/com/subsidy/service/AdministerService.java b/src/main/java/com/subsidy/service/AdministerService.java index 8dae927..25f140a 100644 --- a/src/main/java/com/subsidy/service/AdministerService.java +++ b/src/main/java/com/subsidy/service/AdministerService.java @@ -3,10 +3,7 @@ package com.subsidy.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.subsidy.dto.administer.*; -import com.subsidy.model.AdministerDO; -import com.subsidy.model.ExerciseDoneHistoryDO; -import com.subsidy.model.ExerciseDoneResultDO; -import com.subsidy.model.ImageCheckRecordDO; +import com.subsidy.model.*; import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.image.GetMemberCheckDetailVO; @@ -89,4 +86,6 @@ public interface AdministerService extends IService { IPage manageMember(ManageMemberDTO manageMemberDTO); void exportManageMember(ManageMemberDTO manageMemberDTO); + + void selfExport(ClassDictDO classDictDO); } diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index 8b43acd..74f6e41 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -5,13 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.common.exception.HttpException; -import com.subsidy.dto.administer.ClassDailyInfoDTO; -import com.subsidy.dto.administer.ClassDetailDTO; -import com.subsidy.dto.administer.ClassVodDailyInfoDTO; -import com.subsidy.dto.administer.ClassVodInfoDTO; -import com.subsidy.dto.administer.ManageMemberDTO; -import com.subsidy.dto.administer.MemberStudyLogDTO; -import com.subsidy.dto.administer.OperatorsDTO; +import com.subsidy.dto.administer.*; import com.subsidy.dto.member.ImportMemberDTO; import com.subsidy.mapper.AdministerMapper; import com.subsidy.mapper.AnsweringQuestionMapper; @@ -146,9 +140,6 @@ public class AdministerServiceImpl extends ServiceImpl selfExportVOS = this.baseMapper.selfExport(classDictDO); + ExcelUtil.writeExcel(selfExportVOS,SelfExportVO.class); + } + public String userName(String originName, int i, Long companyId) { i++; diff --git a/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java b/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java index e5bea70..86bef7b 100644 --- a/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java @@ -12,6 +12,7 @@ import com.subsidy.model.*; import com.subsidy.service.ImageCheckRecordService; import com.subsidy.util.DateFormatUtil; import com.subsidy.util.OSSUtils; +import com.subsidy.util.RandomUtil; import com.subsidy.vo.token.*; import org.apache.commons.codec.Charsets; import org.apache.commons.lang3.StringUtils; @@ -119,6 +120,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl signList2 = new ArrayList<>(); signList2.add(WBAPPID); - signList2.add(imageCheckRecordDO.getId() + ""); + signList2.add(imageCheckRecordDO.getBizSeqNo()); signList2.add(memberDO.getId() + ""); signList2.add("1.0.0"); signList2.add(sendIdCardInfoVO.getResult().getFaceId()); @@ -186,6 +188,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl signList1 = new ArrayList<>(); signList1.add(WBAPPID); - signList1.add(imageCheckRecordDO.getId() + ""); + signList1.add(imageCheckRecordDO.getBizSeqNo()); signList1.add(memberDO.getId() + ""); signList1.add("1.0.0"); String sign = ""; @@ -206,10 +209,10 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl 50)) { imageCheckRecordDO.setResult(1); + activityDetectionDO.setStatus(1); //如果是签到页的认证,则把图片写到member表里 if (imageCheckRecordDO.getCheckPlace() == 1) { - //写到学生班级映射表里去 ClassMemberMappingDO classMemberMappingDO = classMemberMappingMapper.selectOne(new QueryWrapper() .lambda() @@ -274,15 +277,15 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl imple memberVO.setCompanyId(companyDictDO.getId()); memberVO.setCompanyName(companyDictDO.getCompanyName()); memberVO.setQxyStatus(companyDictDO.getQxyStatus()); -// OprMemDictDO oprMemDictDO = new OprMemDictDO(); -// oprMemDictDO.setUserId(memberDO.getId()); -// oprMemDictDO.setOprType("登录"); -// oprMemDictDO.setResult(1); -// oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request)); -// oprMemDictMapper.insert(oprMemDictDO); + OprMemDictDO oprMemDictDO = new OprMemDictDO(); + oprMemDictDO.setUserId(memberDO.getId()); + oprMemDictDO.setOprType("登录"); + oprMemDictDO.setResult(1); + oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request)); + oprMemDictMapper.insert(oprMemDictDO); memberVO.setCompanyId(companyDictDO.getId()); memberVO.setSuperviseName(companyDictDO.getSuperviseName()); memberVO.setCompanyName(companyDictDO.getCompanyName()); @@ -451,13 +451,6 @@ public class MemberServiceImpl extends ServiceImpl imple return null; } - // 9a79cda9ef6f4a52a8 -// 552a4147db2d4026bc4e9021acd614f8 - public static void main(String[] args) { - String uuid = UUID.randomUUID().toString().replace("-", ""); - System.out.println(uuid); - } - public UserRoleVO qingxuetangLogin(QingxuetangLoginDTO qingxuetangLoginDTO, HttpServletRequest request) { UserRoleVO userRoleVO = new UserRoleVO(); @@ -708,10 +701,12 @@ public class MemberServiceImpl extends ServiceImpl imple int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1, null); myCoursesVO.setCheckCnt(checkCnt); - if (count > 1) { - myCoursesVO.setResult(1); + int todayCnt = activityDetectionMapper.todayCnt(myCoursesVO.getClassId(), myCoursesDTO.getMemberId(), 1, 1); + + if (count > 1 || todayCnt > 0) { + myCoursesVO.setResult(1); //不拍 } else { - myCoursesVO.setResult(0); + myCoursesVO.setResult(0); //拍 } } return myCoursesVOS; @@ -733,10 +728,12 @@ public class MemberServiceImpl extends ServiceImpl imple int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1, null); myCoursesVO.setCheckCnt(checkCnt); - if (count > 0) { - myCoursesVO.setResult(1); + int todayCnt = activityDetectionMapper.todayCnt(myCoursesVO.getClassId(), myCoursesDTO.getMemberId(), 1, 1); + + if (count > 1 || todayCnt > 0) { + myCoursesVO.setResult(1); //不拍 } else { - myCoursesVO.setResult(0); + myCoursesVO.setResult(0); //拍 } } return myCoursesVOS; diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index 98abba5..bacaf3b 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -61,23 +61,19 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl 5) { + if (vodPlayHistoryDO.getPlayLength() > 8) { //查看系统设定的时长 ClassDictDO classDictDO = classDictMapper.selectOne(new QueryWrapper() .lambda() .eq(ClassDictDO::getId, vodPlayHistoryDO.getClassId())); - if (classDictDO.getLimitHour() == 1) { //查看当天这个人看了多少时间 Integer total = vodPlayHistoryMapper.memberDailyStudyLength(vodPlayHistoryDO.getMemberId(), classDictDO.getId()); - if (total >= 6 * 3600) { throw new HttpException(13001); } - //是否超过时长 if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) { - //超过时长 int playLength = 6 * 3600 - total; vodPlayHistoryDO.setPlayLength(playLength); @@ -85,7 +81,6 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl 5) { this.baseMapper.insert(vodPlayHistoryDO); } -// throw new HttpException(13001); } else { vodPlayHistoryDO.setPlayCount(1); this.baseMapper.insert(vodPlayHistoryDO); @@ -100,24 +95,19 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl 5) { - + if (insertHistoryNewDTO.getPlayLength() > 8) { VodPlayHistoryDO vodPlayHistoryDO = new VodPlayHistoryDO(); BeanUtils.copyProperties(insertHistoryNewDTO, vodPlayHistoryDO); - //查看系统设定的时长 ClassDictDO classDictDO = classDictMapper.selectOne(new QueryWrapper() .lambda() .eq(ClassDictDO::getId, insertHistoryNewDTO.getClassId())); - if (classDictDO.getLimitHour() == 1) { //查看当天这个人看了多少时间 Integer total = vodPlayHistoryMapper.memberDailyStudyLength(insertHistoryNewDTO.getMemberId(), insertHistoryNewDTO.getClassId()); - if (total == 6 * 3600) { throw new HttpException(13001); } - //是否超过时长 没超过 false 超过 true if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) { int playLength = 6 * 3600 - total; @@ -126,7 +116,6 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl 5) { this.baseMapper.insert(vodPlayHistoryDO); } -// throw new HttpException(13001); } else { vodPlayHistoryDO.setPlayCount(1); this.baseMapper.insert(vodPlayHistoryDO); @@ -650,14 +639,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), classMemberMappingDO.getMemberId(), vodPlayStateVO.getStartDate()); - //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 + //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) { VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); //第一条 - if (l==0){ + if (l == 0) { vph1.setPlayDate(vph1.getCreateDate()); } VodPlayHistoryDO vph2 = vodPlayHistoryDOS.get(l + 1); //第二条 - LocalDateTime dateTmp = vph1.getPlayDate().plusSeconds(vph2.getPlayLength()+getRandom1_2()); + LocalDateTime dateTmp = vph1.getPlayDate().plusSeconds(vph2.getPlayLength() + getRandom1_2()); vph2.setPlayDate(dateTmp); this.baseMapper.updateById(vph2); } diff --git a/src/main/java/com/subsidy/util/MyStringUtils.java b/src/main/java/com/subsidy/util/MyStringUtils.java index ebf3948..4cbbc16 100644 --- a/src/main/java/com/subsidy/util/MyStringUtils.java +++ b/src/main/java/com/subsidy/util/MyStringUtils.java @@ -4,6 +4,10 @@ import java.util.List; public class MyStringUtils { + + /** + * 把集合改成字符串 去掉逗号 + */ public static String changeListToString(List list) { StringBuffer buffer = new StringBuffer(); @@ -20,4 +24,7 @@ public class MyStringUtils { } + + + } diff --git a/src/main/java/com/subsidy/util/OSSUtils.java b/src/main/java/com/subsidy/util/OSSUtils.java index 4cf7668..7f19d6f 100644 --- a/src/main/java/com/subsidy/util/OSSUtils.java +++ b/src/main/java/com/subsidy/util/OSSUtils.java @@ -52,7 +52,7 @@ public class OSSUtils { InputStream inputStream = new ByteArrayInputStream(bytesFile); ossClient.putObject(bucketName, fileName, inputStream); - String url = "http://" + bucketName + "." + endPoint + "/" + fileName; + String url = "http://" + bucketName + "." + endPoint + "/" + fileName+"?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"; // System.out.println(url); return url; } catch (Exception e) { diff --git a/src/main/java/com/subsidy/util/RandomUtil.java b/src/main/java/com/subsidy/util/RandomUtil.java index da3a872..c11970d 100644 --- a/src/main/java/com/subsidy/util/RandomUtil.java +++ b/src/main/java/com/subsidy/util/RandomUtil.java @@ -1,5 +1,7 @@ package com.subsidy.util; +import cn.hutool.core.lang.UUID; + import java.util.Random; public class RandomUtil { @@ -16,4 +18,17 @@ public class RandomUtil { } return str.toString(); } + + + /** + * 随机生成订单号 + */ + public static String randomOrderNumber(){ + return UUID.fastUUID().toString().replace("-","").substring(0,29); + } + + public static void main(String[] args) { + System.out.println(randomOrderNumber()); + } + } diff --git a/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java b/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java index 93af665..90c6f11 100644 --- a/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java +++ b/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java @@ -43,8 +43,8 @@ public class WebSocketUtil implements WebSocketHandler { private MemberMapper memberMapper; private int heartbeatMin = 1; // 断连最小心跳次数 - private int heartbeatMax = 4; // 断连最大心跳次数 - private int reconnectionSeconds = 3; //每次断连间隔重新连接秒 + private int heartbeatMax = 3; // 断连最大心跳次数 + private int reconnectionSeconds = 60; //每次断连间隔重新连接秒 /** * 存放建立连接webSocket对象 Map @@ -74,34 +74,28 @@ public class WebSocketUtil implements WebSocketHandler { * 并且上一次记录时间大于 { heartbeatMax * reconnectionSeconds } 秒(心跳检测机制),则判断为这次登陆是免密码登陆的重新记录上线时间 */ OprMemDictDO oprMemDictDO = oprMemDictMapper.getLatestLoginInfo(id); //最近一次登录 - if (null!= oprMemDictDO) { + + if (oprMemDictDO.getOprType().equals("登出")) { //登出过的话就写记录,否则不写 oprMemDictDO.setUserId(id); oprMemDictDO.setResult(1); oprMemDictDO.setOprType("登录"); - oprMemDictDO.setIpAddress(session.getRemoteAddress().getAddress().getHostAddress()); +// oprMemDictDO.setIpAddress(session.getRemoteAddress().getHostName()); oprMemDictMapper.insert(oprMemDictDO); -// } } +// } } webSocketMap.remove(id); - }else { - webSocketMap.put(id, session); - - OprMemDictDO oprMemDictDO = new OprMemDictDO(); - oprMemDictDO.setUserId(id); - oprMemDictDO.setResult(1); - oprMemDictDO.setOprType("登录"); - oprMemDictDO.setIpAddress(session.getRemoteAddress().getAddress().getHostAddress()); - oprMemDictMapper.insert(oprMemDictDO); - // 数据操作 - SystemSettings systemSettings = memberMapper.companySettings(id); //公司配置 - List classSettings = classDictMapper.getClassSettings(id); - systemSettings.setClassSettingsVOS(classSettings); - if (CollectionUtils.isNotEmpty(classSettings)) { - String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue); - webSocketMap.get(id).sendMessage(new TextMessage(data)); - } + } + webSocketMap.put(id, session); + + // 数据操作 + SystemSettings systemSettings = memberMapper.companySettings(id); //公司配置 + List classSettings = classDictMapper.getClassSettings(id); + systemSettings.setClassSettingsVOS(classSettings); + if (CollectionUtils.isNotEmpty(classSettings)) { + String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue); + webSocketMap.get(id).sendMessage(new TextMessage(data)); } } } @@ -111,9 +105,6 @@ public class WebSocketUtil implements WebSocketHandler { */ @Override public void handleMessage(WebSocketSession session, WebSocketMessage message) throws Exception { -// if (message instanceof TextMessage) { -// System.out.println(message.getPayload()); -// } this.handleMessage(session,message); } @@ -135,20 +126,13 @@ public class WebSocketUtil implements WebSocketHandler { * 关闭链接 :在两端WebSocket connection都关闭或transport error发生后执行 */ @Override - public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) { + public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception { if (null != session) { if (null != webSocketMap) { String params = session.getUri().getQuery(); Long id = Long.valueOf(params.split("=")[1]); -// //下线 -// OprMemDictDO oprMemDictDO = new OprMemDictDO(); -// oprMemDictDO.setUserId(id); -// oprMemDictDO.setOprType("登出"); -// oprMemDictMapper.insert(oprMemDictDO); heartbeat(webSocketMap.get(id)); } -// log.info("<---- webSocket is close"); -// log.info("session {} close, status: {}", session.getId(), closeStatus); } } @@ -172,16 +156,14 @@ public class WebSocketUtil implements WebSocketHandler { @Override public void run() { if (null != session && !session.isOpen()) { - if (beatsNum > heartbeatMax) { + if (beatsNum > heartbeatMax) { //heartbeatMa:2 String params = session.getUri().getQuery(); Long id = Long.valueOf(params.split("=")[1]); OprMemDictDO oprMemDictDO = new OprMemDictDO(); oprMemDictDO.setUserId(id); oprMemDictDO.setResult(1); oprMemDictDO.setOprType("登出"); - oprMemDictDO.setIpAddress(session.getRemoteAddress().getAddress().getHostAddress()); oprMemDictMapper.insert(oprMemDictDO); - beatsNum = heartbeatMin; taskMap.get(session.getId()).cancel(true); // break; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9ce1e86..3287aa3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 -spring.profiles.active=prod +spring.profiles.active=dev #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100 diff --git a/src/main/resources/mapper/ActivityDetectionMapper.xml b/src/main/resources/mapper/ActivityDetectionMapper.xml index f8351eb..23ec0b4 100644 --- a/src/main/resources/mapper/ActivityDetectionMapper.xml +++ b/src/main/resources/mapper/ActivityDetectionMapper.xml @@ -34,4 +34,16 @@ AND t.member_id = #{memberId} + diff --git a/src/main/resources/mapper/AdministerMapper.xml b/src/main/resources/mapper/AdministerMapper.xml index bdc4138..7db7079 100644 --- a/src/main/resources/mapper/AdministerMapper.xml +++ b/src/main/resources/mapper/AdministerMapper.xml @@ -11,7 +11,6 @@ - @@ -224,4 +223,63 @@ + + diff --git a/src/main/resources/mapper/ImageCheckRecordMapper.xml b/src/main/resources/mapper/ImageCheckRecordMapper.xml index ec50cf2..c06a704 100644 --- a/src/main/resources/mapper/ImageCheckRecordMapper.xml +++ b/src/main/resources/mapper/ImageCheckRecordMapper.xml @@ -46,7 +46,7 @@ AND t.class_id = #{classId} - AND DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(t.create_date, '%Y-%m-%d') + AND DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(t.create_date, '%Y-%m-%d') and class_place = #{checkPlace} diff --git a/src/main/resources/mapper/OprMemDictMapper.xml b/src/main/resources/mapper/OprMemDictMapper.xml index b6b7b44..c5588f3 100644 --- a/src/main/resources/mapper/OprMemDictMapper.xml +++ b/src/main/resources/mapper/OprMemDictMapper.xml @@ -66,6 +66,7 @@ opr_mem_dict t WHERE t.delete_date IS NULL + and t.result = 1 AND t.user_id = #{userId}