Browse Source

资料审核

change 3 years ago
parent
commit
6fca399a01

+ 14 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/schedule/ScheduleController.java

@@ -27,14 +27,26 @@ public class ScheduleController extends BaseController {
 
 
     /**
-     * 查询學員用户列表
+     * 商品购买发送消息
      * @return
      */
-    @ApiOperation("查询學員用户列表")
+    @ApiOperation("商品购买发送消息")
     @GetMapping("/updateGoodsSend")
     public AjaxResult updateGoodsSend(UserQueryBo bo) {
         iScheduleService.updateGoodsSend(bo);
         return AjaxResult.success();
     }
 
+
+    /**
+     * 考试提醒
+     * @return
+     */
+    @ApiOperation("考试提醒")
+    @GetMapping("/updateExamSend")
+    public AjaxResult updateExamSend(UserQueryBo bo) {
+        iScheduleService.updateExamSend(bo);
+        return AjaxResult.success();
+    }
+
 }

+ 2 - 0
zhongzheng-admin/src/main/resources/application.yml

@@ -288,3 +288,5 @@ aliyun:
     OverdueReminder: SMS_230980259  #班级过期提醒
     OverdueReminderHave: SMS_230965228  #班级过期提醒有学习次数
     planReminder: SMS_230970248     #学习计划提醒
+    commitmentCode: SMS_231190546     #承诺书审核通过通知
+    commitmentFailsCode: SMS_231215516     #承诺书审核不通过通知

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamApplyServiceImpl.java

@@ -214,7 +214,7 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
         }
         //查询剩余考试次数
         Integer residueSubscribeNext = baseMapper.residueSubscribeNext(bo);
-        if (residueSubscribeNext == null && residueSubscribeNext < 1){
+        if (residueSubscribeNext == null || residueSubscribeNext < 1){
             return 3L;
         }
         Integer beforeSubscribeNext = baseMapper.beforeSubscribeNext(bo);

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

@@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
+import com.zhongzheng.modules.grade.service.IClassGradeUserService;
 import com.zhongzheng.modules.grade.service.IUserPeriodStatusService;
 import com.zhongzheng.modules.inform.bo.InformUserAddBo;
 import com.zhongzheng.modules.inform.service.IInformRemindService;
@@ -55,6 +57,9 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
     @Autowired
     private IInformUserService iInformUserService;
 
+    @Autowired
+    private IClassGradeUserService iClassGradeUserService;
+
     @Autowired
     private IUserService iUserService;
 
@@ -163,6 +168,14 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
             userPeriodEditBo.setGradeId(userPeriodVo.getGradeId());
             sendPeriodSMS(userPeriodEditBo);
             sendPeriodSevenSMS(userPeriodEditBo);
+
+            LambdaQueryWrapper<ClassGradeUser> classGradeUser = Wrappers.lambdaQuery();
+            classGradeUser.eq( ClassGradeUser::getUserId, bo.getUserId());
+            classGradeUser.eq( ClassGradeUser::getGradeId, bo.getGradeId());
+            ClassGradeUser classGradeUser1 = new ClassGradeUser();
+            classGradeUser1.setPeriodStatus(1);
+            classGradeUser1.setUpdateTime(DateUtils.getNowTime());
+            iClassGradeUserService.update(classGradeUser1,classGradeUser);
         }
         return true;
     }
@@ -203,6 +216,13 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                 userPeriods.eq( UserPeriodStatus::getStatus, 2);
                 userPeriodStatusService.update(userPeriodStatus,userPeriods);
             }
+        LambdaQueryWrapper<ClassGradeUser> classGradeUser = Wrappers.lambdaQuery();
+        classGradeUser.eq( ClassGradeUser::getUserId, bo.getUserId());
+        classGradeUser.eq( ClassGradeUser::getGradeId, bo.getGradeId());
+        ClassGradeUser classGradeUser1 = new ClassGradeUser();
+        classGradeUser1.setPeriodStatus(1);
+        classGradeUser1.setUpdateTime(DateUtils.getNowTime());
+        iClassGradeUserService.update(classGradeUser1,classGradeUser);
             sendPeriodSMS(bo);
             sendPeriodSevenSMS(bo);
         return true;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/IScheduleService.java

@@ -23,4 +23,6 @@ import java.util.Map;
 public interface IScheduleService extends IService<PolyvVideo> {
 
     String updateGoodsSend(UserQueryBo bo);
+
+    void updateExamSend(UserQueryBo bo);
 }

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

@@ -201,4 +201,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         }
         return "请求成功";
     }
+
+    @Override
+    public void updateExamSend(UserQueryBo bo) {
+        //新考预约提醒
+        sendExamSubscribe();
+    }
+
+    private void sendExamSubscribe() {
+
+    }
 }