|
@@ -66,6 +66,7 @@ import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeQueryBo;
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeQueryBo;
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
import com.zhongzheng.modules.grade.domain.*;
|
|
import com.zhongzheng.modules.grade.domain.*;
|
|
|
|
+import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
|
|
import com.zhongzheng.modules.grade.service.*;
|
|
import com.zhongzheng.modules.grade.service.*;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeUserGoodsVo;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeUserGoodsVo;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeVo;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeVo;
|
|
@@ -352,7 +353,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
private ISysTaskService iSysTaskService;
|
|
private ISysTaskService iSysTaskService;
|
|
@Autowired
|
|
@Autowired
|
|
private OssService ossService;
|
|
private OssService ossService;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ClassGradeUserMapper classGradeUserMapper;
|
|
|
|
|
|
@Value("${aliyun.sms.OpenTheGoodsCode}")
|
|
@Value("${aliyun.sms.OpenTheGoodsCode}")
|
|
private String OpenTheGoodsCode;
|
|
private String OpenTheGoodsCode;
|
|
@@ -639,6 +641,58 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void sendClassTenAndFifteenEnd() {
|
|
|
|
+ InformRemindVo informRemindVo = informRemindService.queryByName("二建继教班级有效期倒计时15,10天");
|
|
|
|
+ if(Validator.isNotEmpty(informRemindVo)){
|
|
|
|
+ List<ClassGradeUserGoodsVo> list = classGradeUserMapper.sendTenAndFifteenClassGradeUser();
|
|
|
|
+ for (ClassGradeUserGoodsVo goodsVo : list) {
|
|
|
|
+ GoodsVo goods = iGoodsService.queryById(goodsVo.getGoodsId());
|
|
|
|
+ if (!CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goods.getBusinessId())).collect(Collectors.toList()))) {
|
|
|
|
+ UserVo userVo = iUserService.queryById(goodsVo.getUserId());
|
|
|
|
+ int day = DateUtils.dayBetween(DateUtils.getNowTime(),goodsVo.getClassEndTime())-1;
|
|
|
|
+ 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("二建继教班级有效期还剩"+day+"天提醒");
|
|
|
|
+ informUserAddBo.setGoodsId(goodsVo.getGoodsId());
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程二建继教班级有效期还剩"+day+"天,请在"+DateUtils.timestampToDateFormat(goodsVo.getClassEndTime(),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("二建继教班级有效期还剩"+day+"天提醒");
|
|
|
|
+ informUserAddBo.setGoodsId(goodsVo.getGoodsId());
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您购买的课程二建继班级有效期还剩"+day+"天,请在"+DateUtils.timestampToDateFormat(goodsVo.getClassEndTime(),DateUtils.YYYY__MM__DD)+"前完成学习及考试,到期未完成学时将清零,需重新学习。");
|
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
|
+ param.put("date", DateUtils.timestampToDateFormat(goodsVo.getClassEndTime(),DateUtils.YYYY__MM__DD));
|
|
|
|
+ param.put("day", day);
|
|
|
|
+ if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), orderServiceEndRemind))) {
|
|
|
|
+ iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void sendClassEnd() {
|
|
private void sendClassEnd() {
|
|
List<ClassGradeUserGoodsVo> classTwentyGradeUserVos = iClassGradeUserService.sendTwentyClassGradeUser();
|
|
List<ClassGradeUserGoodsVo> classTwentyGradeUserVos = iClassGradeUserService.sendTwentyClassGradeUser();
|
|
List<ClassGradeUserGoodsVo> classTenGradeUserVos = iClassGradeUserService.sendTenClassGradeUser();
|
|
List<ClassGradeUserGoodsVo> classTenGradeUserVos = iClassGradeUserService.sendTenClassGradeUser();
|