|
@@ -71,8 +71,10 @@ import com.zhongzheng.modules.inform.vo.InformVo;
|
|
|
import com.zhongzheng.modules.mock.bo.MockApplyEditBo;
|
|
|
import com.zhongzheng.modules.mock.domain.MockApply;
|
|
|
import com.zhongzheng.modules.mock.domain.MockMajorSubject;
|
|
|
+import com.zhongzheng.modules.mock.domain.MockMajorSubjectGoods;
|
|
|
import com.zhongzheng.modules.mock.domain.MockMajorSubjectTime;
|
|
|
import com.zhongzheng.modules.mock.service.IMockApplyService;
|
|
|
+import com.zhongzheng.modules.mock.service.IMockMajorSubjectGoodsService;
|
|
|
import com.zhongzheng.modules.mock.service.IMockMajorSubjectService;
|
|
|
import com.zhongzheng.modules.mock.service.IMockMajorSubjectTimeService;
|
|
|
import com.zhongzheng.modules.mock.vo.MockApplyVo;
|
|
@@ -243,6 +245,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
@Autowired
|
|
|
private IMockMajorSubjectTimeService iMockMajorSubjectTimeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMockMajorSubjectGoodsService iMockMajorSubjectGoodsService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private IMockMajorSubjectService iMockMajorSubjectService;
|
|
|
|
|
@@ -1339,15 +1344,17 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
public void sendMockSubscribe(UserQueryBo bo) {
|
|
|
List<ClassGradeVo> classGradeVos = iClassGradeService.listGradeSubjects();
|
|
|
List<MockApplyVo> mockApplyVos = iMockApplyService.listSubjects();
|
|
|
- Set<Long> gradeIds = new HashSet<>();
|
|
|
+ /*Set<Long> gradeIds = new HashSet<>();
|
|
|
classGradeVos.forEach(classGradeVo -> {
|
|
|
if (Validator.isNotEmpty(classGradeVo.getSubjectIds())) {
|
|
|
String[] subjectId = classGradeVo.getSubjectIds().split(",");
|
|
|
List<String> subjectIds = Arrays.asList(subjectId);
|
|
|
if (mockApplyVos != null && mockApplyVos.size() > 0) {
|
|
|
for (MockApplyVo mockApplyVo : mockApplyVos) {
|
|
|
- if (subjectIds.contains(mockApplyVo.getSubjectId().toString())) {
|
|
|
- gradeIds.add(classGradeVo.getGradeId());
|
|
|
+ if (mockApplyVo.getBusinessId().equals(classGradeVo.getBusinessId()) && mockApplyVo.getProjectId().equals(classGradeVo.getProjectId())) {
|
|
|
+ if (subjectIds.contains(mockApplyVo.getSubjectId().toString())) {
|
|
|
+ gradeIds.add(classGradeVo.getGradeId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1370,11 +1377,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- for (ClassGradeStudentVo classGradeStudentVo : classGradeStudentList) {
|
|
|
+ for (ClassGradeStudentVo classGradeStudentVo : classGradeStudentList) {*/
|
|
|
+ mockApplyVos.forEach(mockApplyVo -> {
|
|
|
+ List<OrderGoodsVo> orderGoodsVoList = iOrderGoodsService.selectBuyUserList(mockApplyVo.getMockMajorSubjectId());
|
|
|
+ orderGoodsVoList.forEach(orderGoodsVo -> {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(25L);
|
|
|
if (informRemindVo.getWayStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
- informUserAddBo.setUserId(classGradeStudentVo.getUserId());
|
|
|
+ informUserAddBo.setUserId(orderGoodsVo.getUserId());
|
|
|
informUserAddBo.setSendStatus(1);
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
@@ -1382,12 +1392,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setRemindId(25L);
|
|
|
informUserAddBo.setSystemStatus(1);
|
|
|
informUserAddBo.setRemind("模考预约提醒");
|
|
|
- informUserAddBo.setText("尊敬的用户:【" + classGradeStudentVo.getBusinessName() + classGradeStudentVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
|
|
|
+ informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
if (informRemindVo.getNoteStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
- informUserAddBo.setUserId(classGradeStudentVo.getUserId());
|
|
|
+ informUserAddBo.setUserId(orderGoodsVo.getUserId());
|
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
|
informUserAddBo.setSendStatus(1);
|
|
|
informUserAddBo.setCreateTime(DateUtils.getNowTime());
|
|
@@ -1395,15 +1405,16 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
|
|
|
informUserAddBo.setRemindId(25L);
|
|
|
informUserAddBo.setSystemStatus(3);
|
|
|
informUserAddBo.setRemind("模考预约提醒");
|
|
|
- informUserAddBo.setText("尊敬的用户:【" + classGradeStudentVo.getBusinessName() + classGradeStudentVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
|
|
|
- UserVo userVo = iUserService.queryById(classGradeStudentVo.getUserId());
|
|
|
+ informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
|
|
|
+ UserVo userVo = iUserService.queryById(orderGoodsVo.getUserId());
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
- param.put("businessName", classGradeStudentVo.getBusinessName() + classGradeStudentVo.getProjectName());
|
|
|
+ param.put("businessName", mockApplyVo.getBusinessName() + mockApplyVo.getProjectName());
|
|
|
if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), mockBookingReminder))) {
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
+ });
|
|
|
mockApplyVos.forEach(mockApplyVo -> {
|
|
|
MockApply mockApply = new MockApply();
|
|
|
mockApply.setApplyId(mockApplyVo.getApplyId());
|