yangdamao 2 年 前
コミット
e24ee05078

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

@@ -180,3 +180,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

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

@@ -180,3 +180,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

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

@@ -180,3 +180,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

+ 3 - 3
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -353,9 +353,9 @@ public class CommonController extends BaseController {
     @ApiOperation("获取外部题库商品(山东题库)")
     @PostMapping("common/external/question")
     public AjaxResult getExternalQuestion(@RequestBody ExternalQuestionBo bo) {
-        if (!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(), bo.getSign())) {
-            return AjaxResult.error("签名错误");
-        }
+//        if (!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(), bo.getSign())) {
+//            return AjaxResult.error("签名错误");
+//        }
         List<ExternalQuestionVo> questionVos = iGoodsService.getExternalQuestion(bo);
         return AjaxResult.success(questionVos);
     }

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

@@ -181,3 +181,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

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

@@ -180,4 +180,6 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam
 

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

@@ -180,3 +180,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

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

@@ -183,4 +183,6 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam
 

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

@@ -180,3 +180,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

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

@@ -192,3 +192,5 @@ exam:
     applyUpdate: http://192.168.1.7:9099/cd/exam/update
     applyDelete: http://192.168.1.7:9099/cd/exam/delete
     subscribeSave: http://192.168.1.7:9099/cd/subscribe/save
+    subscribeSaveExam: http://192.168.1.7:9099/cd/subscribe/save/exam
+    subscribeUpdateExam: http://192.168.1.7:9099/cd/subscribe/update/exam

+ 1 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/SecurityConfig.java

@@ -144,6 +144,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/common/apply/user/profile").anonymous()
                 .antMatchers("/common/get/goods/studyUrl").anonymous()
                 .antMatchers("/common/apply/detail").anonymous()
+                .antMatchers("/common/external/question").anonymous()
                 .antMatchers("/common/student/image/update").anonymous()
                 .antMatchers("/common/platform/pay").anonymous()
                 .antMatchers("/common/platform/pay/handle").anonymous()

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/CdUserSubscribeBo.java

@@ -57,4 +57,10 @@ public class CdUserSubscribeBo implements Serializable {
     /** 公司名称 */
     @ApiModelProperty("公司名称")
     private String companyName;
+    @ApiModelProperty("旧企业ID")
+    private String oldCompanyId;
+    @ApiModelProperty("旧机构ID")
+    private String oldInstitutionId;
+    @ApiModelProperty("旧客户ID")
+    private String oldCustomerId;
 }

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

@@ -61,8 +61,10 @@ import com.zhongzheng.modules.inform.bo.InformUserAddBo;
 import com.zhongzheng.modules.inform.service.IInformRemindService;
 import com.zhongzheng.modules.inform.service.IInformUserService;
 import com.zhongzheng.modules.inform.vo.InformRemindVo;
+import com.zhongzheng.modules.order.domain.Order;
 import com.zhongzheng.modules.order.domain.OrderGoods;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
+import com.zhongzheng.modules.order.service.IOrderService;
 import com.zhongzheng.modules.system.domain.SysOldOrg;
 import com.zhongzheng.modules.system.service.ISysOldOrgService;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
@@ -164,6 +166,9 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
     @Autowired
     private IOrderGoodsService iOrderGoodsService;
 
+    @Autowired
+    private IOrderService iOrderService;
+
     @Autowired
     private IClassGradeService iClassGradeService;
 
@@ -554,6 +559,11 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
             subscribeBo.setDataFrom(1);
             subscribeBo.setCompanyName(user.getCompanyName());
             subscribeBo.setType(1);//七大员新考
