Commit 157fb021 by 涂亚平

春节备份

1 parent 1e2b22bf
......@@ -30,9 +30,9 @@ public class WebLogAspect {
public void logBeforeController(JoinPoint joinPoint) {
// RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
//这个RequestContextHolder是Springmvc提供来获得请求的东西
// HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest();
HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest();
// 记录下请求内容
// logger.info("####requestUrl : " + request.getRequestURL().toString());
......
......@@ -29,10 +29,10 @@ import java.util.List;
@RequestMapping("/oss")
public class OssController {
public static final String keyId = "LTAI5tPAH7P7WQVeowo517BE";
public static final String keyId = "LTAI5tLUBG4B6QxhHrhddc7p";
public static final String secret = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY";
public static final String secret = "eber38QGHZixTQ6bFfrd80kbg67jIP";
@Value("${spring.profiles.active}")
......
......@@ -62,7 +62,7 @@ public class SignInRecordController {
@PostMapping("signInStatus")
@ApiOperation("判断学生当天有没有打卡 {memberId 学生id}")
// @LoginRequired
@LoginRequired
@TimeRequired
public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO) {
return ResponseData.generateCreatedResponse(0, signInRecordService.signInStatus(signInRecordDO));
......
package com.subsidy.jobs;
import com.subsidy.service.DudaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* 企业职工线上培训
*/
@Component
public class DudaoJob {
@Value("${spring.profiles.active}")
private String env;
@Autowired
private DudaoService dudaoService;
@Scheduled(cron = "0 0 2 * * ?")
public void classBaseInfo() throws IOException {
if ("prod".equals(env)){
dudaoService.classBaseInfo();
}
}
@Scheduled(cron = "0 5 2 * * ?")
public void classHourBehavior() throws IOException {
if ("prod".equals(env)){
dudaoService.classHourBehavior();
}
}
@Scheduled(cron = "0 10 2 * * ?")
public void uploadChapterBehavior() throws IOException {
if ("prod".equals(env)){
dudaoService.uploadChapterBehavior();
}
}
@Scheduled(cron = "0 15 2 * * ?")
public void uploadClassAnswerQuestionBehavior() throws IOException {
if ("prod".equals(env)){
dudaoService.uploadClassAnswerQuestionBehavior();
}
}
@Scheduled(cron = "0 20 2 * * ?")
public void uploadClassCode()throws IOException {
if ("prod".equals(env)){
dudaoService.uploadClassCode();
}
}
}
//package com.subsidy.jobs;
//
//import com.subsidy.service.DudaoService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
///**
// * 企业职工线上培训
// */
//@Component
//public class DudaoJob {
//
// @Value("${spring.profiles.active}")
// private String env;
//
// @Autowired
// private DudaoService dudaoService;
//
// @Scheduled(cron = "0 0 2 * * ?")
// public void classBaseInfo() throws IOException {
// if ("prod".equals(env)){
// dudaoService.classBaseInfo();
// }
// }
//
// @Scheduled(cron = "0 5 2 * * ?")
// public void classHourBehavior() throws IOException {
// if ("prod".equals(env)){
// dudaoService.classHourBehavior();
// }
// }
//
// @Scheduled(cron = "0 10 2 * * ?")
// public void uploadChapterBehavior() throws IOException {
// if ("prod".equals(env)){
// dudaoService.uploadChapterBehavior();
// }
// }
//
// @Scheduled(cron = "0 15 2 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// if ("prod".equals(env)){
// dudaoService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// @Scheduled(cron = "0 20 2 * * ?")
// public void uploadClassCode()throws IOException {
// if ("prod".equals(env)){
// dudaoService.uploadClassCode();
// }
// }
//
//}
package com.subsidy.jobs;
import com.subsidy.service.PushDataService;
import com.subsidy.service.impl.PushDataServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* 核对数据定时任务
*/
@Component
public class PushJob {
@Value("${spring.profiles.active}")
private String env;
@Autowired
private PushDataService pushDataService;
/**
* POST-4:学时
*/
@Scheduled(cron = "0 0 4 * * ?")
public void post4() throws IOException {
if ("prod".equals(env)) {
pushDataService.post4();
}
}
/**
* POST-5: 考试
*/
@Scheduled(cron = "0 10 4 * * ?")
public void post5() throws IOException {
if ("prod".equals(env)) {
pushDataService.post5();
}
}
/**
* POST-6: 答疑
*/
@Scheduled(cron = "0 20 4 * * ?")
public void post6() throws IOException {
if ("prod".equals(env)) {
pushDataService.post6();
}
}
/**
* POST-7:人脸
*/
@Scheduled(cron = "0 30 4 * * ?")
public void post7() throws IOException {
if ("prod".equals(env)) {
pushDataService.post7();
}
}
/**
* 定时发短信
*/
@Scheduled(cron = "0 0 9 * * ?")
public void sendWarning(){
pushDataService.sendWarning();
}
}
//package com.subsidy.jobs;
//
//import com.subsidy.service.PushDataService;
//import com.subsidy.service.impl.PushDataServiceImpl;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
///**
// * 核对数据定时任务
// */
//@Component
//public class PushJob {
//
// @Value("${spring.profiles.active}")
// private String env;
//
// @Autowired
// private PushDataService pushDataService;
//
// /**
// * POST-4:学时
// */
// @Scheduled(cron = "0 0 4 * * ?")
// public void post4() throws IOException {
// if ("prod".equals(env)) {
// pushDataService.post4();
// }
// }
//
// /**
// * POST-5: 考试
// */
// @Scheduled(cron = "0 10 4 * * ?")
// public void post5() throws IOException {
// if ("prod".equals(env)) {
// pushDataService.post5();
// }
// }
//
// /**
// * POST-6: 答疑
// */
// @Scheduled(cron = "0 20 4 * * ?")
// public void post6() throws IOException {
// if ("prod".equals(env)) {
// pushDataService.post6();
// }
// }
//
// /**
// * POST-7:人脸
// */
// @Scheduled(cron = "0 30 4 * * ?")
// public void post7() throws IOException {
// if ("prod".equals(env)) {
// pushDataService.post7();
// }
// }
//
//
// /**
// * 定时发短信
// */
// @Scheduled(cron = "0 0 9 * * ?")
// public void sendWarning(){
// pushDataService.sendWarning();
// }
//
//
//
//
//
//}
......@@ -64,65 +64,65 @@ public class RenSheJuJob {
private String env;
/**
// * POST-3:班级基本信息信息采集接口
// /**
//// * POST-3:班级基本信息信息采集接口
//// */
// @Scheduled(cron = "0 0 1 * * ?")
// public void classBaseInfo() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classBaseInfo();
// }
// }
//
// /**
// * POST-4:学时信息采集接口
// */
@Scheduled(cron = "0 0 1 * * ?")
public void classBaseInfo() throws IOException {
if ("prod".equals(env)) {
renSheJuService.classBaseInfo();
}
}
/**
* POST-4:学时信息采集接口
*/
@Scheduled(cron = "0 5 1 * * ?")
public void classHourBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.classHourBehavior();
}
}
/**
* POST-5:考试信息采集接口
*/
@Scheduled(cron = "0 10 1 * * ?")
public void uploadChapterBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadChapterBehavior();
}
}
/**
* POST-6:答疑辅导采集接口
*/
@Scheduled(cron = "0 15 1 * * ?")
public void uploadClassAnswerQuestionBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassAnswerQuestionBehavior();
}
}
/**
* POST-7 班级活跃度/实名认证照片信息采集接口
*/
@Scheduled(cron = "0 20 1 * * ?")
public void uploadImage() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadImage();
}
}
/**
* POST-8 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 25 1 * * ?")
public void getClassCodeByPrivateKey() throws IOException {
if ("prod".equals(env)) {
renSheJuService.getClassCodeByPrivateKey();
}
}
// @Scheduled(cron = "0 5 1 * * ?")
// public void classHourBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classHourBehavior();
// }
// }
//
// /**
// * POST-5:考试信息采集接口
// */
// @Scheduled(cron = "0 10 1 * * ?")
// public void uploadChapterBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadChapterBehavior();
// }
// }
//
// /**
// * POST-6:答疑辅导采集接口
// */
// @Scheduled(cron = "0 15 1 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// /**
// * POST-7 班级活跃度/实名认证照片信息采集接口
// */
// @Scheduled(cron = "0 20 1 * * ?")
// public void uploadImage() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadImage();
// }
// }
//
// /**
// * POST-8 获取培训待绑定的(班级编号,项目编号)列表
// */
// @Scheduled(cron = "0 25 1 * * ?")
// public void getClassCodeByPrivateKey() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.getClassCodeByPrivateKey();
// }
// }
// /**
// * POST-8 上下游班级数据绑定接口
......
......@@ -187,6 +187,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
}
if (null != administerDO1) {
//加密
if (administerDO1.getPassword().equals(administerDO.getPassword())) {
String token = JwtUtil.generateToken(administerDO1.getId(), ConstantUtils.ADMINISTER_TERMINATE);
//登录成功,记录日志
......
......@@ -83,7 +83,7 @@ public class DudaoServiceImpl implements DudaoService {
List<Long> imageClassIds = dudaoMapper.imageClassIds("0");
Set<Long> classIds = new HashSet<>();
// classIds.add(488L);
// classIds.add(535L);
vodClassIds.stream().forEach(x->classIds.add(x));
examClassIds.stream().forEach(x->classIds.add(x));
......@@ -176,7 +176,7 @@ public class DudaoServiceImpl implements DudaoService {
List<Long> vodClassIds = dudaoMapper.vodClassIds("0");
// List<Long> vodClassIds = new ArrayList<>();
// vodClassIds.add(488L);
// vodClassIds.add(535L);
List<DailyStudyInfoVO> result = new ArrayList<>();
......@@ -307,7 +307,7 @@ public class DudaoServiceImpl implements DudaoService {
List<Long> classIds = dudaoMapper.dailyExamBasic("0");
// List<Long>classIds = new ArrayList<>();
// classIds.add(488L);
// classIds.add(535L);
try {
if (classIds.size() > 0) {
......
......@@ -737,7 +737,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
CheckStatusVO checkStatusVO = new CheckStatusVO();
MemberDO memberDO1 = this.baseMapper.selectById(memberDO.getId());
if (memberDO1.getFirstLogin() == 1) {
if (null != memberDO1.getFirstLogin() && memberDO1.getFirstLogin() == 1) {
checkStatusVO.setSMSStatus(true);
} else {
checkStatusVO.setSMSStatus(false);
......
......@@ -65,12 +65,12 @@ public class ConstantUtils {
/**
* 短信 RAM账号AccessKey ID
*/
public static final String ACCESS_KEY_ID = "LTAI5tPAH7P7WQVeowo517BE";
public static final String ACCESS_KEY_ID = "LTAI5tLUBG4B6QxhHrhddc7p";
/**
* 短信 RAM账号AccessKey Secret
*/
public static final String SECRET = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY";
public static final String SECRET = "eber38QGHZixTQ6bFfrd80kbg67jIP";
/**
* 腾讯云点播视频转码模板
......
......@@ -17,10 +17,10 @@ import java.util.UUID;
public class OSSUtils {
// @Value("${aliyun.oss.accessKeyId}")
private static String accessKeyId = "LTAI5tPAH7P7WQVeowo517BE";
private static String accessKeyId = "LTAI5tLUBG4B6QxhHrhddc7p";
// @Value("${aliyun.oss.accessKeySecret}")
private static String secretAccessKey = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY";
private static String secretAccessKey = "eber38QGHZixTQ6bFfrd80kbg67jIP";
// @Value("${aliyun.oss.endpoint}")
private static String endPoint = "oss-cn-beijing.aliyuncs.com";
......
......@@ -120,4 +120,5 @@ public class VodUtil {
throw new HttpException(99999, e.getMessage());
}
}
}
......@@ -2,21 +2,21 @@
spring.server.port=23457
# 数据源配置
#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
##spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
##spring.datasource.username=ykadmin_new
##spring.datasource.password=youkedb608@good
#spring.datasource.username=devloper
#spring.datasource.password=dev@1553$
# 数据源配置
spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=ykhladmin302
#spring.datasource.username=ykadmin_new
#spring.datasource.password=youkedb608@good
spring.datasource.username=devloper
spring.datasource.password=dev@1553$
# 数据源配置
#spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.username=root
#spring.datasource.password=ykhladmin302
spring.datasource.druid.initialSize=5
spring.datasource.druid.minIdle=5
......
......@@ -2,7 +2,8 @@
spring.server.port=23459
# 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url=jdbc:mysql://rm-uf62202s176hufw8x0o.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=ykadmin_new
......
......@@ -42,8 +42,8 @@ spring.cache.ehcache.config=classpath:ehcache.xml
# 阿里云短信
sms.product=Dysmsapi
sms.domain=dysmsapi.aliyuncs.com
sms.accessKeyId=LTAI5tPAH7P7WQVeowo517BE
sms.accessKeySecret=0ueqhIfdAZyw5lWlBVSLpAxTtx37RY
sms.accessKeyId=LTAI5tLUBG4B6QxhHrhddc7p
sms.accessKeySecret=eber38QGHZixTQ6bFfrd80kbg67jIP
#wechat.app-id=wx7785293ff5e31f14
#wechat.app-secret=25d57cad61fc1b45b3afa46d4c35e8f6
#wechat.agentId=1000008
......
......@@ -437,7 +437,7 @@
WHERE
t1.delete_date IS NULL
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.class_id = #{classId}
</select>
<select id="classVodName" parameterType="long" resultType="string">
......
......@@ -403,7 +403,7 @@
<select id="getMemberListBySignInRecord" resultType="com.subsidy.model.MemberDO">
SELECT
m.*
distinct m.*
FROM
member m
LEFT JOIN class_member_mapping cmm ON cmm.member_id = m.id
......@@ -413,8 +413,7 @@
AND m.delete_date IS NULL
AND cmm.delete_date IS NULL
AND s.signInCount is null
GROUP BY
m.id
</select>
<select id="getUnfinishedMemberList" resultType="com.subsidy.model.MemberDO">
......
......@@ -120,7 +120,7 @@
AND opr_type = "登录"
and delete_date IS NULL
GROUP BY
user_id
user_id,opr_type
ORDER BY
create_date DESC
) t1
......@@ -137,7 +137,7 @@
AND opr_type = "登出"
and delete_date is null
GROUP BY
user_id
user_id,opr_type
ORDER BY
create_date DESC
) t2 ON t1.user_id = t2.user_id
......@@ -263,7 +263,7 @@
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
member_id
member_id,ip_address
) t3 ON t1.member_id = t3.member_id
</select>
......
......@@ -39,7 +39,7 @@
and t3.delete_date is null
and t3.id = #{id}
<if test="courseName != null and courseName !=''">
AND t.course_name like concat('%',#{courseName} ,'%')
AND t2.course_name like concat('%',#{courseName} ,'%')
</if>
<if test="className != null and className !=''">
and t.class_name like concat('%',#{className} ,'%')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!