Commit 9c71b838 by 涂亚平

补贴培训第2次上课熬夜改数据

1 parent 78c193ec
...@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
/** /**
* 企业职工线上培训 * 企业职工线上培训
*/ */
@Component //@Component
public class RenSheJuJob { public class RenSheJuJob {
...@@ -118,7 +118,7 @@ public class RenSheJuJob { ...@@ -118,7 +118,7 @@ public class RenSheJuJob {
// renSheJuService.getErrorClass(); // renSheJuService.getErrorClass();
// } // }
@Scheduled(cron = "00 50 23 * * ?") @Scheduled(cron = "0 50 23 * * ?")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void logout(){ public void logout(){
//让当前用户下线 //让当前用户下线
...@@ -140,7 +140,7 @@ public class RenSheJuJob { ...@@ -140,7 +140,7 @@ public class RenSheJuJob {
} }
@Scheduled(cron = "00 55 23 * * ?") @Scheduled(cron = "0 55 23 * * ?")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void cancelLogin() { public void cancelLogin() {
......
...@@ -10,15 +10,13 @@ import com.subsidy.vo.vod.VodPlayStateVO; ...@@ -10,15 +10,13 @@ import com.subsidy.vo.vod.VodPlayStateVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet;
import java.util.List; import java.util.List;
@Component //@Component
public class WarningJob { public class WarningJob {
/** /**
...@@ -61,8 +59,9 @@ public class WarningJob { ...@@ -61,8 +59,9 @@ public class WarningJob {
VodPlayStateVO vodPlayStateVO = vodPlayStateVOS.get(i + 1); //后面 VodPlayStateVO vodPlayStateVO = vodPlayStateVOS.get(i + 1); //后面
VodPlayStateVO vodPlayStateVO1 = vodPlayStateVOS.get(i); //前面 VodPlayStateVO vodPlayStateVO1 = vodPlayStateVOS.get(i); //前面
if (vodPlayStateVO1.getEndDate().getTime() > vodPlayStateVO.getStartDate().getTime()) { if (vodPlayStateVO1.getEndDate().getTime() > vodPlayStateVO.getStartDate().getTime()) {
if (!result.contains(vodPlayStateVO1.getClassId())){
result.add(vodPlayStateVO.getClassId()); result.add(vodPlayStateVO.getClassId());
break; }
} }
} }
} }
......
...@@ -216,27 +216,27 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -216,27 +216,27 @@ public class RenSheJuServiceImpl implements RenSheJuService {
System.out.println(com.alibaba.fastjson.JSONObject.toJSONString(classHourBehaviorDTO)); System.out.println(com.alibaba.fastjson.JSONObject.toJSONString(classHourBehaviorDTO));
if (classHourBasics.size()>0){ if (classHourBasics.size()>0){
RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString()); // RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString());
//
Request request = new Request.Builder() // Request request = new Request.Builder()
.url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior") // .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior")
.method("POST", body) // .method("POST", body)
.addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") // .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)")
.addHeader("Content-Type", "application/json") // .addHeader("Content-Type", "application/json")
.build(); // .build();
Response response = client.newCall(request).execute(); // Response response = client.newCall(request).execute();
//
RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); // RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class);
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); // RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); // renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString()); // renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString());
if (200 == response.code()) { // if (200 == response.code()) {
renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); // renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString());
} else { // } else {
renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR); // renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR);
} // }
renshejuHistoryMapper.insert(renshejuHistoryDO); // renshejuHistoryMapper.insert(renshejuHistoryDO);
return rensheResponseVO; // return rensheResponseVO;
}else { }else {
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
......
...@@ -695,18 +695,9 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -695,18 +695,9 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
result.add(vodPlayStateVO.getClassId()); result.add(vodPlayStateVO.getClassId());
} }
} }
break;
} }
} }
} }
//
// StringBuffer stringBuffer = new StringBuffer();
// for (int i = 0; i < result.size(); i++) {
// stringBuffer.append(result);
// if (i == result.size()-1){
// stringBuffer.append("n");
// }
// }
if (result.size()>0){ if (result.size()>0){
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812", "18217669021"}); List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812", "18217669021"});
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
FROM FROM
vod_play_history t1 vod_play_history t1
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 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
</select> </select>
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
SELECT SELECT
t.member_id, t.member_id,
t.vod_id, t.vod_id,
max( t.create_date ) AS create_date max( t.id ) AS id
FROM FROM
vod_play_history t vod_play_history t
WHERE WHERE
...@@ -105,9 +105,7 @@ ...@@ -105,9 +105,7 @@
t.vod_id, t.vod_id,
t.class_id t.class_id
) t ) t
LEFT JOIN vod_play_history t2 ON t.vod_id = t2.vod_id LEFT JOIN vod_play_history t2 ON t.id = t2.id
AND t.member_id = t2.member_id
AND t.create_date = t2.create_date
) t4 ON t2.vod_id = t4.vod_id ) t4 ON t2.vod_id = t4.vod_id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
FROM FROM
vod_play_history t vod_play_history t
WHERE WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id ) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id LEFT JOIN company_dict t3 ON t.company_id = t3.id
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
FROM FROM
exercise_done_result t exercise_done_result t
WHERE WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id ) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id LEFT JOIN company_dict t3 ON t.company_id = t3.id
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
FROM FROM
answering_question t answering_question t
WHERE WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id ) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id LEFT JOIN company_dict t3 ON t.company_id = t3.id
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
FROM FROM
image_check_record t image_check_record t
WHERE WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL AND t.delete_date IS NULL
AND t.result = 1 AND t.result = 1
) t2 ON t.id = t2.class_id ) t2 ON t.id = t2.class_id
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
FROM FROM
vod_play_history t1 vod_play_history t1
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 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 AND
t1.delete_date IS NULL t1.delete_date IS NULL
GROUP BY GROUP BY
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 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 AND
t1.delete_date IS NULL t1.delete_date IS NULL
AND opr_type = "登出" AND opr_type = "登出"
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 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 AND
t1.delete_date IS NULL t1.delete_date IS NULL
AND opr_type = "登录" AND opr_type = "登录"
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
WHERE WHERE
t1.delete_date IS NULL t1.delete_date IS NULL
AND t2.class_type = #{classType} AND t2.class_type = #{classType}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( AND DATE_FORMAT( DATE_ADD( t1.create_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
LEFT JOIN member t3 ON t1.ask_id = t3.id LEFT JOIN member t3 ON t1.ask_id = t3.id
LEFT JOIN company_dict t4 ON t2.company_id = t4.id LEFT JOIN company_dict t4 ON t2.company_id = t4.id
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.update_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND AND
t1.delete_date IS NULL t1.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -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 0 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 != ''">
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
FROM FROM
opr_adm_dict opr_adm_dict
WHERE WHERE
create_date &lt; (NOW() -interval 0 day) create_date &lt; (NOW() -interval 1 day)
</select> </select>
</mapper> </mapper>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
FROM FROM
opr_mem_dict opr_mem_dict
WHERE WHERE
create_date &lt; (NOW() -interval 0 day) create_date &lt; (NOW() -interval 1 day)
</select> </select>
<select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO"> <select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO">
...@@ -199,7 +199,14 @@ ...@@ -199,7 +199,14 @@
delete_date IS NULL delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' ) AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY GROUP BY
ask_id ask_id UNION ALL
SELECT member_id,
max( create_date ) AS maxtime
from
activity_detection
where delete_date is null
and DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY member_id
) t1 ) t1
GROUP BY GROUP BY
t1.member_id t1.member_id
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
delete_date IS NULL delete_date IS NULL
AND date(sign_in_date) = date_sub( AND date(sign_in_date) = date_sub(
curdate(), curdate(),
interval 0 day) interval 1 day)
</select> </select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!