|
@@ -18,6 +18,8 @@ import com.zhongzheng.common.utils.http.HttpUtils;
|
|
|
import com.zhongzheng.common.utils.polyv.PolyvUtils;
|
|
|
import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
|
import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
|
+import com.zhongzheng.modules.base.vo.UserProfileVo;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamUserApplyVo;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
@@ -53,10 +55,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.util.Collection;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -113,6 +113,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Value("${aliyun.sms.informationNotificationCode}")
|
|
|
private String informationNotificationCode;
|
|
|
|
|
|
+ @Value("${aliyun.sms.bookingReminder}")
|
|
|
+ private String bookingReminder;
|
|
|
+
|
|
|
@Override
|
|
|
public String updateGoodsSend(UserQueryBo bo) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(1L);
|
|
@@ -210,7 +213,59 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
//
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String res;
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Long timeId = System.currentTimeMillis();
|
|
|
+ Date date = new Date(timeId);
|
|
|
+ res = simpleDateFormat.format(date);
|
|
|
+ System.out.println(res);
|
|
|
+ }
|
|
|
+
|
|
|
private void sendExamSubscribe() {
|
|
|
+ List<ExamUserApplyVo> examUserApplyVos = iInformUserService.listUserApply();
|
|
|
+ for (ExamUserApplyVo examUserApplyVo : examUserApplyVos) {
|
|
|
+ InformRemindVo informRemindVo = informRemindService.queryById(13L);
|
|
|
+ String res;
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Long timeId = examUserApplyVo.getApplyEndTime()*1000;
|
|
|
+ Date date = new Date(timeId);
|
|
|
+ res = simpleDateFormat.format(date);
|
|
|
+ if (informRemindVo.getWayStatus().equals(1)) {
|
|
|
+ InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
+ informUserAddBo.setUserId(examUserApplyVo.getUserId());
|
|
|
+ informUserAddBo.setSendStatus(1);
|
|
|
+ informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setRemindId(13L);
|
|
|
+ informUserAddBo.setSystemStatus(1);
|
|
|
+ informUserAddBo.setRemind("考试预约提醒");
|
|
|
+ informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
|
+ GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
|
+ informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间"+res+",请马上点击进行预约考试。");
|
|
|
+ iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
+ }
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1)) {
|
|
|
+ InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
+ informUserAddBo.setUserId(examUserApplyVo.getUserId());
|
|
|
+ informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setSendStatus(1);
|
|
|
+ informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ informUserAddBo.setRemindId(13L);
|
|
|
+ informUserAddBo.setSystemStatus(3);
|
|
|
+ informUserAddBo.setRemind("考试预约提醒");
|
|
|
+ informUserAddBo.setGoodsId(examUserApplyVo.getGoodsId());
|
|
|
+ GoodsVo goodsVo1 = iGoodsService.queryById(examUserApplyVo.getGoodsId());
|
|
|
+ informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间"+res+",请马上点击进行预约考试。");
|
|
|
+ iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
+ UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("time", res);
|
|
|
+ IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder);
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
}
|