|
@@ -140,6 +140,7 @@ public class GigThirdApiController {
|
|
|
|
|
|
// 请求序号
|
|
// 请求序号
|
|
String reqId = bodyJson.getStr("reqId");
|
|
String reqId = bodyJson.getStr("reqId");
|
|
|
|
+ String data = bodyJson.getStr("data");
|
|
|
|
|
|
String redisKey = String.format("%s_%s", CacheConstants.QI_FU_SIGN_NOTIFY_KEY, reqId);
|
|
String redisKey = String.format("%s_%s", CacheConstants.QI_FU_SIGN_NOTIFY_KEY, reqId);
|
|
Boolean absent = redisTemplate.opsForValue().setIfAbsent(redisKey, reqId, 30, TimeUnit.MINUTES);
|
|
Boolean absent = redisTemplate.opsForValue().setIfAbsent(redisKey, reqId, 30, TimeUnit.MINUTES);
|
|
@@ -148,33 +149,27 @@ public class GigThirdApiController {
|
|
return "fail";
|
|
return "fail";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ String decryptDataStr = null;
|
|
JSONObject newBodyJson = null;
|
|
JSONObject newBodyJson = null;
|
|
try {
|
|
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");
|
|
|
|
|
|
+ Boolean encryptedState = bodyJson.getBool("encryptedState");
|
|
|
|
|
|
// 查询deptSub获取desKey
|
|
// 查询deptSub获取desKey
|
|
SysDeptSub deptSub = sysDeptSubService.getOne(Wrappers.<SysDeptSub>lambdaQuery()
|
|
SysDeptSub deptSub = sysDeptSubService.getOne(Wrappers.<SysDeptSub>lambdaQuery()
|
|
- .likeRight(SysDeptSub::getAppId, merId)
|
|
|
|
.eq(SysDeptSub::getEnableFlag, "1")
|
|
.eq(SysDeptSub::getEnableFlag, "1")
|
|
- .eq(SysDeptSub::getSubjectLocation, SubjectLocation.QI_FU));
|
|
|
|
|
|
+ .eq(SysDeptSub::getSubjectLocation, SubjectLocation.QI_FU)
|
|
|
|
+ .last("limit 1"));
|
|
if (deptSub == null || StrUtil.isBlank(deptSub.getAppId())) {
|
|
if (deptSub == null || StrUtil.isBlank(deptSub.getAppId())) {
|
|
- log.warn("未配置福建企赋deptSub merId={}", merId);
|
|
|
|
|
|
+ log.warn("未配置福建企赋deptSub reqId={}", reqId);
|
|
return "fail";
|
|
return "fail";
|
|
}
|
|
}
|
|
|
|
|
|
String desKey = StrUtil.split(deptSub.getAppId(), "|").get(2);
|
|
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));
|
|
|
|
|
|
+ // 验签 略
|
|
|
|
+ // 解密data
|
|
|
|
+ decryptDataStr = ZhongyiyunUtils.decrypt(data, desKey);
|
|
|
|
+ newBodyJson = JSONUtil.parseObj(decryptDataStr);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("福建企赋签约回调参数异常", e);
|
|
log.error("福建企赋签约回调参数异常", e);
|
|
return "fail";
|
|
return "fail";
|
|
@@ -184,7 +179,7 @@ public class GigThirdApiController {
|
|
inputRecord.setReqId(reqId);
|
|
inputRecord.setReqId(reqId);
|
|
inputRecord.setReqType(QifuInputRecord.ReqType.SIGN_NOTIFY.getType());
|
|
inputRecord.setReqType(QifuInputRecord.ReqType.SIGN_NOTIFY.getType());
|
|
inputRecord.setReqBody(body);
|
|
inputRecord.setReqBody(body);
|
|
- inputRecord.setDecryptBody(JSONUtil.toJsonStr(newBodyJson));
|
|
|
|
|
|
+ inputRecord.setDecryptBody(decryptDataStr);
|
|
qifuInputRecordMapper.insert(inputRecord);
|
|
qifuInputRecordMapper.insert(inputRecord);
|
|
}
|
|
}
|
|
|
|
|