|
@@ -308,7 +308,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), OpenTheGoodsCode);
|
|
ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), OpenTheGoodsCode);
|
|
|
- if(Validator.isNotEmpty(rb)){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(rb)) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -333,14 +333,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
param.put("name", "");
|
|
param.put("name", "");
|
|
|
ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), informationNotificationCode);
|
|
ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), informationNotificationCode);
|
|
|
- if(Validator.isNotEmpty(rb)){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(rb)) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//同步用户购买商品的考试次数和前培次数
|
|
//同步用户购买商品的考试次数和前培次数
|
|
|
- // sendGoods();
|
|
|
|
|
|
|
+ // sendGoods();
|
|
|
return "请求成功";
|
|
return "请求成功";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -388,8 +388,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
String res;
|
|
String res;
|
|
|
String resEnd;
|
|
String resEnd;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Long timeId = classTwentyGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
- Long timeEndId = classTwentyGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
|
|
+ Long timeId = classTwentyGradeUserVo.getClassStartTime() * 1000;
|
|
|
|
|
+ Long timeEndId = classTwentyGradeUserVo.getClassStartTime() * 1000;
|
|
|
Date date = new Date(timeId);
|
|
Date date = new Date(timeId);
|
|
|
Date dateEnd = new Date(timeEndId);
|
|
Date dateEnd = new Date(timeEndId);
|
|
|
res = simpleDateFormat.format(date);
|
|
res = simpleDateFormat.format(date);
|
|
@@ -408,10 +408,10 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
|
|
|
informUserAddBo.setGoodsId(classTwentyGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classTwentyGradeUserVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩20天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
- if (informTwentyRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
|
+ if (informTwentyRemindVo.getNoteStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(classTwentyGradeUserVo.getUserId());
|
|
informUserAddBo.setUserId(classTwentyGradeUserVo.getUserId());
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -424,13 +424,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGoodsId(classTwentyGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classTwentyGradeUserVo.getGoodsId());
|
|
|
informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的"+goodsVo1.getGoodsName()+"课程班级有效期还剩20天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
UserVo userVo = iUserService.queryById(classTwentyGradeUserVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(classTwentyGradeUserVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
param.put("time", resEnd);
|
|
param.put("time", resEnd);
|
|
|
param.put("day", 20);
|
|
param.put("day", 20);
|
|
|
- if(Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -440,8 +440,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
String res;
|
|
String res;
|
|
|
String resEnd;
|
|
String resEnd;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Long timeId = classTenGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
- Long timeEndId = classTenGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
|
|
+ Long timeId = classTenGradeUserVo.getClassStartTime() * 1000;
|
|
|
|
|
+ Long timeEndId = classTenGradeUserVo.getClassStartTime() * 1000;
|
|
|
Date date = new Date(timeId);
|
|
Date date = new Date(timeId);
|
|
|
Date dateEnd = new Date(timeEndId);
|
|
Date dateEnd = new Date(timeEndId);
|
|
|
res = simpleDateFormat.format(date);
|
|
res = simpleDateFormat.format(date);
|
|
@@ -460,10 +460,10 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
|
|
|
informUserAddBo.setGoodsId(classTenGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classTenGradeUserVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩10天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
- if (informTenRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
|
+ if (informTenRemindVo.getNoteStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(classTenGradeUserVo.getUserId());
|
|
informUserAddBo.setUserId(classTenGradeUserVo.getUserId());
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -476,14 +476,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGoodsId(classTenGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classTenGradeUserVo.getGoodsId());
|
|
|
informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的"+goodsVo1.getGoodsName()+"课程班级有效期还剩10天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
|
UserVo userVo = iUserService.queryById(classTenGradeUserVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(classTenGradeUserVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
param.put("time", resEnd);
|
|
param.put("time", resEnd);
|
|
|
param.put("day", 10);
|
|
param.put("day", 10);
|
|
|
- if(Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -493,8 +493,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
String res;
|
|
String res;
|
|
|
String resEnd;
|
|
String resEnd;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Long timeId = classFiveGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
- Long timeEndId = classFiveGradeUserVo.getClassStartTime()*1000;
|
|
|
|
|
|
|
+ Long timeId = classFiveGradeUserVo.getClassStartTime() * 1000;
|
|
|
|
|
+ Long timeEndId = classFiveGradeUserVo.getClassStartTime() * 1000;
|
|
|
Date date = new Date(timeId);
|
|
Date date = new Date(timeId);
|
|
|
Date dateEnd = new Date(timeEndId);
|
|
Date dateEnd = new Date(timeEndId);
|
|
|
res = simpleDateFormat.format(date);
|
|
res = simpleDateFormat.format(date);
|
|
@@ -513,10 +513,10 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
|
|
|
informUserAddBo.setGoodsId(classFiveGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classFiveGradeUserVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩5天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
- if (informTenRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
|
+ if (informTenRemindVo.getNoteStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(classFiveGradeUserVo.getUserId());
|
|
informUserAddBo.setUserId(classFiveGradeUserVo.getUserId());
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -529,13 +529,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGoodsId(classFiveGradeUserVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(classFiveGradeUserVo.getGoodsId());
|
|
|
informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
|
|
informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您购买的"+goodsVo1.getGoodsName()+"课程班级有效期还剩5天,未在"+resEnd+"前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
|
|
|
UserVo userVo = iUserService.queryById(classFiveGradeUserVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(classFiveGradeUserVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
param.put("time", resEnd);
|
|
param.put("time", resEnd);
|
|
|
param.put("day", 5);
|
|
param.put("day", 5);
|
|
|
- if(Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -551,7 +551,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
for (UserSubscribeVo subscribeVo : userSubscribeVo) {
|
|
for (UserSubscribeVo subscribeVo : userSubscribeVo) {
|
|
|
String res;
|
|
String res;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Long timeId = subscribeVo.getApplySiteExamTime()*1000;
|
|
|
|
|
|
|
+ Long timeId = subscribeVo.getApplySiteExamTime() * 1000;
|
|
|
Date date = new Date(timeId);
|
|
Date date = new Date(timeId);
|
|
|
res = simpleDateFormat.format(date);
|
|
res = simpleDateFormat.format(date);
|
|
|
String startTime = subscribeVo.getApplySiteStartTime();
|
|
String startTime = subscribeVo.getApplySiteStartTime();
|
|
@@ -568,11 +568,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setRemind("考试提醒");
|
|
informUserAddBo.setRemind("考试提醒");
|
|
|
informUserAddBo.setGoodsId(subscribeVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(subscribeVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员"+goodsVo1.getGoodsName()+"考试将在"+res+"("+startTime+"-"+endTime+")进行," +
|
|
|
|
|
- "考试地点:"+subscribeVo.getApplySiteAddress()+"");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
|
|
|
|
|
+ "考试地点:" + subscribeVo.getApplySiteAddress() + "");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
- if (informRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(subscribeVo.getUserId());
|
|
informUserAddBo.setUserId(subscribeVo.getUserId());
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -584,14 +584,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setRemind("考试提醒");
|
|
informUserAddBo.setRemind("考试提醒");
|
|
|
informUserAddBo.setGoodsId(subscribeVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(subscribeVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员"+goodsVo1.getGoodsName()+"考试将在"+res+"("+startTime+"-"+endTime+")进行," +
|
|
|
|
|
- "考试地点:"+subscribeVo.getApplySiteAddress()+"");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
|
|
|
|
|
+ "考试地点:" + subscribeVo.getApplySiteAddress() + "");
|
|
|
UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
|
- param.put("time", res+"("+startTime+"-"+endTime+")");
|
|
|
|
|
|
|
+ param.put("time", res + "(" + startTime + "-" + endTime + ")");
|
|
|
param.put("address", subscribeVo.getApplySiteAddress());
|
|
param.put("address", subscribeVo.getApplySiteAddress());
|
|
|
- if(Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), examinationRemind))){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), examinationRemind))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -601,11 +601,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Override
|
|
@Override
|
|
|
public void closeTimeOutOrder() {
|
|
public void closeTimeOutOrder() {
|
|
|
OrderQueryBo bo = new OrderQueryBo();
|
|
OrderQueryBo bo = new OrderQueryBo();
|
|
|
- Integer[] status={0};
|
|
|
|
|
|
|
+ Integer[] status = {0};
|
|
|
bo.setOrderStatus(status);
|
|
bo.setOrderStatus(status);
|
|
|
List<OrderListVo> list = iOrderService.selectListApp(bo);
|
|
List<OrderListVo> list = iOrderService.selectListApp(bo);
|
|
|
for (OrderListVo orderVo : list) {
|
|
for (OrderListVo orderVo : list) {
|
|
|
- if(orderVo.getCreateTime().longValue()<(new Long(DateUtils.getNowTime()-(24*3600))).longValue()){
|
|
|
|
|
|
|
+ if (orderVo.getCreateTime().longValue() < (new Long(DateUtils.getNowTime() - (24 * 3600))).longValue()) {
|
|
|
//超过24小时
|
|
//超过24小时
|
|
|
Order order = new Order();
|
|
Order order = new Order();
|
|
|
order.setOrderId(orderVo.getOrderId());
|
|
order.setOrderId(orderVo.getOrderId());
|
|
@@ -615,9 +615,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
iOrderService.updateById(order);
|
|
iOrderService.updateById(order);
|
|
|
//关闭锁定班级
|
|
//关闭锁定班级
|
|
|
LambdaQueryWrapper<ClassGradeUserTemp> lqwLock = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ClassGradeUserTemp> lqwLock = new LambdaQueryWrapper<>();
|
|
|
- lqwLock.eq(ClassGradeUserTemp::getOrderSn,orderVo.getOrderSn());
|
|
|
|
|
|
|
+ lqwLock.eq(ClassGradeUserTemp::getOrderSn, orderVo.getOrderSn());
|
|
|
ClassGradeUserTemp classGradeUserTemp = iClassGradeUserTempService.getOne(lqwLock);
|
|
ClassGradeUserTemp classGradeUserTemp = iClassGradeUserTempService.getOne(lqwLock);
|
|
|
- if(classGradeUserTemp!=null&&classGradeUserTemp.getStatus()==ClassGradeUserTemp.STATUS_LOCK){
|
|
|
|
|
|
|
+ if (classGradeUserTemp != null && classGradeUserTemp.getStatus() == ClassGradeUserTemp.STATUS_LOCK) {
|
|
|
classGradeUserTemp.setStatus(ClassGradeUserTemp.STATUS_CLOSE); //
|
|
classGradeUserTemp.setStatus(ClassGradeUserTemp.STATUS_CLOSE); //
|
|
|
classGradeUserTemp.setUpdateTime(DateUtils.getNowTime());
|
|
classGradeUserTemp.setUpdateTime(DateUtils.getNowTime());
|
|
|
iClassGradeUserTempService.updateById(classGradeUserTemp);//关闭锁定状态
|
|
iClassGradeUserTempService.updateById(classGradeUserTemp);//关闭锁定状态
|
|
@@ -640,12 +640,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
statusList.add(2);
|
|
statusList.add(2);
|
|
|
LambdaQueryWrapper<InformUser> lqw = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<InformUser> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(InformUser::getInformId, informVo.getInformId());
|
|
lqw.eq(InformUser::getInformId, informVo.getInformId());
|
|
|
- lqw.in(InformUser::getSendStatus,statusList);
|
|
|
|
|
|
|
+ lqw.in(InformUser::getSendStatus, statusList);
|
|
|
InformUser informUser = new InformUser();
|
|
InformUser informUser = new InformUser();
|
|
|
informUser.setSendTime(DateUtils.getNowTime());
|
|
informUser.setSendTime(DateUtils.getNowTime());
|
|
|
informUser.setSendStatus(1);
|
|
informUser.setSendStatus(1);
|
|
|
informUser.setUpdateTime(DateUtils.getNowTime());
|
|
informUser.setUpdateTime(DateUtils.getNowTime());
|
|
|
- iInformUserService.update(informUser,lqw);
|
|
|
|
|
|
|
+ iInformUserService.update(informUser, lqw);
|
|
|
}
|
|
}
|
|
|
updateApply();
|
|
updateApply();
|
|
|
}
|
|
}
|
|
@@ -702,8 +702,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
for (Long seLong : seLongs) {
|
|
for (Long seLong : seLongs) {
|
|
|
allNum += seLong;
|
|
allNum += seLong;
|
|
|
}
|
|
}
|
|
|
- Long reduce = baseMapper.selectGoodsPlanCount(aLong,userPlanVo.getPlanId());
|
|
|
|
|
- sumUp = allNum-reduce;
|
|
|
|
|
|
|
+ Long reduce = baseMapper.selectGoodsPlanCount(aLong, userPlanVo.getPlanId());
|
|
|
|
|
+ sumUp = allNum - reduce;
|
|
|
//计算每天需要学习多少节课
|
|
//计算每天需要学习多少节课
|
|
|
int Sec = (int) Math.ceil((double) allNum / dutyDays);
|
|
int Sec = (int) Math.ceil((double) allNum / dutyDays);
|
|
|
secAll += Sec;
|
|
secAll += Sec;
|
|
@@ -715,7 +715,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
}
|
|
}
|
|
|
Calendar c5 = Calendar.getInstance();
|
|
Calendar c5 = Calendar.getInstance();
|
|
|
if (dayStudyVo.getDate() <= c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
|
|
if (dayStudyVo.getDate() <= c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
|
|
|
- if(Validator.isNotEmpty(dayStudyVo.getPerform())&&dayStudyVo.getPerform().equals(0)){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(dayStudyVo.getPerform()) && dayStudyVo.getPerform().equals(0)) {
|
|
|
//过期且没完成
|
|
//过期且没完成
|
|
|
dayStudyVo.setPerform(2);
|
|
dayStudyVo.setPerform(2);
|
|
|
}
|
|
}
|
|
@@ -775,7 +775,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
|
- if ((examApplyVo.getApplyEndTime()) < calendar.getTimeInMillis()/1000){
|
|
|
|
|
|
|
+ if ((examApplyVo.getApplyEndTime()) < calendar.getTimeInMillis() / 1000) {
|
|
|
ExamApply update = new ExamApply();
|
|
ExamApply update = new ExamApply();
|
|
|
update.setApplyId(examApplyVo.getApplyId());
|
|
update.setApplyId(examApplyVo.getApplyId());
|
|
|
update.setStatus(2);
|
|
update.setStatus(2);
|
|
@@ -790,7 +790,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
|
- if ((examBeforeVo.getBeforeEndTime()) < calendar.getTimeInMillis()/1000){
|
|
|
|
|
|
|
+ if ((examBeforeVo.getBeforeEndTime()) < calendar.getTimeInMillis() / 1000) {
|
|
|
ExamBefore update = new ExamBefore();
|
|
ExamBefore update = new ExamBefore();
|
|
|
update.setBeforeId(examBeforeVo.getBeforeId());
|
|
update.setBeforeId(examBeforeVo.getBeforeId());
|
|
|
update.setStatus(2);
|
|
update.setStatus(2);
|
|
@@ -810,10 +810,10 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
|
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
|
|
- if ((userPlanVo.getEndTime()) < calendar.getTimeInMillis()/1000 && userPlanVo.getStatus().equals(1)){
|
|
|
|
|
- if (userPlanVo.getPitchNum().equals(userPlanVo.getStudyNum())){
|
|
|
|
|
|
|
+ if ((userPlanVo.getEndTime()) < calendar.getTimeInMillis() / 1000 && userPlanVo.getStatus().equals(1)) {
|
|
|
|
|
+ if (userPlanVo.getPitchNum().equals(userPlanVo.getStudyNum())) {
|
|
|
userPlan.setStatus(2);
|
|
userPlan.setStatus(2);
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
userPlan.setStatus(3);
|
|
userPlan.setStatus(3);
|
|
|
}
|
|
}
|
|
|
userPlanMapper.updateById(userPlan);
|
|
userPlanMapper.updateById(userPlan);
|
|
@@ -888,13 +888,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Override
|
|
@Override
|
|
|
public void bindBefore(UserQueryBo bo) {
|
|
public void bindBefore(UserQueryBo bo) {
|
|
|
List<ExamBeforeVo> list = examBeforeMapper.queryBindBefore(new ExamBeforeQueryBo());
|
|
List<ExamBeforeVo> list = examBeforeMapper.queryBindBefore(new ExamBeforeQueryBo());
|
|
|
- if(Validator.isNotEmpty(list)){
|
|
|
|
|
- for(ExamBeforeVo vo : list){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(list)) {
|
|
|
|
|
+ for (ExamBeforeVo vo : list) {
|
|
|
//报考数据绑定前培
|
|
//报考数据绑定前培
|
|
|
LambdaUpdateWrapper<UserSubscribe> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
LambdaUpdateWrapper<UserSubscribe> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
|
objectLambdaUpdateWrapper.eq(UserSubscribe::getSubscribeId, vo.getSubscribeId());
|
|
objectLambdaUpdateWrapper.eq(UserSubscribe::getSubscribeId, vo.getSubscribeId());
|
|
|
objectLambdaUpdateWrapper.set(UserSubscribe::getBeforeId, vo.getBeforeId());
|
|
objectLambdaUpdateWrapper.set(UserSubscribe::getBeforeId, vo.getBeforeId());
|
|
|
- objectLambdaUpdateWrapper.set(UserSubscribe::getUpdateTime,DateUtils.getNowTime());
|
|
|
|
|
|
|
+ objectLambdaUpdateWrapper.set(UserSubscribe::getUpdateTime, DateUtils.getNowTime());
|
|
|
iUserSubscribeService.update(null, objectLambdaUpdateWrapper);
|
|
iUserSubscribeService.update(null, objectLambdaUpdateWrapper);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -902,17 +902,18 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 官方信息推送
|
|
* 官方信息推送
|
|
|
|
|
+ *
|
|
|
* @param bo
|
|
* @param bo
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void officialInfoPush(UserQueryBo bo) {
|
|
public void officialInfoPush(UserQueryBo bo) {
|
|
|
List<ClassGradeUserGoodsVo> list = iClassGradeUserService.selectOfficialNotPush(bo);
|
|
List<ClassGradeUserGoodsVo> list = iClassGradeUserService.selectOfficialNotPush(bo);
|
|
|
- for(ClassGradeUserGoodsVo vo : list){
|
|
|
|
|
|
|
+ for (ClassGradeUserGoodsVo vo : list) {
|
|
|
UserConfirmInfo confirmInfo = iUserConfirmInfoService.getOne(new LambdaQueryWrapper<UserConfirmInfo>()
|
|
UserConfirmInfo confirmInfo = iUserConfirmInfoService.getOne(new LambdaQueryWrapper<UserConfirmInfo>()
|
|
|
.eq(UserConfirmInfo::getUserId, vo.getUserId()).eq(UserConfirmInfo::getOrderGoodsId, vo.getOrderGoodsId()
|
|
.eq(UserConfirmInfo::getUserId, vo.getUserId()).eq(UserConfirmInfo::getOrderGoodsId, vo.getOrderGoodsId()
|
|
|
).last("limit 1"));
|
|
).last("limit 1"));
|
|
|
//有确认信息才允许推送
|
|
//有确认信息才允许推送
|
|
|
- if(Validator.isNotEmpty(confirmInfo)){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(confirmInfo)) {
|
|
|
ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
|
queryBo.setGradeId(vo.getGradeId());
|
|
queryBo.setGradeId(vo.getGradeId());
|
|
|
queryBo.setUserId(vo.getUserId());
|
|
queryBo.setUserId(vo.getUserId());
|
|
@@ -923,12 +924,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 官方学时推送
|
|
* 官方学时推送
|
|
|
|
|
+ *
|
|
|
* @param bo
|
|
* @param bo
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void officialPeriodPush(UserQueryBo bo) {
|
|
public void officialPeriodPush(UserQueryBo bo) {
|
|
|
List<ClassGradeUserGoodsVo> list = iClassGradeUserService.selectPeriodNotPush(bo);
|
|
List<ClassGradeUserGoodsVo> list = iClassGradeUserService.selectPeriodNotPush(bo);
|
|
|
- for(ClassGradeUserGoodsVo vo : list){
|
|
|
|
|
|
|
+ for (ClassGradeUserGoodsVo vo : list) {
|
|
|
ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
|
queryBo.setGradeId(vo.getGradeId());
|
|
queryBo.setGradeId(vo.getGradeId());
|
|
|
queryBo.setUserId(vo.getUserId());
|
|
queryBo.setUserId(vo.getUserId());
|
|
@@ -938,27 +940,28 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 直播结束
|
|
* 直播结束
|
|
|
|
|
+ *
|
|
|
* @param bo
|
|
* @param bo
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void overLive(UserQueryBo bo) {
|
|
public void overLive(UserQueryBo bo) {
|
|
|
Long nowTime = DateUtils.getNowTime();
|
|
Long nowTime = DateUtils.getNowTime();
|
|
|
- Long startTime = nowTime - 3600 * 24 ;
|
|
|
|
|
- List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime,nowTime);
|
|
|
|
|
|
|
+ Long startTime = nowTime - 3600 * 24;
|
|
|
|
|
+ List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime, nowTime);
|
|
|
List<Long> courseIds = new ArrayList<>();//课程ID
|
|
List<Long> courseIds = new ArrayList<>();//课程ID
|
|
|
List<ClassPeriodVo> periodList = new ArrayList<>();//学时列表
|
|
List<ClassPeriodVo> periodList = new ArrayList<>();//学时列表
|
|
|
- for(CourseSectionVo sectionVo : list){
|
|
|
|
|
|
|
+ for (CourseSectionVo sectionVo : list) {
|
|
|
System.out.println(sectionVo.getSectionId());
|
|
System.out.println(sectionVo.getSectionId());
|
|
|
//当节为根目录时
|
|
//当节为根目录时
|
|
|
CourseMenuQueryBo menuQueryBo = new CourseMenuQueryBo();
|
|
CourseMenuQueryBo menuQueryBo = new CourseMenuQueryBo();
|
|
|
menuQueryBo.setType(3);
|
|
menuQueryBo.setType(3);
|
|
|
menuQueryBo.setMenuId(sectionVo.getSectionId());
|
|
menuQueryBo.setMenuId(sectionVo.getSectionId());
|
|
|
- List<CourseMenuVo> menuList = iCourseMenuService.queryList(menuQueryBo);
|
|
|
|
|
- for(CourseMenuVo menuVo : menuList){
|
|
|
|
|
|
|
+ List<CourseMenuVo> menuList = iCourseMenuService.queryList(menuQueryBo);
|
|
|
|
|
+ for (CourseMenuVo menuVo : menuList) {
|
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
|
- for(GoodsCourseVo goodsCourseVo :goodsList){
|
|
|
|
|
|
|
+ for (GoodsCourseVo goodsCourseVo : goodsList) {
|
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
@@ -972,18 +975,18 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
//当节在章下
|
|
//当节在章下
|
|
|
CourseChapterSectionQueryBo chapterSectionQueryBo = new CourseChapterSectionQueryBo();
|
|
CourseChapterSectionQueryBo chapterSectionQueryBo = new CourseChapterSectionQueryBo();
|
|
|
chapterSectionQueryBo.setSectionId(sectionVo.getSectionId());
|
|
chapterSectionQueryBo.setSectionId(sectionVo.getSectionId());
|
|
|
- List<CourseChapterSectionVo> chapterList = iCourseChapterSectionService.queryList(chapterSectionQueryBo);
|
|
|
|
|
- for(CourseChapterSectionVo chapterSectionVo : chapterList){
|
|
|
|
|
|
|
+ List<CourseChapterSectionVo> chapterList = iCourseChapterSectionService.queryList(chapterSectionQueryBo);
|
|
|
|
|
+ for (CourseChapterSectionVo chapterSectionVo : chapterList) {
|
|
|
//当章在根目录时
|
|
//当章在根目录时
|
|
|
CourseMenuQueryBo menuQueryBo2 = new CourseMenuQueryBo();
|
|
CourseMenuQueryBo menuQueryBo2 = new CourseMenuQueryBo();
|
|
|
menuQueryBo2.setType(2);
|
|
menuQueryBo2.setType(2);
|
|
|
menuQueryBo2.setMenuId(chapterSectionVo.getChapterId());
|
|
menuQueryBo2.setMenuId(chapterSectionVo.getChapterId());
|
|
|
- List<CourseMenuVo> menuList2 = iCourseMenuService.queryList(menuQueryBo2);
|
|
|
|
|
- for(CourseMenuVo menuVo : menuList2){
|
|
|
|
|
|
|
+ List<CourseMenuVo> menuList2 = iCourseMenuService.queryList(menuQueryBo2);
|
|
|
|
|
+ for (CourseMenuVo menuVo : menuList2) {
|
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
|
- for(GoodsCourseVo goodsCourseVo :goodsList){
|
|
|
|
|
|
|
+ for (GoodsCourseVo goodsCourseVo : goodsList) {
|
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
@@ -998,17 +1001,17 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
CourseModuleChapterQueryBo moduleChapterQueryBo = new CourseModuleChapterQueryBo();
|
|
CourseModuleChapterQueryBo moduleChapterQueryBo = new CourseModuleChapterQueryBo();
|
|
|
moduleChapterQueryBo.setChapterId(chapterSectionVo.getChapterId());
|
|
moduleChapterQueryBo.setChapterId(chapterSectionVo.getChapterId());
|
|
|
List<CourseModuleChapterVo> moduleList = iCourseModuleChapterService.queryList(moduleChapterQueryBo);
|
|
List<CourseModuleChapterVo> moduleList = iCourseModuleChapterService.queryList(moduleChapterQueryBo);
|
|
|
- for(CourseModuleChapterVo moduleChapterVo : moduleList){
|
|
|
|
|
|
|
+ for (CourseModuleChapterVo moduleChapterVo : moduleList) {
|
|
|
//当模块在根目录时
|
|
//当模块在根目录时
|
|
|
CourseMenuQueryBo menuQueryBo3 = new CourseMenuQueryBo();
|
|
CourseMenuQueryBo menuQueryBo3 = new CourseMenuQueryBo();
|
|
|
menuQueryBo3.setType(1);
|
|
menuQueryBo3.setType(1);
|
|
|
menuQueryBo3.setMenuId(moduleChapterVo.getModuleId());
|
|
menuQueryBo3.setMenuId(moduleChapterVo.getModuleId());
|
|
|
- List<CourseMenuVo> menuList3 = iCourseMenuService.queryList(menuQueryBo3);
|
|
|
|
|
- for(CourseMenuVo menuVo : menuList3){
|
|
|
|
|
|
|
+ List<CourseMenuVo> menuList3 = iCourseMenuService.queryList(menuQueryBo3);
|
|
|
|
|
+ for (CourseMenuVo menuVo : menuList3) {
|
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
GoodsCourseQueryBo courseQueryBo = new GoodsCourseQueryBo();
|
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
courseQueryBo.setCourseId(menuVo.getCourseId());
|
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
List<GoodsCourseVo> goodsList = iGoodsCourseService.queryList(courseQueryBo);
|
|
|
- for(GoodsCourseVo goodsCourseVo :goodsList){
|
|
|
|
|
|
|
+ for (GoodsCourseVo goodsCourseVo : goodsList) {
|
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
ClassPeriodVo periodVo = new ClassPeriodVo();
|
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
periodVo.setGoodsId(goodsCourseVo.getGoodsId());
|
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
periodVo.setCourseId(menuVo.getCourseId());
|
|
@@ -1023,9 +1026,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//获取所有直播结束节对应的用户班级列表
|
|
//获取所有直播结束节对应的用户班级列表
|
|
|
- for(ClassPeriodVo periodVo :periodList){
|
|
|
|
|
|
|
+ for (ClassPeriodVo periodVo : periodList) {
|
|
|
List<ClassGradeUserGoodsVo> gradeList = iClassGradeUserService.selectGoodsGradeList(periodVo.getGoodsId());
|
|
List<ClassGradeUserGoodsVo> gradeList = iClassGradeUserService.selectGoodsGradeList(periodVo.getGoodsId());
|
|
|
- for(ClassGradeUserGoodsVo gradeUserGoodsVo : gradeList){
|
|
|
|
|
|
|
+ for (ClassGradeUserGoodsVo gradeUserGoodsVo : gradeList) {
|
|
|
UserStudyRecord entity = BeanUtil.toBean(periodVo, UserStudyRecord.class);
|
|
UserStudyRecord entity = BeanUtil.toBean(periodVo, UserStudyRecord.class);
|
|
|
entity.setGradeId(gradeUserGoodsVo.getGradeId());
|
|
entity.setGradeId(gradeUserGoodsVo.getGradeId());
|
|
|
entity.setUserId(gradeUserGoodsVo.getUserId());
|
|
entity.setUserId(gradeUserGoodsVo.getUserId());
|
|
@@ -1059,7 +1062,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
}
|
|
}
|
|
|
ClassPeriodVo queryBo = BeanUtil.toBean(entity, ClassPeriodVo.class);
|
|
ClassPeriodVo queryBo = BeanUtil.toBean(entity, ClassPeriodVo.class);
|
|
|
Integer status = iUserStudyRecordService.getStudyStatus(queryBo);
|
|
Integer status = iUserStudyRecordService.getStudyStatus(queryBo);
|
|
|
- if(Validator.isEmpty(status)||status!=1){
|
|
|
|
|
|
|
+ if (Validator.isEmpty(status) || status != 1) {
|
|
|
UserStudyRecord add = BeanUtil.toBean(entity, UserStudyRecord.class);
|
|
UserStudyRecord add = BeanUtil.toBean(entity, UserStudyRecord.class);
|
|
|
add.setCreateTime(DateUtils.getNowTime());
|
|
add.setCreateTime(DateUtils.getNowTime());
|
|
|
add.setUpdateTime(DateUtils.getNowTime());
|
|
add.setUpdateTime(DateUtils.getNowTime());
|
|
@@ -1081,22 +1084,22 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Override
|
|
@Override
|
|
|
public void liveToReplay(UserQueryBo bo) {
|
|
public void liveToReplay(UserQueryBo bo) {
|
|
|
Long nowTime = DateUtils.getNowTime();
|
|
Long nowTime = DateUtils.getNowTime();
|
|
|
- Long startTime = nowTime - 3600 * 24 ;
|
|
|
|
|
|
|
+ Long startTime = nowTime - 3600 * 24;
|
|
|
//获取今天直播结束的所有直播节
|
|
//获取今天直播结束的所有直播节
|
|
|
- List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime,nowTime);
|
|
|
|
|
- for(CourseSectionVo sectionVo : list){
|
|
|
|
|
|
|
+ List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime, nowTime);
|
|
|
|
|
+ for (CourseSectionVo sectionVo : list) {
|
|
|
PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();
|
|
PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();
|
|
|
- try{
|
|
|
|
|
|
|
+ try {
|
|
|
queryBo.setChannelId(sectionVo.getLiveUrl()); //频道房间ID
|
|
queryBo.setChannelId(sectionVo.getLiveUrl()); //频道房间ID
|
|
|
LiveChannelVideoListResponse.ChannelVedioInfo info = iPolyvLiveService.getListChannelSession(queryBo);
|
|
LiveChannelVideoListResponse.ChannelVedioInfo info = iPolyvLiveService.getListChannelSession(queryBo);
|
|
|
- if(Validator.isNotEmpty(info)){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(info)) {
|
|
|
//秒数误差在1个小时以内的判定为节的保利威直播
|
|
//秒数误差在1个小时以内的判定为节的保利威直播
|
|
|
- if(Math.abs(sectionVo.getLiveEndTime().longValue()-(info.getEndTime().getTime()/1000))<3600){
|
|
|
|
|
- if("complete".equals(info.getRecordFileType())){
|
|
|
|
|
|
|
+ if (Math.abs(sectionVo.getLiveEndTime().longValue() - (info.getEndTime().getTime() / 1000)) < 3600) {
|
|
|
|
|
+ if ("complete".equals(info.getRecordFileType())) {
|
|
|
CourseSection oldSection = iCourseSectionService.getOne(new LambdaQueryWrapper<CourseSection>()
|
|
CourseSection oldSection = iCourseSectionService.getOne(new LambdaQueryWrapper<CourseSection>()
|
|
|
.eq(CourseSection::getSessionId, info.getChannelSessionId())
|
|
.eq(CourseSection::getSessionId, info.getChannelSessionId())
|
|
|
.last("limit 1"));
|
|
.last("limit 1"));
|
|
|
- if(Validator.isEmpty(oldSection)){
|
|
|
|
|
|
|
+ if (Validator.isEmpty(oldSection)) {
|
|
|
//录播完成状态且场次ID没被使用
|
|
//录播完成状态且场次ID没被使用
|
|
|
sectionVo.setSessionId(info.getChannelSessionId());//场次ID
|
|
sectionVo.setSessionId(info.getChannelSessionId());//场次ID
|
|
|
sectionVo.setRealDuration(info.getDuration().longValue()); //视频秒数
|
|
sectionVo.setRealDuration(info.getDuration().longValue()); //视频秒数
|
|
@@ -1108,25 +1111,21 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
section.setUpdateTime(DateUtils.getNowTime());
|
|
section.setUpdateTime(DateUtils.getNowTime());
|
|
|
iCourseSectionService.updateById(section);
|
|
iCourseSectionService.updateById(section);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//获得可用学习天数
|
|
//获得可用学习天数
|
|
|
- private static int getDutyDays(Date startDateStr, Date endDateStr,Long[] longs,Long studyDay) {
|
|
|
|
|
|
|
+ private static int getDutyDays(Date startDateStr, Date endDateStr, Long[] longs, Long studyDay) {
|
|
|
int result = 0;
|
|
int result = 0;
|
|
|
Date endDate = endDateStr;
|
|
Date endDate = endDateStr;
|
|
|
Calendar c = Calendar.getInstance();
|
|
Calendar c = Calendar.getInstance();
|
|
|
c.setTime(endDate);
|
|
c.setTime(endDate);
|
|
|
- c.add(Calendar.DATE, - Convert.toInt(studyDay));
|
|
|
|
|
|
|
+ c.add(Calendar.DATE, -Convert.toInt(studyDay));
|
|
|
endDate = c.getTime();
|
|
endDate = c.getTime();
|
|
|
|
|
|
|
|
Date startDate = startDateStr;
|
|
Date startDate = startDateStr;
|
|
@@ -1140,7 +1139,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
}
|
|
}
|
|
|
startDate.setDate(startDate.getDate() + 1);
|
|
startDate.setDate(startDate.getDate() + 1);
|
|
|
}
|
|
}
|
|
|
- return result-1;
|
|
|
|
|
|
|
+ return result - 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void updateApply() throws ParseException {
|
|
private void updateApply() throws ParseException {
|
|
@@ -1149,14 +1148,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
List<UserSubscribeVo> userSubscribeVos = iUserSubscribeService.listSubscribe(userSubscribeQueryBo);
|
|
List<UserSubscribeVo> userSubscribeVos = iUserSubscribeService.listSubscribe(userSubscribeQueryBo);
|
|
|
for (UserSubscribeVo userSubscribeVo : userSubscribeVos) {
|
|
for (UserSubscribeVo userSubscribeVo : userSubscribeVos) {
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
- Long times = userSubscribeVo.getApplySiteExamTime()*1000;//时间戳
|
|
|
|
|
|
|
+ Long times = userSubscribeVo.getApplySiteExamTime() * 1000;//时间戳
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String dateString = formatter.format(times);
|
|
String dateString = formatter.format(times);
|
|
|
- String dateForma =null;
|
|
|
|
|
- dateForma = dateString+" "+userSubscribeVo.getApplySiteStartTime();
|
|
|
|
|
|
|
+ String dateForma = null;
|
|
|
|
|
+ dateForma = dateString + " " + userSubscribeVo.getApplySiteStartTime();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
Long time = sdf.parse(dateForma).getTime() / 1000;
|
|
Long time = sdf.parse(dateForma).getTime() / 1000;
|
|
|
- if (System.currentTimeMillis()/1000 > time){
|
|
|
|
|
|
|
+ if (System.currentTimeMillis() / 1000 > time) {
|
|
|
UserSubscribe userSubscribe = new UserSubscribe();
|
|
UserSubscribe userSubscribe = new UserSubscribe();
|
|
|
userSubscribe.setSubscribeId(userSubscribeVo.getSubscribeId());
|
|
userSubscribe.setSubscribeId(userSubscribeVo.getSubscribeId());
|
|
|
userSubscribe.setExamExpend(1);
|
|
userSubscribe.setExamExpend(1);
|
|
@@ -1166,26 +1165,25 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
userExamGoodsQueryBo.setGoodsId(userSubscribeVo.getGoodsId());
|
|
userExamGoodsQueryBo.setGoodsId(userSubscribeVo.getGoodsId());
|
|
|
userExamGoodsQueryBo.setUserId(userSubscribeVo.getUserId());
|
|
userExamGoodsQueryBo.setUserId(userSubscribeVo.getUserId());
|
|
|
List<UserExamGoodsVo> userExamGoodsVos = userExamGoodsService.queryList(userExamGoodsQueryBo);
|
|
List<UserExamGoodsVo> userExamGoodsVos = userExamGoodsService.queryList(userExamGoodsQueryBo);
|
|
|
- if (!CollectionUtils.isEmpty(userExamGoodsVos)){
|
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userExamGoodsVos)) {
|
|
|
UserExamGoodsVo userExamGoodsVo = userExamGoodsVos.get(0);
|
|
UserExamGoodsVo userExamGoodsVo = userExamGoodsVos.get(0);
|
|
|
UserExamGoods userExamGoods = new UserExamGoods();
|
|
UserExamGoods userExamGoods = new UserExamGoods();
|
|
|
userExamGoods.setUpdateTime(DateUtils.getNowTime());
|
|
userExamGoods.setUpdateTime(DateUtils.getNowTime());
|
|
|
userExamGoods.setUserExamGoodsId(userExamGoodsVo.getUserExamGoodsId());
|
|
userExamGoods.setUserExamGoodsId(userExamGoodsVo.getUserExamGoodsId());
|
|
|
- userExamGoods.setExpendNumber(userExamGoodsVo.getExpendNumber()+1);
|
|
|
|
|
|
|
+ userExamGoods.setExpendNumber(userExamGoodsVo.getExpendNumber() + 1);
|
|
|
userExamGoodsService.updateById(userExamGoods);
|
|
userExamGoodsService.updateById(userExamGoods);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
private void sendExamSubscribe() {
|
|
private void sendExamSubscribe() {
|
|
|
List<ExamUserApplyVo> examUserApplyVos = iInformUserService.listUserApply();
|
|
List<ExamUserApplyVo> examUserApplyVos = iInformUserService.listUserApply();
|
|
|
for (ExamUserApplyVo examUserApplyVo : examUserApplyVos) {
|
|
for (ExamUserApplyVo examUserApplyVo : examUserApplyVos) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(13L);
|
|
InformRemindVo informRemindVo = informRemindService.queryById(13L);
|
|
|
String res;
|
|
String res;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Long timeId = examUserApplyVo.getApplyEndTime()*1000;
|
|
|
|
|
|
|
+ Long timeId = examUserApplyVo.getApplyEndTime() * 1000;
|
|
|
Date date = new Date(timeId);
|
|
Date date = new Date(timeId);
|
|
|
res = simpleDateFormat.format(date);
|
|
res = simpleDateFormat.format(date);
|
|
|
if (informRemindVo.getWayStatus().equals(1)) {
|
|
if (informRemindVo.getWayStatus().equals(1)) {
|
|
@@ -1201,7 +1199,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
|
informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
|
|
informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
|
- informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间"+res+",请马上点击进行预约考试。");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
if (informRemindVo.getNoteStatus().equals(1)) {
|
|
if (informRemindVo.getNoteStatus().equals(1)) {
|
|
@@ -1217,11 +1215,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
|
informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
|
|
informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
|
|
|
- informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间"+res+",请马上点击进行预约考试。");
|
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
|
|
|
UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("time", res);
|
|
param.put("time", res);
|
|
|
- if(Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder))){
|
|
|
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|