|
@@ -596,44 +596,44 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
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))) {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2121,6 +2121,32 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
iGoodsService.goodsCopyOne(bo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void orderCourseNum() {
|
|
|
+ List<OrderGoods> orderGoods = iOrderGoodsService.listByNotTenant();
|
|
|
+ if (CollectionUtils.isEmpty(orderGoods)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ orderGoods.forEach(item -> {
|
|
|
+ if (ObjectUtils.isNull(item.getCourseNum()) || item.getCourseNum() == 0){
|
|
|
+ //获取商品课程数量
|
|
|
+ Integer courseNum = iGoodsService.getCourseNum(item.getGoodsId());
|
|
|
+ if (courseNum > 0){
|
|
|
+ item.setCourseNum(courseNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ObjectUtils.isNull(item.getExamNum()) || item.getExamNum() == 0){
|
|
|
+ //获取商品课程试卷数量
|
|
|
+ Integer courseExamNum = iGoodsService.getCourseExamNum(item.getGoodsId());
|
|
|
+ if (courseExamNum > 0){
|
|
|
+ item.setExamNum(courseExamNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ iOrderGoodsService.upBatchNumById(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private String getWeeks(Long time){
|
|
|
Calendar calendar = Calendar.getInstance();
|