Commit ccfd90c4 by 涂亚平

30秒以内的视频数据不插入

1 parent 3a53359c
...@@ -38,7 +38,7 @@ public class VodPlayHistoryController { ...@@ -38,7 +38,7 @@ public class VodPlayHistoryController {
@PostMapping("insertHistory") @PostMapping("insertHistory")
@ApiOperation("记录学生看视频位置 ajax请求 classId班级id vodId 视频id " + @ApiOperation("记录学生看视频位置 ajax请求 classId班级id vodId 视频id " +
"memberId 成员id playLength 播放时长 playRecord 位点 suspendLength暂停时长 ") "memberId 成员id playLength 播放时长 playRecord 位点 suspendLength暂停时长 ")
@LoginRequired // @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO insertHistory(@RequestBody VodPlayHistoryDO vodPlayHistoryDO, HttpServletRequest request)throws Exception{ public ResponseVO insertHistory(@RequestBody VodPlayHistoryDO vodPlayHistoryDO, HttpServletRequest request)throws Exception{
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistory(vodPlayHistoryDO,request)); return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistory(vodPlayHistoryDO,request));
......
...@@ -61,4 +61,17 @@ public class PushJob { ...@@ -61,4 +61,17 @@ public class PushJob {
} }
} }
/**
* 定时发短信
*/
@Scheduled(cron = "0 0 9 * * ?")
public void sendWarning(){
pushDataService.sendWarning();
}
} }
...@@ -138,4 +138,9 @@ public class ClassDictDO extends BaseModel { ...@@ -138,4 +138,9 @@ public class ClassDictDO extends BaseModel {
*/ */
private Integer activityFlag; private Integer activityFlag;
/**
* 考试次数限制
*/
private Integer checkFlag;
} }
...@@ -24,5 +24,7 @@ public interface PushDataService extends IService<PushAnsweringDataDO> { ...@@ -24,5 +24,7 @@ public interface PushDataService extends IService<PushAnsweringDataDO> {
void post7(); void post7();
void sendWarning();
HashMap<String, List<Long>> check(); HashMap<String, List<Long>> check();
} }
...@@ -131,6 +131,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -131,6 +131,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
BeanUtils.copyProperties(addClassDTO, classDictDO); BeanUtils.copyProperties(addClassDTO, classDictDO);
//每天最大学习时长默认值 //每天最大学习时长默认值
classDictDO.setLimitHour(1); classDictDO.setLimitHour(1);
classDictDO.setCheckFlag(1);
this.baseMapper.insert(classDictDO); this.baseMapper.insert(classDictDO);
//班级里添加成员 //班级里添加成员
......
...@@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService {
for (DailyStudyInfoVO dailyStudyInfoVO : result) { for (DailyStudyInfoVO dailyStudyInfoVO : result) {
ClassHourBasic classHourBasic = new ClassHourBasic(); ClassHourBasic classHourBasic = new ClassHourBasic();
BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic); BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic);
classHourBasic.setClassCode(dailyStudyInfoVO.getDownCode()); classHourBasic.setClassCode(dailyStudyInfoVO.getClassCode());
//上线时间列表 //上线时间列表
//找到当天每次上线下线时间 //找到当天每次上线下线时间
......
...@@ -87,6 +87,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -87,6 +87,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
List<MemberExerciseVO> memberExerciseVOS = submitDTO.getMemberExerciseVOS(); List<MemberExerciseVO> memberExerciseVOS = submitDTO.getMemberExerciseVOS();
SimpleDateFormat startDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat startDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//判断数据库里是否有一样开始时间的记录,有的话就不插入
Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>()
.lambda()
.eq(ExerciseDoneResultDO::getMemberId,submitDTO.getMemberId())
.eq(ExerciseDoneResultDO::getClassId,submitDTO.getClassId())
.eq(ExerciseDoneResultDO::getPaperId,submitDTO.getPaperId())
.eq(ExerciseDoneResultDO::getStartDate,submitDTO.getStartDate()));
if (count == 0){
try { try {
Date startDate = startDateFormat1.parse(submitDTO.getStartDate()); Date startDate = startDateFormat1.parse(submitDTO.getStartDate());
...@@ -109,7 +119,6 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -109,7 +119,6 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
} }
} }
exerciseDoneResultDO.setClassId(submitDTO.getClassId()); exerciseDoneResultDO.setClassId(submitDTO.getClassId());
exerciseDoneResultDO.setRightCounts(rightCounts); exerciseDoneResultDO.setRightCounts(rightCounts);
exerciseDoneResultDO.setTotalCounts(memberExerciseVOS.size()); exerciseDoneResultDO.setTotalCounts(memberExerciseVOS.size());
...@@ -125,7 +134,6 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -125,7 +134,6 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
exerciseDoneResultMapper.insert(exerciseDoneResultDO); exerciseDoneResultMapper.insert(exerciseDoneResultDO);
for (MemberExerciseVO memberExerciseVO : memberExerciseVOS) { for (MemberExerciseVO memberExerciseVO : memberExerciseVOS) {
ExerciseDoneHistoryDO exerciseDoneHistoryDO = new ExerciseDoneHistoryDO(); ExerciseDoneHistoryDO exerciseDoneHistoryDO = new ExerciseDoneHistoryDO();
exerciseDoneHistoryDO.setPaperId(submitDTO.getPaperId()); exerciseDoneHistoryDO.setPaperId(submitDTO.getPaperId());
exerciseDoneHistoryDO.setDoneId(exerciseDoneResultDO.getId()); exerciseDoneHistoryDO.setDoneId(exerciseDoneResultDO.getId());
...@@ -136,6 +144,7 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -136,6 +144,7 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
exerciseDoneHistoryDO.setResult(memberExerciseVO.getResult()); exerciseDoneHistoryDO.setResult(memberExerciseVO.getResult());
exerciseDoneHistoryMapper.insert(exerciseDoneHistoryDO); exerciseDoneHistoryMapper.insert(exerciseDoneHistoryDO);
} }
}
return exerciseDoneResultDO.getId(); return exerciseDoneResultDO.getId();
} }
......
...@@ -953,6 +953,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -953,6 +953,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public String checkTimes(ExerciseDoneResultDO exerciseDoneResultDO) { public String checkTimes(ExerciseDoneResultDO exerciseDoneResultDO) {
ClassDictDO classDictDO = classDictMapper.selectById(exerciseDoneResultDO.getClassId());
if (1 == classDictDO.getCheckFlag()) {
//查看这个人这个卷子做了几次 //查看这个人这个卷子做了几次
Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>() Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>()
.lambda() .lambda()
...@@ -960,9 +963,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -960,9 +963,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.eq(ExerciseDoneResultDO::getPaperId, exerciseDoneResultDO.getPaperId()) .eq(ExerciseDoneResultDO::getPaperId, exerciseDoneResultDO.getPaperId())
.eq(ExerciseDoneResultDO::getClassId, exerciseDoneResultDO.getClassId())); .eq(ExerciseDoneResultDO::getClassId, exerciseDoneResultDO.getClassId()));
if (count > 3) { if (count >= 3) {
throw new HttpException(60001); throw new HttpException(60001);
} }
}
return ConstantUtils.CHECK_STATUS; return ConstantUtils.CHECK_STATUS;
} }
......
...@@ -10,16 +10,14 @@ import com.subsidy.service.PushDataService; ...@@ -10,16 +10,14 @@ import com.subsidy.service.PushDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.service.RenshejuHistoryService; import com.subsidy.service.RenshejuHistoryService;
import com.subsidy.util.RenSheJuConstant; import com.subsidy.util.RenSheJuConstant;
import com.subsidy.util.SMSUtils;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.configurationprocessor.json.JSONObject; import org.springframework.boot.configurationprocessor.json.JSONObject;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/** /**
* <p> * <p>
...@@ -59,6 +57,9 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu ...@@ -59,6 +57,9 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
@Autowired @Autowired
private PushAnsweringDataMapper pushAnsweringDataMapper; private PushAnsweringDataMapper pushAnsweringDataMapper;
@Autowired
private SMSUtils smsUtils;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void post4() { public void post4() {
...@@ -176,7 +177,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu ...@@ -176,7 +177,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
// List<RenshejuHistoryDO> renshejuHistoryDOS = renshejuHistoryMapper.selectList(new QueryWrapper<RenshejuHistoryDO>() // List<RenshejuHistoryDO> renshejuHistoryDOS = renshejuHistoryMapper.selectList(new QueryWrapper<RenshejuHistoryDO>()
// .lambda() // .lambda()
// .in(RenshejuHistoryDO::getId,longs)); // .in(RenshejuHistoryDO::getId,longs));
for (RenshejuHistoryDO renshejuHistoryDO : renshejuHistoryDOS){ for (RenshejuHistoryDO renshejuHistoryDO : renshejuHistoryDOS) {
String input = renshejuHistoryDO.getInputParam(); String input = renshejuHistoryDO.getInputParam();
Gson gson = new Gson(); Gson gson = new Gson();
UploadImageDTO uploadImageDTO = gson.fromJson(input, UploadImageDTO.class); UploadImageDTO uploadImageDTO = gson.fromJson(input, UploadImageDTO.class);
...@@ -197,29 +198,60 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu ...@@ -197,29 +198,60 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
} }
} }
public HashMap<String, List<Long>> check(){ public void sendWarning() {
HashMap<String, List<Long>> hashMap = new HashMap();
//视频
List<Long> vodList = pushVodDataMapper.vodIds();
//答疑
List<Long> answerList = pushAnsweringDataMapper.answerList();
//考试
List<Long> examList = pushExerciseDataMapper.examList();
//活跃度
List<Long> activityList = pushDetectionDataMapper.activityList();
//人脸
List<Long> imageList = pushImageDataMapper.imageList();
if (vodList.size()+answerList.size()+examList.size()+activityList.size()+imageList.size()>0){
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, null);
}
}
}
public HashMap<String, List<Long>> check() {
HashMap<String, List<Long>> hashMap = new HashMap(); HashMap<String, List<Long>> hashMap = new HashMap();
//视频 //视频
List<Long> vodList = pushVodDataMapper.vodIds(); List<Long> vodList = pushVodDataMapper.vodIds();
hashMap.put("视频",vodList); hashMap.put("视频", vodList);
//答疑 //答疑
List<Long> answerList = pushAnsweringDataMapper.answerList(); List<Long> answerList = pushAnsweringDataMapper.answerList();
hashMap.put("答疑",answerList); hashMap.put("答疑", answerList);
//考试 //考试
List<Long> examList = pushExerciseDataMapper.examList(); List<Long> examList = pushExerciseDataMapper.examList();
hashMap.put("考试",examList); hashMap.put("考试", examList);
//活跃度 //活跃度
List<Long> activityList = pushDetectionDataMapper.activityList(); List<Long> activityList = pushDetectionDataMapper.activityList();
hashMap.put("活跃度",activityList); hashMap.put("活跃度", activityList);
//人脸 //人脸
List<Long> imageList = pushImageDataMapper.imageList(); List<Long> imageList = pushImageDataMapper.imageList();
hashMap.put("人脸",imageList); hashMap.put("人脸", imageList);
return hashMap; return hashMap;
} }
......
...@@ -176,7 +176,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -176,7 +176,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
for (DailyStudyInfoVO dailyStudyInfoVO : result) { for (DailyStudyInfoVO dailyStudyInfoVO : result) {
ClassHourBasic classHourBasic = new ClassHourBasic(); ClassHourBasic classHourBasic = new ClassHourBasic();
BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic); BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic);
classHourBasic.setClassCode(dailyStudyInfoVO.getDownCode()); classHourBasic.setClassCode(dailyStudyInfoVO.getClassCode());
//找到当天每次上线下线时间 //找到当天每次上线下线时间
//上线时间 //上线时间
......
...@@ -89,7 +89,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -89,7 +89,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
if (count == 0 && flag) { if (count == 0 && flag) {
if (vodPlayHistoryDO.getPlayLength() > 8 && vodPlayHistoryDO.getSuspendLength() <= 3000) { if (vodPlayHistoryDO.getPlayLength() > 30 && vodPlayHistoryDO.getSuspendLength() <= 3000) {
Date latestDailyDate = this.baseMapper.latestDailyStudyRecord(vodPlayHistoryDO.getMemberId()); Date latestDailyDate = this.baseMapper.latestDailyStudyRecord(vodPlayHistoryDO.getMemberId());
...@@ -108,7 +108,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -108,7 +108,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
//超过时长 //超过时长
int playLength = 6 * 3600 - total; int playLength = 6 * 3600 - total;
vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayLength(playLength);
if (playLength > 8) { if (playLength > 30) {
FixLengthVO fixLengthVO = fixPlayLength(date, latestDailyDate, vodPlayHistoryDO.getPlayLength(), vodPlayHistoryDO.getSuspendLength()); FixLengthVO fixLengthVO = fixPlayLength(date, latestDailyDate, vodPlayHistoryDO.getPlayLength(), vodPlayHistoryDO.getSuspendLength());
if (null != fixLengthVO.getSuspendLength() && null != fixLengthVO.getPlayLength()) { if (null != fixLengthVO.getSuspendLength() && null != fixLengthVO.getPlayLength()) {
vodPlayHistoryMapper.insertPlayRecord(vodPlayHistoryDO.getClassId(), vodPlayHistoryDO.getVodId(), vodPlayHistoryDO.getMemberId(), fixLengthVO.getPlayLength() vodPlayHistoryMapper.insertPlayRecord(vodPlayHistoryDO.getClassId(), vodPlayHistoryDO.getVodId(), vodPlayHistoryDO.getMemberId(), fixLengthVO.getPlayLength()
...@@ -159,7 +159,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -159,7 +159,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
} }
if (count == 0 && flag) { if (count == 0 && flag) {
if (insertHistoryNewDTO.getPlayLength() > 8 && insertHistoryNewDTO.getSuspendLength() <= 3000) { if (insertHistoryNewDTO.getPlayLength() > 30 && insertHistoryNewDTO.getSuspendLength() <= 3000) {
VodPlayHistoryDO vodPlayHistoryDO = new VodPlayHistoryDO(); VodPlayHistoryDO vodPlayHistoryDO = new VodPlayHistoryDO();
BeanUtils.copyProperties(insertHistoryNewDTO, vodPlayHistoryDO); BeanUtils.copyProperties(insertHistoryNewDTO, vodPlayHistoryDO);
//查看系统设定的时长 //查看系统设定的时长
...@@ -177,7 +177,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -177,7 +177,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) { if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) {
int playLength = 6 * 3600 - total; int playLength = 6 * 3600 - total;
vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayLength(playLength);
if (playLength > 8) { if (playLength > 30) {
FixLengthVO fixLengthVO = fixPlayLength(date, latestDailyDate, vodPlayHistoryDO.getPlayLength(), vodPlayHistoryDO.getSuspendLength()); FixLengthVO fixLengthVO = fixPlayLength(date, latestDailyDate, vodPlayHistoryDO.getPlayLength(), vodPlayHistoryDO.getSuspendLength());
if (null != fixLengthVO.getSuspendLength() && null != fixLengthVO.getPlayLength()) { if (null != fixLengthVO.getSuspendLength() && null != fixLengthVO.getPlayLength()) {
vodPlayHistoryMapper.insertPlayRecord(vodPlayHistoryDO.getClassId(), vodPlayHistoryDO.getVodId(), vodPlayHistoryDO.getMemberId(), fixLengthVO.getPlayLength() vodPlayHistoryMapper.insertPlayRecord(vodPlayHistoryDO.getClassId(), vodPlayHistoryDO.getVodId(), vodPlayHistoryDO.getMemberId(), fixLengthVO.getPlayLength()
......
...@@ -12,7 +12,7 @@ public class DailyStudyInfoVO { ...@@ -12,7 +12,7 @@ public class DailyStudyInfoVO {
/** /**
* 临时班级(临时项目)编号 * 临时班级(临时项目)编号
*/ */
private String downCode; private String classCode;
/** /**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写 * 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/ */
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
class_dict t1 class_dict t1
LEFT JOIN company_dict t3 ON t1.company_id = t3.id LEFT JOIN company_dict t3 ON t1.company_id = t3.id
WHERE 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.start_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL AND t1.delete_date IS NULL
and t1.class_code is not NULL and t1.class_code is not NULL
<if test="classType != null and classType != ''"> <if test="classType != null and classType != ''">
......
...@@ -12,13 +12,16 @@ ...@@ -12,13 +12,16 @@
t2.id AS 答疑id t2.id AS 答疑id
FROM FROM
answering_question t2 answering_question t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_answering_data t1 ON t1.class_id = t2.class_id LEFT JOIN push_answering_data t1 ON t1.class_id = t2.class_id
AND t1.ask_id = t2.ask_id AND t1.ask_id = t2.ask_id
AND t1.create_date = t2.create_date AND t1.create_date = t2.create_date
AND t1.update_date = t2.update_date AND t1.update_date = t2.update_date
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.update_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.update_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL AND t1.create_date IS NULL
and t3.class_type = 0
</select> </select>
</mapper> </mapper>
...@@ -12,12 +12,15 @@ ...@@ -12,12 +12,15 @@
t2.id 活跃度id t2.id 活跃度id
FROM FROM
activity_detection t2 activity_detection t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_detection_data t1 ON t1.class_id = t2.class_id LEFT JOIN push_detection_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id AND t1.member_id = t2.member_id
AND t1.create_date = t2.create_date AND t1.create_date = t2.create_date
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.create_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL AND t1.create_date IS NULL
and t3.class_type = 0
</select> </select>
</mapper> </mapper>
...@@ -12,14 +12,16 @@ ...@@ -12,14 +12,16 @@
t2.id as 考试id t2.id as 考试id
FROM FROM
exercise_done_result t2 exercise_done_result t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_exercise_data t1 ON t1.class_id = t2.class_id LEFT JOIN push_exercise_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id AND t1.member_id = t2.member_id
AND t1.start_date = t2.start_date AND t1.start_date = t2.start_date
AND t1.create_date = t2.create_date AND t1.create_date = t2.create_date
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.create_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL AND t1.create_date IS NULL
and t3.class_type = 0
</select> </select>
</mapper> </mapper>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
t2.id 人脸id t2.id 人脸id
FROM FROM
image_check_record t2 image_check_record t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_image_data t1 ON t1.class_id = t2.class_id LEFT JOIN push_image_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id AND t1.member_id = t2.member_id
AND t1.occurred_time = t2.create_date AND t1.occurred_time = t2.create_date
...@@ -20,5 +21,6 @@ ...@@ -20,5 +21,6 @@
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.id IS NULL AND t1.id IS NULL
AND t2.result = 1 AND t2.result = 1
and t3.class_type = 0
</select> </select>
</mapper> </mapper>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
t2.id as 视频id t2.id as 视频id
FROM FROM
vod_play_history t2 vod_play_history t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_vod_data t1 ON t1.class_id = t2.class_id LEFT JOIN push_vod_data t1 ON t1.class_id = t2.class_id
AND t1.vod_id = t2.vod_id AND t1.vod_id = t2.vod_id
AND t1.member_id = t2.member_id AND t1.member_id = t2.member_id
...@@ -20,8 +21,9 @@ ...@@ -20,8 +21,9 @@
AND t1.create_date = t2.create_date AND t1.create_date = t2.create_date
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.create_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL AND t1.create_date IS NULL
and t3.class_type = 0
</select> </select>
</mapper> </mapper>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<select id="dailyStudyInfo" resultType="com.subsidy.vo.renshe.DailyStudyInfoVO"> <select id="dailyStudyInfo" resultType="com.subsidy.vo.renshe.DailyStudyInfoVO">
SELECT SELECT
t.class_id, t.class_id,
t5.class_code AS downCode, t5.class_code,
t3.id AS member_id, t3.id AS member_id,
t3.user_name AS studentName, t3.user_name AS studentName,
t3.telephone AS phone, t3.telephone AS phone,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!