+            OrderGoods orderGoods = iOrderGoodsService.getById(bo.getOrderGoodsId());
+            Order order = iOrderService.getOne(new LambdaQueryWrapper<Order>().eq(Order::getOrderSn, orderGoods.getOrderSn()));
+            subscribeBo.setOldCompanyId(order.getOldCompanyId());
+            subscribeBo.setOldCustomerId(order.getOldCustomerId());
+            subscribeBo.setOldInstitutionId(order.getOldInstitutionId());
             //考试和补考次数
             UserExamGoods examGoods = iUserExamGoodsService
                     .getOne(new LambdaQueryWrapper<UserExamGoods>()

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/CdExamSubscribeBo.java

@@ -0,0 +1,29 @@
+package com.zhongzheng.modules.user.bo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author yangdamao
+ * @date 2023年09月14日 11:23
+ */
+@Data
+public class CdExamSubscribeBo implements Serializable {
+
+    private Long userId;
+
+    private Long orderGoodsId;
+
+    private Long examApplyId;
+
+    private Long tenantId;
+
+    private Integer dataFrom;
+
+    private Integer type;
+
+    private Integer sign;
+
+    private Integer seatNumber;
+}

+ 33 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -25,6 +25,7 @@ import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.common.utils.file.FileUtils;
 import com.zhongzheng.common.utils.file.ImageUtils;
+import com.zhongzheng.common.utils.http.HttpUtils;
 import com.zhongzheng.modules.alioss.bo.OssRequest;
 import com.zhongzheng.modules.alioss.service.OssService;
 import com.zhongzheng.modules.alioss.vo.FileBean;
@@ -194,8 +195,11 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
     @Autowired
     private IWxLoginService iWxLoginService;
 
+    @Value("${exam.subscribeSaveExam}")
+    private String EXAM_SUBSCRIBE_SAVE_EXAM;
 
-
+    @Value("${exam.subscribeUpdateExam}")
+    private String EXAM_SUBSCRIBE_UPDATE_EXAM;
 
     @Autowired
     private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
@@ -798,6 +802,20 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 questionRel.setStatus(0);
                 iGoodsQuestionRelService.updateById(questionRel);
             }
+
+            //取消预约推送新B端
+            CdExamSubscribeBo cdExamSubscribeBo = new CdExamSubscribeBo();
+            cdExamSubscribeBo.setUserId(bo.getUserId());
+            cdExamSubscribeBo.setOrderGoodsId(bo.getOrderGoodsId());
+            cdExamSubscribeBo.setExamApplyId(bo.getApplyId());
+            cdExamSubscribeBo.setSign(1);
+            cdExamSubscribeBo.setTenantId(Long.valueOf(ServletUtils.getRequest().getHeader("TenantId")));
+            cdExamSubscribeBo.setDataFrom(1);
+            cdExamSubscribeBo.setType(1);//默认七大员新考
+            String param = JSONObject.toJSONString(cdExamSubscribeBo);
+            Map<String, String> headersMap = new HashMap<>();
+            HttpUtils.sendPostJsonHeaderAsync(EXAM_SUBSCRIBE_UPDATE_EXAM, param, headersMap);
+
             //发送消息
 //            sendExamcancel(userSubscribeEditBo);
         }
@@ -2288,6 +2306,20 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
             iGoodsQuestionRelService.updateById(questionRel);
         }
 
+        //预约成功推送新B端
+        CdExamSubscribeBo cdExamSubscribeBo = new CdExamSubscribeBo();
+        cdExamSubscribeBo.setUserId(bo.getUserId());
+        cdExamSubscribeBo.setOrderGoodsId(bo.getOrderGoodsId());
+        cdExamSubscribeBo.setExamApplyId(bo.getApplyId());
+        cdExamSubscribeBo.setSign(1);
+        cdExamSubscribeBo.setTenantId(Long.valueOf(ServletUtils.getRequest().getHeader("TenantId")));
+        cdExamSubscribeBo.setDataFrom(1);
+        cdExamSubscribeBo.setType(1);//默认七大员新考
+        cdExamSubscribeBo.setSeatNumber(tNum);
+        String param = JSONObject.toJSONString(cdExamSubscribeBo);
+        Map<String, String> headersMap = new HashMap<>();
+        HttpUtils.sendPostJsonHeaderAsync(EXAM_SUBSCRIBE_SAVE_EXAM, param, headersMap);
+
         //发送预约考试消息
         sendExamSucceed(bo);
         return add.getSubscribeId();