Commit 1177d0df by 涂亚平

15天数据全部推送备份

1 parent 9f513ae2
Showing with 655 additions and 150 deletions
......@@ -14,7 +14,7 @@ import java.io.IOException;
import java.util.List;
@RestController
@Api(tags = "人社局数据对接")
@Api(tags = "企业职工线上培训")
@RequestMapping("/rensheju")
public class RenSheJuController {
......
package com.subsidy.controller;
import com.subsidy.service.ShehuihuaService;
import com.subsidy.vo.renshe.RensheResponseVO;
import com.subsidy.vo.renshe.RensheStringVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.List;
@RestController
@Api(tags = "社会化、学徒制")
@RequestMapping("/social")
public class ShehuihuaController {
@Autowired
private ShehuihuaService shehuihuaService;
@PostMapping("getClassCodeByPrivateKey")
@ApiOperation("POST-2 获取培训待绑定的(班级编号,项目编号)列表")
public RensheResponseVO getClassCodeByPrivateKey()throws IOException {
return shehuihuaService.getClassCodeByPrivateKey();
}
@PostMapping("uploadClass")
@ApiOperation("POST-3:班级基本信息信息采集接口")
public RensheResponseVO uploadClass() throws IOException {
return shehuihuaService.uploadClass();
}
@PostMapping("classHourBehavior")
@ApiOperation("POST-4:学时信息采集接口")
public RensheResponseVO classHourBehavior() throws IOException {
return shehuihuaService.classHourBehavior();
}
@PostMapping("uploadChapterBehavior")
@ApiOperation("POST-5:考试信息采集接口")
public RensheResponseVO uploadChapterBehavior() throws IOException {
return shehuihuaService.uploadChapterBehavior();
}
@PostMapping("uploadClassAnswerQuestionBehavior")
@ApiOperation("POST-6:答疑辅导采集接口")
public RensheResponseVO uploadClassAnswerQuestionBehavior() throws IOException {
return shehuihuaService.uploadClassAnswerQuestionBehavior();
}
@PostMapping("uploadImage")
@ApiOperation("POST-7 班级活跃度/实名认证照片信息采集接口")
public List<RensheResponseVO> uploadImage()throws IOException {
return shehuihuaService.uploadImage();
}
@PostMapping("getErrorClass")
@ApiOperation("POST-8 获取推送失败班级列表")
public RensheResponseVO getErrorClass()throws IOException{
return shehuihuaService.getErrorClass();
}
@PostMapping("clear")
@ApiOperation("POST-9 清除推送失败班级缓存")
public RensheStringVO clear()throws IOException{
return shehuihuaService.clear();
}
}
......@@ -7,14 +7,20 @@ import java.util.List;
@Data
public class ClassHourBasic {
/**
* 活跃度列表,【数组】
*/
private List<ActivityList> activityList;
/**
* 临时班级(临时项目)编号
*/
private String downCode;
/**
* 学员姓名
*/
private String studentName;
/**
* 学员电话号,会对学生手机号长度、格式进行校验
*/
private String phone;
/**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/
......@@ -23,25 +29,23 @@ public class ClassHourBasic {
* 当日累计学习时长,视频暂停时间不计入【秒】
*/
private long learnTime;
/**
* 上线时间列表,【数组】
*/
private List<LoginList> loginList;
/**
* 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】
*/
private long loginTime;
/**
* 学员电话号,会对学生手机号长度、格式进行校验
*/
private String phone;
/**
* 当日累计播放时长,视频暂停时间计入【秒】
*/
private Long playTime;
/**
* 学员姓名
* 上线时间列表,【数组】
*/
private String studentName;
private List<LoginList> loginList;
/**
* 活跃度列表,【数组】
*/
private List<ActivityList> activityList;
}
package com.subsidy.dto.renshe;
import com.subsidy.dto.shehuihua.ChapterExamBasic5;
import lombok.Data;
import java.util.List;
......
package com.subsidy.dto.renshe;
import com.subsidy.dto.shehuihua.AnswerBasic6;
import lombok.Data;
import java.util.List;
......
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.AnswerAndQuestionList;
import lombok.Data;
import java.util.List;
@Data
public class AnswerBasic6 {
/**
* 答疑辅导,提问和回答都存在值时才进行传递
*/
private List<AnswerAndQuestionList> answerAndQuestionList;
private String classCode;
private String identity;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ActivityList;
import com.subsidy.dto.renshe.ExamList;
import lombok.Data;
import java.util.List;
@Data
public class ChapterExamBasic5 {
/**
* 是否通过,0通过1未通过
*/
private long access;
/**
* 活跃度列表,【数组】
*/
private List<ActivityList> activityList;
/**
* 章节(课程)编码,11
*/
private String chapterCode;
/**
* 班级(项目)编号
*/
private String classCode;
/**
* 章节(课程)考试时间列表,【数组】
*/
private List<ExamList> examList;
/**
* 章节(课程)考试总时长,该字段数据应为当日产生examList列表内多条结束时间-开始时间累加和【秒】
*/
private long examTime;
/**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/
private String identity;
/**
* 学员手机号,会对手机号长度、格式进行校验
*/
private String phone;
/**
* 学员姓名
*/
private String studentName;
}
package com.subsidy.dto.shehuihua;
import lombok.Data;
@Data
public class ChapterList22 {
private String chapterCode;
private String chapterName;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ActivityList;
import com.subsidy.dto.renshe.LoginList;
import lombok.Data;
import java.util.List;
@Data
public class ClassHourBasic4DTO {
/**
* 临时班级(临时项目)编号
*/
private String classCode;
/**
* 学员姓名
*/
private String studentName;
/**
* 学员电话号,会对学生手机号长度、格式进行校验
*/
private String phone;
/**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/
private String identity;
/**
* 当日累计学习时长,视频暂停时间不计入【秒】
*/
private long learnTime;
/**
* 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】
*/
private long loginTime;
/**
* 当日累计播放时长,视频暂停时间计入【秒】
*/
private Long playTime;
/**
* 上线时间列表,【数组】
*/
private List<LoginList> loginList;
/**
* 活跃度列表,【数组】
*/
private List<ActivityList> activityList;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ClassHourBasic;
import lombok.Data;
import java.util.List;
@Data
public class ClassHourBehavior4DTO {
/**
* 班级(项目)学时列表,【数组】班级(项目)学时列表
*/
private List<ClassHourBasic4DTO> classHourBasic;
/**
* 私钥
*/
private String privateKey;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ChapterList2;
import com.subsidy.vo.renshe.MemberVO;
import lombok.Data;
import java.util.List;
@Data
public class ClassInfoBasicDTO {
private String classCode;
private String shortName;
private Long learnHour;
private List<ChapterList22> chapterList;
private List<MemberVO> studentList;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ChapterExamBasic;
import lombok.Data;
import java.util.List;
@Data
public class UploadChapterBehavior5DTO {
/**
* 章节(课程)考试列表,【数组】
*/
private List<ChapterExamBasic5> chapterExamBasic;
/**
* 私钥
*/
private String privateKey;
}
package com.subsidy.dto.shehuihua;
import lombok.Data;
import java.util.List;
@Data
public class UploadClassAnswerQuestionBehavior6DTO {
private List<AnswerBasic6> answerBasic;
private String privateKey;
}
package com.subsidy.dto.shehuihua;
import lombok.Data;
import java.util.List;
@Data
public class UploadClassDTO {
private String privateKey;
private List<ClassInfoBasicDTO> classInfoBasic;
}
package com.subsidy.dto.shehuihua;
import com.subsidy.dto.renshe.ImageDetailList;
import lombok.Data;
import java.util.List;
@Data
public class UploadImageDTO7 {
/**
* 临时班级(项目)编码
*/
private String classCode;
/**
* 活跃度照片列表,【数组】
*/
private List<ImageDetailList> imageDetailList;
/**
* 私钥
*/
private String privateKey;
}
//package com.subsidy.jobs;
//
//import com.alibaba.fastjson.JSONObject;
//import com.subsidy.common.ResponseData;
//import com.subsidy.mapper.OprMemDictMapper;
//import com.subsidy.model.OprMemDictDO;
//import com.subsidy.service.RenSheJuService;
//import com.subsidy.service.RenshejuHistoryService;
//import com.subsidy.service.impl.RenshejuHistoryServiceImpl;
//import com.subsidy.util.websocket.WebSocketUtil;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//import org.springframework.web.socket.TextMessage;
//import org.springframework.web.socket.WebSocketSession;
//
//import java.io.IOException;
//import java.util.List;
//import java.util.concurrent.ConcurrentHashMap;
//
///**
// * 人社局数据对接
// */
//@Component
//public class RenSheJuJob {
//
//
// @Autowired
// private RenSheJuService renSheJuService;
//
// @Autowired
// private OprMemDictMapper oprMemDictMapper;
//
package com.subsidy.jobs;
import com.alibaba.fastjson.JSONObject;
import com.subsidy.common.ResponseData;
import com.subsidy.mapper.OprMemDictMapper;
import com.subsidy.model.OprMemDictDO;
import com.subsidy.service.RenSheJuService;
import com.subsidy.util.websocket.WebSocketUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
/**
* 企业职工线上培训
*/
@Component
public class RenSheJuJob {
@Autowired
private RenSheJuService renSheJuService;
@Autowired
private OprMemDictMapper oprMemDictMapper;
/**
* POST-2:班级基本信息信息采集接口
*/
@Scheduled(cron = "0 0 1 * * ?")
public void classBaseInfo()throws IOException {
renSheJuService.classBaseInfo();
}
/**
* POST-3:学时信息采集接口
*/
@Scheduled(cron = "0 5 1 * * ?")
public void classHourBehavior() throws IOException {
renSheJuService.classHourBehavior();
}
/**
* POST-4:考试信息采集接口
*/
@Scheduled(cron = "0 10 1 * * ?")
public void uploadChapterBehavior() throws IOException {
renSheJuService.uploadChapterBehavior();
}
/**
* POST-5:答疑辅导采集接口
*/
@Scheduled(cron = "0 15 1 * * ?")
public void uploadClassAnswerQuestionBehavior() throws IOException {
renSheJuService.uploadClassAnswerQuestionBehavior();
}
/**
* POST-6 班级活跃度/实名认证照片信息采集接口
*/
@Scheduled(cron = "0 20 1 * * ?")
public void uploadImage()throws IOException {
renSheJuService.uploadImage();
}
/**
* POST-7 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 25 1 * * ?")
public void getClassCodeByPrivateKey()throws IOException {
renSheJuService.getClassCodeByPrivateKey();
}
/**
* POST-8 上下游班级数据绑定接口
*/
@Scheduled(cron = "0 30 1 * * ?")
public void uploadClassCode()throws IOException {
renSheJuService.uploadClassCode();
}
// /**
// * POST-2:班级基本信息信息采集接口
// * POST-9 获取推送失败班级列表
// */
// @Scheduled(cron = "0 0 1 * * ?")
// public void classBaseInfo()throws IOException {
// renSheJuService.classBaseInfo();
// @Scheduled(cron = "0 35 1 * * ?")
// public void getErrorClass()throws IOException{
// renSheJuService.getErrorClass();
// }
//
// /**
// * POST-3:学时信息采集接口
// */
// @Scheduled(cron = "0 5 1 * * ?")
// public void classHourBehavior() throws IOException {
// renSheJuService.classHourBehavior();
// }
//
// /**
// * POST-4:考试信息采集接口
// */
// @Scheduled(cron = "0 10 1 * * ?")
// public void uploadChapterBehavior() throws IOException {
// renSheJuService.uploadChapterBehavior();
// }
//
// /**
// * POST-5:答疑辅导采集接口
// */
// @Scheduled(cron = "0 15 1 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// renSheJuService.uploadClassAnswerQuestionBehavior();
// }
//
// /**
// * POST-6 班级活跃度/实名认证照片信息采集接口
// */
// @Scheduled(cron = "0 20 1 * * ?")
// public void uploadImage()throws IOException {
// renSheJuService.uploadImage();
// }
//
// /**
// * POST-7 获取培训待绑定的(班级编号,项目编号)列表
// */
// @Scheduled(cron = "0 25 1 * * ?")
// public void getClassCodeByPrivateKey()throws IOException {
// renSheJuService.getClassCodeByPrivateKey();
// }
//
// /**
// * POST-8 上下游班级数据绑定接口
// */
// @Scheduled(cron = "0 30 1 * * ?")
// public void uploadClassCode()throws IOException {
// renSheJuService.uploadClassCode();
// }
//
//// /**
//// * POST-9 获取推送失败班级列表
//// */
//// @Scheduled(cron = "0 35 1 * * ?")
//// public void getErrorClass()throws IOException{
//// renSheJuService.getErrorClass();
//// }
//
// @Scheduled(cron = "00 58 23 * * ?")
// public void cancelLogin(){
// ConcurrentHashMap<Long, WebSocketSession> webSocketMap = WebSocketUtil.webSocketMap;
//
// List<Long> onLineUsers = oprMemDictMapper.onlineUsers();
//
// for (Long key : onLineUsers){
// try {
// if (null != webSocketMap.get(key)){
// webSocketMap.get(key).sendMessage(new TextMessage(JSONObject.toJSONString(ResponseData.generateCreatedResponse(17001))));
// }
// OprMemDictDO oprMemDictDO = new OprMemDictDO();
// oprMemDictDO.setResult(1);
// oprMemDictDO.setOprType("登出");
// oprMemDictDO.setUserId(key);
// oprMemDictMapper.insert(oprMemDictDO);
// }catch (Exception e){
// e.printStackTrace();
// }
// }
// }
//
//}
@Scheduled(cron = "00 58 23 * * ?")
public void cancelLogin(){
ConcurrentHashMap<Long, WebSocketSession> webSocketMap = WebSocketUtil.webSocketMap;
List<Long> onLineUsers = oprMemDictMapper.onlineUsers();
for (Long key : onLineUsers){
try {
if (null != webSocketMap.get(key)){
webSocketMap.get(key).sendMessage(new TextMessage(JSONObject.toJSONString(ResponseData.generateCreatedResponse(17001))));
}
OprMemDictDO oprMemDictDO = new OprMemDictDO();
oprMemDictDO.setResult(1);
oprMemDictDO.setOprType("登出");
oprMemDictDO.setUserId(key);
oprMemDictMapper.insert(oprMemDictDO);
}catch (Exception e){
e.printStackTrace();
}
}
}
}
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 {
@Autowired
private ShehuihuaService shehuihuaService;
/**
* POST-2 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 0 2 * * ?")
public void getClassCodeByPrivateKey()throws IOException {
shehuihuaService.getClassCodeByPrivateKey();
}
/**
* POST-3:班级基本信息信息采集接口
*/
@Scheduled(cron = "0 5 2 * * ?")
public void uploadClass() throws IOException {
shehuihuaService.uploadClass();
}
/**
* POST-4:考试信息采集接口
*/
@Scheduled(cron = "0 10 2 * * ?")
public void classHourBehavior() throws IOException {
shehuihuaService.classHourBehavior();
}
/**
* POST-5:答疑辅导采集接口
*/
@Scheduled(cron = "0 15 2 * * ?")
public void uploadChapterBehavior() throws IOException {
shehuihuaService.uploadChapterBehavior();
}
/**
* POST-6 班级活跃度/实名认证照片信息采集接口
*/
@Scheduled(cron = "0 20 2 * * ?")
public void uploadClassAnswerQuestionBehavior()throws IOException {
shehuihuaService.uploadClassAnswerQuestionBehavior();
}
/**
* POST-7 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 25 2 * * ?")
public void uploadImage()throws IOException {
shehuihuaService.uploadImage();
}
}
......@@ -32,12 +32,12 @@ public interface RenSheJuMapper {
/**
* 新增班级
*/
List<Long> newClasses();
List<Long> newClasses(String classType);
/**
* 前一天新增视频学习数据
*/
List<DailyStudyInfoVO> dailyStudyInfo();
List<DailyStudyInfoVO> dailyStudyInfo(String classType);
/**
* 前一天活跃度检测列表
......@@ -105,7 +105,7 @@ public interface RenSheJuMapper {
/**
* 查找前一天做过人脸识别的班级
*/
List<Long> checkClassIds();
List<Long> checkClassIds(String classType);
/**
* 查看某个班级的成员做过的人脸识别记录 弃用
......
......@@ -123,4 +123,14 @@ public class ClassDictDO extends BaseModel {
*/
private Integer playSnap;
/**
* 班级所属职业类型
*/
private String profession;
/**
* 班级所属职业等级
*/
private String professionRank;
}
package com.subsidy.service;
import com.subsidy.vo.renshe.RensheResponseVO;
import com.subsidy.vo.renshe.RensheStringVO;
import java.io.IOException;
import java.util.List;
public interface ShehuihuaService {
RensheResponseVO getClassCodeByPrivateKey()throws IOException;
RensheResponseVO uploadClass() throws IOException;
RensheResponseVO classHourBehavior() throws IOException;
RensheResponseVO uploadChapterBehavior() throws IOException;
RensheResponseVO uploadClassAnswerQuestionBehavior()throws IOException;
List<RensheResponseVO> uploadImage()throws IOException;
RensheResponseVO getErrorClass()throws IOException;
RensheStringVO clear()throws IOException;
void test();
}
package com.subsidy.util;
public class ShehuihuaConstant {
/**
* 获取培训正在进行中的(班级编号,项目编号)列表
*/
public static final String POST_2 = "Shehuihua_2_getClassCodeByPrivateKey";
/**
* POST-3:班级基本信息信息采集接口
*/
public static final String POST_3 = "Shehuihua_3_uploadClass";
/**
* POST-4:学时信息采集接口
*/
public static final String POST_4 = "Shehuihua_4_classHourBehavior";
/**
* POST-5:考试信息采集接口
*/
public static final String POST_5 = "Shehuihua_5_uploadChapterBehavior";
/**
* POST-6:答疑辅导采集接口
*/
public static final String POST_6 = "Shehuihua_6_uploadClassAnswerQuestionBehavior";
/**
* POST-7 班级活跃度/实名认证照片信息采集接口
*/
public static final String POST_7 = "Shehuihua_7_import/downstream/social/uploadImage";
/**
* POST-8 获取推送失败班级列表
*/
public static final String POST_8 = "Shehuihua_8_getErrorClass";
/**
* POST-9 清除推送失败班级缓存
*/
public static final String POST_9 = "Shehuihua_9_clear";
/**
* 调取失败
*/
public static final String API_ERROR = "调取失败";
/**
* 当天没数据
*/
public static final String NO_DATA = "NO_DATA";
/**
* 推送失败
*/
public static final String PUSH_FAIL = "推送失败";
/**
* 推送成功
*/
public static final String PUSH_SUCCESS = "推送成功";
}
......@@ -89,7 +89,7 @@
t7.order_no
</select>
<select id="newClasses" resultType="long">
<select id="newClasses" parameterType="string" resultType="long">
SELECT DISTINCT
t1.id
FROM
......@@ -98,6 +98,9 @@
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
and t1.class_code is not NULL
<if test="classType != null and classType != ''">
and t1.class_type = #{classType}
</if>
</select>
<select id="dailyStudyInfo" resultType="com.subsidy.vo.renshe.DailyStudyInfoVO">
......@@ -120,7 +123,7 @@
FROM
vod_play_history t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
GROUP BY
t1.class_id,
......@@ -162,6 +165,9 @@
GROUP BY user_id
) t2 ON t3.user_id = t2.user_id
) t5 ON t4.id = t5.user_id
<if test="classType != null and classType != ''">
where t3.class_type = #{classType}
</if>
</select>
......@@ -173,7 +179,7 @@
FROM
activity_detection t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.member_id = #{memberId}
AND t1.class_id = #{classId}
......@@ -187,7 +193,7 @@
image_check_record t1
WHERE
class_id =#{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NOT NULL
and t1.result =1
AND t1.member_id=#{memberId}
......@@ -237,7 +243,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登录"
AND DATE_FORMAT( DATE_ADD( create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
......@@ -253,7 +259,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登出"
AND DATE_FORMAT( DATE_ADD( create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
......@@ -301,7 +307,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 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
And class_id = #{classId}
</select>
......@@ -335,7 +341,7 @@
exercise_done_result t1
WHERE
t1.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
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 member_id = #{memberId}
</select>
......@@ -372,18 +378,23 @@
AND t3.delete_date IS NULL
</select>
<select id="checkClassIds" resultType="long">
<select id="checkClassIds" parameterType="string" resultType="long">
SELECT
distinct class_id
FROM
image_check_record
image_check_record t
left join class_dict t2 on t.class_id = t2.id
WHERE
delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( update_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
t.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t.update_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
and class_id is not null
<if test="classType != null and classType != ''">
and t2.class_type = #{classType}
</if>
</select>
<select id="classImageChecks" parameterType="long" resultType="com.subsidy.vo.renshe.ClassImageChecksVO">
......@@ -440,8 +451,7 @@
WHERE
t1.delete_date is null
and class_id = #{classId}
and t1.id in (568,569,571,572,576,577)
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 13 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NULL
AND t1.result = 1
and t1.member_id
......@@ -464,7 +474,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 7 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
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.paper_id IS not NULL
AND t1.result = 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!