Commit a079f1ef by 涂亚平

解决时间交叉,活跃度检测的问题

重新开始推送数据
1 parent 096878dd
...@@ -123,7 +123,7 @@ public class AdministerController { ...@@ -123,7 +123,7 @@ public class AdministerController {
@PostMapping("exportExerciseTest") @PostMapping("exportExerciseTest")
@ApiOperation("班级管理--测评成绩 id 班级id userName paperId") @ApiOperation("班级管理--测评成绩 id 班级id userName paperId")
// @LoginRequired @LoginRequired
public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception { public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true); classDetailDTO.setFlag(true);
administerService.exportExerciseTest(classDetailDTO); administerService.exportExerciseTest(classDetailDTO);
......
...@@ -105,7 +105,4 @@ public class VodPlayHistoryController { ...@@ -105,7 +105,4 @@ public class VodPlayHistoryController {
return vodPlayHistoryService.criticalData(vodPlayHistoryDO); return vodPlayHistoryService.criticalData(vodPlayHistoryDO);
} }
} }
...@@ -64,76 +64,76 @@ public class RenSheJuJob { ...@@ -64,76 +64,76 @@ public class RenSheJuJob {
private String env; private String env;
// /** /**
//// * POST-2:班级基本信息信息采集接口 // * POST-2:班级基本信息信息采集接口
//// */
// @Scheduled(cron = "0 0 1 * * ?")
// public void classBaseInfo() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classBaseInfo();
// }
// }
//
// /**
// * POST-3:学时信息采集接口
// */
// @Scheduled(cron = "0 5 1 * * ?")
// public void classHourBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classHourBehavior();
// }
// }
//
// /**
// * POST-4:考试信息采集接口
// */
// @Scheduled(cron = "0 10 1 * * ?")
// public void uploadChapterBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadChapterBehavior();
// }
// }
//
// /**
// * POST-5:答疑辅导采集接口
// */
// @Scheduled(cron = "0 15 1 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// /**
// * POST-6 班级活跃度/实名认证照片信息采集接口
// */
// @Scheduled(cron = "0 20 1 * * ?")
// public void uploadImage() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadImage();
// }
// }
//
// /**
// * POST-7 获取培训待绑定的(班级编号,项目编号)列表
// */
// @Scheduled(cron = "0 25 1 * * ?")
// public void getClassCodeByPrivateKey() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.getClassCodeByPrivateKey();
// }
// }
//
// /**
// * POST-8 上下游班级数据绑定接口
// */ // */
// @Scheduled(cron = "0 30 1 * * ?") @Scheduled(cron = "0 0 1 * * ?")
// public void uploadClassCode() throws IOException { public void classBaseInfo() throws IOException {
// if ("prod".equals(env)) { if ("prod".equals(env)) {
// renSheJuService.uploadClassCode(); renSheJuService.classBaseInfo();
// } }
// System.gc(); }
// }
/**
* POST-3:学时信息采集接口
*/
@Scheduled(cron = "0 5 1 * * ?")
public void classHourBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.classHourBehavior();
}
}
/**
* POST-4:考试信息采集接口
*/
@Scheduled(cron = "0 10 1 * * ?")
public void uploadChapterBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadChapterBehavior();
}
}
/**
* POST-5:答疑辅导采集接口
*/
@Scheduled(cron = "0 15 1 * * ?")
public void uploadClassAnswerQuestionBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassAnswerQuestionBehavior();
}
}
/**
* POST-6 班级活跃度/实名认证照片信息采集接口
*/
@Scheduled(cron = "0 20 1 * * ?")
public void uploadImage() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadImage();
}
}
/**
* POST-7 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 25 1 * * ?")
public void getClassCodeByPrivateKey() throws IOException {
if ("prod".equals(env)) {
renSheJuService.getClassCodeByPrivateKey();
}
}
/**
* POST-8 上下游班级数据绑定接口
*/
@Scheduled(cron = "0 30 1 * * ?")
public void uploadClassCode() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassCode();
}
System.gc();
}
// /** // /**
// * POST-9 获取推送失败班级列表 // * POST-9 获取推送失败班级列表
...@@ -297,7 +297,6 @@ public class RenSheJuJob { ...@@ -297,7 +297,6 @@ public class RenSheJuJob {
activityDetectionMapper.deleteById(activityDetectionDO.getId()); activityDetectionMapper.deleteById(activityDetectionDO.getId());
} }
}); });
} }
......
...@@ -142,10 +142,10 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -142,10 +142,10 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL); renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO); renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"}); // List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) { // for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_2); // smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_2);
} // }
} }
return null; return null;
} }
...@@ -165,7 +165,6 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -165,7 +165,6 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0"); List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List<DailyStudyInfoVO> result = new ArrayList<>(); List<DailyStudyInfoVO> result = new ArrayList<>();
// List<Long> vodClassIds = new ArrayList<>();
try { try {
...@@ -251,6 +250,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -251,6 +250,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
} }
renshejuHistoryMapper.insert(renshejuHistoryDO); renshejuHistoryMapper.insert(renshejuHistoryDO);
return rensheResponseVO; return rensheResponseVO;
// return null;
} else { } else {
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
...@@ -406,10 +406,11 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -406,10 +406,11 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString()); renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString());
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL); renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO); renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) { // List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_4); // for (String telephone : telephones) {
} // smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_4);
// }
} }
return null; return null;
} }
...@@ -427,6 +428,9 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -427,6 +428,9 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<DailyAnswerVO> dailyAnswerVOS = renSheJuMapper.dailyAnswer("0"); List<DailyAnswerVO> dailyAnswerVOS = renSheJuMapper.dailyAnswer("0");
// List<DailyAnswerVO> dailyAnswerVOS = new ArrayList<>();
try { try {
if (dailyAnswerVOS.size() > 0) { if (dailyAnswerVOS.size() > 0) {
HashMap<String, List<AnswerAndQuestionList>> hashMap = new HashMap<>(); HashMap<String, List<AnswerAndQuestionList>> hashMap = new HashMap<>();
...@@ -498,10 +502,10 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -498,10 +502,10 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadClassAnswerQuestionBehaviorDTO).toString()); renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadClassAnswerQuestionBehaviorDTO).toString());
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL); renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO); renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"}); // List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) { // for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_5); // smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_5);
} // }
} }
return null; return null;
} }
...@@ -517,10 +521,6 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -517,10 +521,6 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//找到昨天做过人脸识别的班级 //找到昨天做过人脸识别的班级
List<Long> classIds = renSheJuMapper.checkClassIds("0"); List<Long> classIds = renSheJuMapper.checkClassIds("0");
// List<Long> classIds = new ArrayList<>();
//
// classIds.add(451L);
for (Long classId : classIds) { for (Long classId : classIds) {
UploadImageDTO uploadImage = new UploadImageDTO(); UploadImageDTO uploadImage = new UploadImageDTO();
......
...@@ -2,30 +2,12 @@ ...@@ -2,30 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.RenSheJuMapper"> <mapper namespace="com.subsidy.mapper.RenSheJuMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CertCompanyMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="cert_id" property="certId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, cert_id
</sql>
<select id="classBaseInfo" parameterType="long" resultType="com.subsidy.vo.renshe.ClassBaseInfoVO"> <select id="classBaseInfo" parameterType="long" resultType="com.subsidy.vo.renshe.ClassBaseInfoVO">
SELECT SELECT
t2.id AS downCode, t2.id AS downCode,
t2.class_code, t2.class_code,
t2.class_name AS shortName, t2.class_name AS shortName,
ROUND( sum( t7.vod_length )/ 60 ) AS learnHour, FLOOR( sum( t7.vod_length )/ 60 ) AS learnHour,
FLOOR( sum( t7.vod_length )/ 2700 ) AS courseHour, FLOOR( sum( t7.vod_length )/ 2700 ) AS courseHour,
REPLACE ( unix_timestamp( t2.start_date ), '.', '' )/ 1000 AS startDate, REPLACE ( unix_timestamp( t2.start_date ), '.', '' )/ 1000 AS startDate,
REPLACE ( unix_timestamp( t2.end_date ), '.', '' )/ 1000 AS endDate, REPLACE ( unix_timestamp( t2.end_date ), '.', '' )/ 1000 AS endDate,
...@@ -67,7 +49,7 @@ ...@@ -67,7 +49,7 @@
SELECT SELECT
t7.id AS chapterCode, t7.id AS chapterCode,
IFNULL( t6.vod_alias_name, t7.vod_name ) as chapterName, IFNULL( t6.vod_alias_name, t7.vod_name ) as chapterName,
ROUND( t7.vod_length / 60 ) as chapterTime, FLOOR( t7.vod_length / 60 ) as chapterTime,
0 as isExam, 0 as isExam,
120 as examTime 120 as examTime
FROM FROM
...@@ -90,17 +72,17 @@ ...@@ -90,17 +72,17 @@
</select> </select>
<select id="newClasses" parameterType="string" resultType="long"> <select id="newClasses" parameterType="string" resultType="long">
SELECT DISTINCT SELECT DISTINCT
t1.id t1.id
FROM FROM
class_dict t1 class_dict t1
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.create_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 != ''">
and t1.class_type = #{classType} and t1.class_type = #{classType}
</if> </if>
</select> </select>
<select id="dailyStudyInfo" resultType="com.subsidy.vo.renshe.DailyStudyInfoVO"> <select id="dailyStudyInfo" resultType="com.subsidy.vo.renshe.DailyStudyInfoVO">
...@@ -389,21 +371,21 @@ ...@@ -389,21 +371,21 @@
</select> </select>
<select id="checkClassIds" parameterType="string" resultType="long"> <select id="checkClassIds" parameterType="string" resultType="long">
SELECT SELECT
distinct class_id distinct class_id
FROM FROM
image_check_record t image_check_record t
left join class_dict t2 on t.class_id = t2.id left join class_dict t2 on t.class_id = t2.id
WHERE WHERE
t.delete_date IS NULL 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 1 day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
and class_id is not null and class_id is not null
<if test="classType != null and classType != ''"> <if test="classType != null and classType != ''">
and t2.class_type = #{classType} and t2.class_type = #{classType}
</if> </if>
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!