Commit a079f1ef by 涂亚平

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

重新开始推送数据
1 parent 096878dd
......@@ -123,7 +123,7 @@ public class AdministerController {
@PostMapping("exportExerciseTest")
@ApiOperation("班级管理--测评成绩 id 班级id userName paperId")
// @LoginRequired
@LoginRequired
public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportExerciseTest(classDetailDTO);
......
......@@ -105,7 +105,4 @@ public class VodPlayHistoryController {
return vodPlayHistoryService.criticalData(vodPlayHistoryDO);
}
}
......@@ -64,76 +64,76 @@ public class RenSheJuJob {
private String env;
// /**
//// * 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 上下游班级数据绑定接口
/**
// * POST-2:班级基本信息信息采集接口
// */
// @Scheduled(cron = "0 30 1 * * ?")
// public void uploadClassCode() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadClassCode();
// }
// System.gc();
// }
@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 * * ?")
public void uploadClassCode() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassCode();
}
System.gc();
}
// /**
// * POST-9 获取推送失败班级列表
......@@ -297,7 +297,6 @@ public class RenSheJuJob {
activityDetectionMapper.deleteById(activityDetectionDO.getId());
}
});
}
......
......@@ -142,10 +142,10 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_2);
}
// List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
// for (String telephone : telephones) {
// smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_2);
// }
}
return null;
}
......@@ -165,7 +165,6 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List<DailyStudyInfoVO> result = new ArrayList<>();
// List<Long> vodClassIds = new ArrayList<>();
try {
......@@ -251,6 +250,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
}
renshejuHistoryMapper.insert(renshejuHistoryDO);
return rensheResponseVO;
// return null;
} else {
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
......@@ -406,10 +406,11 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString());
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_4);
}
// List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
// for (String telephone : telephones) {
// smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_4);
// }
}
return null;
}
......@@ -427,6 +428,9 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<DailyAnswerVO> dailyAnswerVOS = renSheJuMapper.dailyAnswer("0");
// List<DailyAnswerVO> dailyAnswerVOS = new ArrayList<>();
try {
if (dailyAnswerVOS.size() > 0) {
HashMap<String, List<AnswerAndQuestionList>> hashMap = new HashMap<>();
......@@ -498,10 +502,10 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadClassAnswerQuestionBehaviorDTO).toString());
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_5);
}
// List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"});
// for (String telephone : telephones) {
// smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_5);
// }
}
return null;
}
......@@ -517,10 +521,6 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//找到昨天做过人脸识别的班级
List<Long> classIds = renSheJuMapper.checkClassIds("0");
// List<Long> classIds = new ArrayList<>();
//
// classIds.add(451L);
for (Long classId : classIds) {
UploadImageDTO uploadImage = new UploadImageDTO();
......
......@@ -2,30 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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
t2.id AS downCode,
t2.class_code,
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,
REPLACE ( unix_timestamp( t2.start_date ), '.', '' )/ 1000 AS startDate,
REPLACE ( unix_timestamp( t2.end_date ), '.', '' )/ 1000 AS endDate,
......@@ -67,7 +49,7 @@
SELECT
t7.id AS chapterCode,
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,
120 as examTime
FROM
......@@ -90,17 +72,17 @@
</select>
<select id="newClasses" parameterType="string" resultType="long">
SELECT DISTINCT
t1.id
FROM
class_dict t1
WHERE
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 DISTINCT
t1.id
FROM
class_dict t1
WHERE
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">
......@@ -389,21 +371,21 @@
</select>
<select id="checkClassIds" parameterType="string" resultType="long">
SELECT
distinct class_id
SELECT
distinct class_id
FROM
image_check_record t
image_check_record t
left join class_dict t2 on t.class_id = t2.id
WHERE
t.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t.create_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>
t.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t.create_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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!