|
@@ -399,6 +399,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Value("${aliyun.sms.noFinishExamNoteCode}")
|
|
|
private String noFinishExamNoteCode;
|
|
|
|
|
|
+ @Value("${aliyun.sms.orderServiceEndRemind}")
|
|
|
+ private String orderServiceEndRemind;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
|
|
@@ -586,6 +589,56 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
sendClassEnd();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void sendServiceEnd() {
|
|
|
+ InformRemindVo informRemindVo = informRemindService.queryByName("二建继教学习服务还剩10天");
|
|
|
+ if(Validator.isNotEmpty(informRemindVo)){
|
|
|
+ List<OrderGoodsVo> list = orderGoodsMapper.sendTenOrderGoods(informRemindVo.getId());
|
|
|
+ for (OrderGoodsVo goodsVo : list) {
|
|
|
+ GoodsVo goods = iGoodsService.queryById(goodsVo.getGoodsId());
|
|
|
+ UserVo userVo = iUserService.queryById(goodsVo.getUserId());
|
|
|
+ if (informRemindVo.getWayStatus().equals(1)) {
|
|
|
+ InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
+ informUserAddBo.setUserId(goodsVo.getUserId());
|
|
|
+ informUserAddBo.setSendStatus(1);
|
|
|
+ informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setRemindId(informRemindVo.getId());
|
|
|
+ informUserAddBo.setSystemStatus(1);
|
|
|
+ informUserAddBo.setGradeId(goodsVo.getGradeId());
|
|
|
+ informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
|
|
|
+ informUserAddBo.setRemind("二建继教学习服务还剩10天提醒");
|
|
|
+ informUserAddBo.setGoodsId(goodsVo.getGoodsId());
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程二建继教学习服务还剩10天,请在"+DateUtils.timestampToDateFormat(goodsVo.getServiceEndTime(),DateUtils.YYYY__MM__DD)+"前完成学习,避免课程过期作废,无法学习给您带来不便。");
|
|
|
+ iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
+ }
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1)) {
|
|
|
+ InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
+ informUserAddBo.setUserId(goodsVo.getUserId());
|
|
|
+ informUserAddBo.setSendStatus(1);
|
|
|
+ informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setRemindId(informRemindVo.getId());
|
|
|
+ informUserAddBo.setSystemStatus(3);
|
|
|
+ informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
|
|
|
+ informUserAddBo.setGradeId(goodsVo.getGradeId());
|
|
|
+ informUserAddBo.setRemind("二建继教学习服务还剩10天提醒");
|
|
|
+ informUserAddBo.setGoodsId(goodsVo.getGoodsId());
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程二建继教学习服务还剩10天,请在"+DateUtils.timestampToDateFormat(goodsVo.getServiceEndTime(),DateUtils.YYYY__MM__DD)+"前完成学习,避免课程过期作废,无法学习给您带来不便。");
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("date", DateUtils.timestampToDateFormat(goodsVo.getServiceEndTime(),DateUtils.YYYY__MM__DD));
|
|
|
+ param.put("day", "10");
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), orderServiceEndRemind))) {
|
|
|
+ iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void sendClassEnd() {
|
|
|
List<ClassGradeUserGoodsVo> classTwentyGradeUserVos = iClassGradeUserService.sendTwentyClassGradeUser();
|
|
|
List<ClassGradeUserGoodsVo> classTenGradeUserVos = iClassGradeUserService.sendTenClassGradeUser();
|