he2802 пре 3 година
родитељ
комит
deb5fe3142

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamUserApplyVo.java

@@ -73,4 +73,7 @@ public class ExamUserApplyVo {
 	@ApiModelProperty("1非补考学员 2补考学员 ")
 	private String applyStatus;
 
+	@ApiModelProperty("总人数")
+	private Integer totalPeople;
+
 }

+ 58 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/UserPeriodServiceImpl.java

@@ -33,6 +33,7 @@ import com.zhongzheng.modules.inform.vo.InformRemindVo;
 import com.zhongzheng.modules.user.domain.User;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.vo.UserVo;
+import com.zhongzheng.modules.wx.service.IWxLoginService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -101,6 +102,9 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
     @Autowired
     private ClassGradeUserMapper classGradeUserMapper;
 
+    @Autowired
+    private IWxLoginService iWxLoginService;
+
     @Autowired
     private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
 
@@ -593,6 +597,33 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     Map<String, Object> param = new HashMap<>();
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), ReminderApproval);
                 }
+                if (informRemindVo.getGzhTpStatus().equals(1)) {
+                    InformUserAddBo informUserAddBo = new InformUserAddBo();
+                    informUserAddBo.setUserId(bo.getUserId());
+                    informUserAddBo.setSendStatus(1);
+                    informUserAddBo.setSendTime(DateUtils.getNowTime());
+                    informUserAddBo.setCreateTime(DateUtils.getNowTime());
+                    informUserAddBo.setUpdateTime(DateUtils.getNowTime());
+                    informUserAddBo.setGradeId(bo.getGradeId());
+                    informUserAddBo.setRemindId(11L);
+                    informUserAddBo.setSystemStatus(4);
+                    informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
+                    informUserAddBo.setRemind("学时机构审核通过提醒");
+                    informUserAddBo.setGoodsId(bo.getGoodsId());
+                    informUserAddBo.setText("尊敬的用户:你已完成本课程的所有学时机构审核通过。");
+                    Long informId = iInformUserService.insertByAddBo(informUserAddBo);
+                    UserVo userVo = iUserService.queryById(bo.getUserId());
+                    if(Validator.isNotEmpty(userVo.getOpenId())){
+                        Map<String,String> paramMap = new HashMap<>();
+                        paramMap.put("first","您学习完成的《"+goodsVo1.getGoodsName()+"》课程的所有学时机构审核通过。");
+                        paramMap.put("keyword1","学时审核");
+                        paramMap.put("keyword2","通过");
+                        paramMap.put("keyword3",DateUtils.getDate());
+                        paramMap.put("remark","稍后老师会安排考试,请留意消息进行考试预约");
+                        paramMap.put("pagepath","pages3/polyv/detail?id=0&goodsId="+bo.getGoodsId()+"&gradeId="+bo.getGradeId()+"&orderGoodsId="+gradeUser.getOrderGoodsId()+"&informId="+informId);
+                        iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
+                    }
+                }
             }
         } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryById(12L);
@@ -632,6 +663,33 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     param.put("goods", goodsVo1.getGoodsName());
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), passTheReminder);
                 }
+                if (informRemindTwoVo.getGzhTpStatus().equals(1)) {
+                    InformUserAddBo informUserAddBo = new InformUserAddBo();
+                    informUserAddBo.setUserId(bo.getUserId());
+                    informUserAddBo.setSendStatus(1);
+                    informUserAddBo.setSendTime(DateUtils.getNowTime());
+                    informUserAddBo.setCreateTime(DateUtils.getNowTime());
+                    informUserAddBo.setUpdateTime(DateUtils.getNowTime());
+                    informUserAddBo.setGradeId(bo.getGradeId());
+                    informUserAddBo.setRemindId(12L);
+                    informUserAddBo.setSystemStatus(4);
+                    informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
+                    informUserAddBo.setRemind("学时机构审核通过提醒");
+                    informUserAddBo.setGoodsId(bo.getGoodsId());
+                    informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    Long informId = iInformUserService.insertByAddBo(informUserAddBo);
+                    UserVo userVo = iUserService.queryById(bo.getUserId());
+                    if(Validator.isNotEmpty(userVo.getOpenId())){
+                        Map<String,String> paramMap = new HashMap<>();
+                        paramMap.put("first","您购买的《" + goodsVo1.getGoodsName() + "》课程学时审核不通过");
+                        paramMap.put("keyword1","学时审核");
+                        paramMap.put("keyword2","不通过");
+                        paramMap.put("keyword3",DateUtils.getDate());
+                        paramMap.put("remark","↓为了不影响您的学习进度,请点击立即重学进行重学。");
+                        paramMap.put("pagepath","pages2/learn/details?id=0&goodsId="+bo.getGoodsId()+"&gradeId="+bo.getGradeId()+"&orderGoodsId="+gradeUser.getOrderGoodsId()+"&informId="+informId);
+                        iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
+                    }
+                }
             }
         }
     }

