Explorar o código

feat: 众蚁云签约mq回调处理3

李学松 %!s(int64=2) %!d(string=hai) anos
pai
achega
b833c2eb74

+ 8 - 40
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/GigThirdApiController.java

@@ -139,48 +139,16 @@ public class GigThirdApiController {
 			return "fail";
 		}
 
-		JSONObject newBodyJson = null;
-		try {
-			String merId = bodyJson.getStr("merId");
-			String bankCard = bodyJson.getStr("bankCard");
-			String idCard = bodyJson.getStr("idCard");
-			String mobile = bodyJson.getStr("mobile");
-			String name = bodyJson.getStr("name");
-			String remark3 = bodyJson.getStr("remark3");
-
-			// 查询deptSub获取desKey
-			SysDeptSub deptSub = sysDeptSubService.getOne(Wrappers.<SysDeptSub>lambdaQuery()
-					.likeRight(SysDeptSub::getAppId, merId)
-					.eq(SysDeptSub::getEnableFlag, "1")
-					.eq(SysDeptSub::getSubjectLocation, SubjectLocation.ZHONG_YI_YUN));
-			if (deptSub == null || StrUtil.isBlank(deptSub.getAppId())) {
-				log.warn("未配置众蚁云deptSub merId={}", merId);
-				return "fail";
-			}
-
-			String desKey = StrUtil.split(deptSub.getAppId(), "|").get(2);
-
-			newBodyJson = BeanUtil.copyProperties(bodyJson, JSONObject.class);
-			newBodyJson.set("bankCard", ZhongyiyunUtils.decrypt(bankCard, desKey));
-			newBodyJson.set("idCard", ZhongyiyunUtils.decrypt(idCard, desKey));
-			newBodyJson.set("mobile", ZhongyiyunUtils.decrypt(mobile, desKey));
-			newBodyJson.set("name", ZhongyiyunUtils.decrypt(name, desKey));
-			newBodyJson.set("remark3", ZhongyiyunUtils.decrypt(remark3, desKey));
-		} catch (Exception e) {
-			log.error("众蚁云签约回调参数异常", e);
-			return "fail";
-		} finally {
-			// 请求记录到数据库
-			ZhongyiyunInputRecord inputRecord = new ZhongyiyunInputRecord();
-			inputRecord.setReqId(reqId);
-			inputRecord.setReqType(ZhongyiyunInputRecord.ReqType.SIGN_NOTIFY.getType());
-			inputRecord.setReqBody(body);
-			inputRecord.setDecryptBody(JSONUtil.toJsonStr(newBodyJson));
-			zhongyiyunInputRecordService.save(inputRecord);
-		}
+		// 请求记录到数据库
+		ZhongyiyunInputRecord inputRecord = new ZhongyiyunInputRecord();
+		inputRecord.setReqId(reqId);
+		inputRecord.setReqType(ZhongyiyunInputRecord.ReqType.SIGN_NOTIFY.getType());
+		inputRecord.setReqBody(body);
+		inputRecord.setDecryptBody(body);
+		zhongyiyunInputRecordService.save(inputRecord);
 
 		// 业务处理
-		gigThirdApiService.zhongYiYunSignNotify(newBodyJson);
+		gigThirdApiService.zhongYiYunSignNotify(bodyJson);
 
 		return "success";
 	}