+ 35 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -1366,6 +1366,41 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
             }
+            if (informRemindVo.getGzhTpStatus().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.setGradeId(examUserApplyVo.getGradeId());
+                informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
+                UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
+                Map<String, Object> param = new HashMap<>();
+                param.put("time", res);
+                if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder))) {
+                    iInformUserService.insertByAddBo(informUserAddBo);
+
+                    if(Validator.isNotEmpty(userVo.getOpenId())){
+                        String startTime = DateUtils.timestampToDate(examUserApplyVo.getApplyStartTime() );
+                        String endTime = DateUtils.timestampToDate(examUserApplyVo.getApplyEndTime() );
+                        Map<String,String> paramMap = new HashMap<>();
+                        paramMap.put("first","您好,考试预约已开放,可立即点击预约考试。");
+                        paramMap.put("keyword1","广东省祥粤建设职业培训学校");
+                        paramMap.put("keyword2",startTime+"-"+endTime);
+                        paramMap.put("keyword3",examUserApplyVo.getTotalPeople()+"");
+                        paramMap.put("keyword4",examUserApplyVo.getApplyName());
+                        paramMap.put("remark","请及时处理");
+                        paramMap.put("pagepath","pages2/appointment/appointment_success?subscribeId="+examUserApplyVo.getApplyId());
+                        iWxLoginService.sendQdySubTpMsg(userVo.getOpenId(),paramMap);
+                    }
+                }
+            }
         }
     }
 

+ 10 - 3
zhongzheng-system/src/main/resources/mapper/modules/inform/InformUserMapper.xml

@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="goodsId" column="goods_id"/>
         <result property="applyEndTime" column="apply_end_time"/>
         <result property="gradeId" column="grade_id"/>
+        <result property="totalPeople" column="total_people"/>
     </resultMap>
 
     <select id="queryUserList" parameterType="com.zhongzheng.modules.inform.bo.InformUserQueryBo" resultMap="InformUserVo">
@@ -70,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ea.apply_status,
         cgg.goods_id,
         cgg.grade_id,
-        ea.apply_end_time
+        ea.apply_end_time,
+        eas.total_people
         FROM
         exam_apply ea
         LEFT JOIN exam_apply_goods eag on ea.apply_id = eag.apply_id
@@ -78,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN class_grade_user cgu on cgg.grade_id = cgu.grade_id
         LEFT JOIN class_grade cg on cg.grade_id = cgu.grade_id
         LEFT JOIN goods g on g.goods_id = cgg.goods_id
+        LEFT JOIN (SELECT SUM(es.people) total_people,eas.apply_id from exam_apply_site eas LEFT JOIN exam_site es on eas.site_id = es.site_id GROUP BY eas.apply_id) eas on eas.apply_id = ea.apply_id
         WHERE
         ea.`status` =1
         AND cg.`status`=1
@@ -93,7 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ea.apply_status,
         cgg.goods_id,
         cgg.grade_id,
-        ea.apply_end_time
+        ea.apply_end_time,
+        eas.total_people
         FROM
         exam_apply ea
         LEFT JOIN exam_apply_goods eag on ea.apply_id = eag.apply_id
@@ -101,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN class_grade_user cgu on cgg.grade_id = cgu.grade_id
         LEFT JOIN class_grade cg on cg.grade_id = cgu.grade_id
         LEFT JOIN goods g on g.goods_id = cgg.goods_id
+        LEFT JOIN (SELECT SUM(es.people) total_people,eas.apply_id from exam_apply_site eas LEFT JOIN exam_site es on eas.site_id = es.site_id GROUP BY eas.apply_id) eas on eas.apply_id = ea.apply_id
         WHERE
         ea.`status` =1
         and cgu.period_status =1
@@ -115,7 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ea.apply_status,
         cgg.goods_id,
         cgg.grade_id,
-        ea.apply_end_time
+        ea.apply_end_time,
+        eas.total_people
         FROM
         exam_apply ea
         LEFT JOIN exam_apply_goods eag on ea.apply_id = eag.apply_id
@@ -123,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN class_grade_user cgu on cgg.grade_id = cgu.grade_id
         LEFT JOIN class_grade cg on cg.grade_id = cgu.grade_id
         LEFT JOIN goods g on g.goods_id = cgg.goods_id
+        LEFT JOIN (SELECT SUM(es.people) total_people,eas.apply_id from exam_apply_site eas LEFT JOIN exam_site es on eas.site_id = es.site_id GROUP BY eas.apply_id) eas on eas.apply_id = ea.apply_id
         WHERE
         ea.`status` =1
         AND cg.`status`=1