Ver código fonte

core 渠道通知

master
chenchaod 2 semanas atrás
pai
commit
a21713021f

+ 5
- 5
gly-base-core/src/main/java/cn/com/taiji/core/manager/tools/issue/QdCallUtil.java Ver arquivo

@@ -75,7 +75,7 @@ public class QdCallUtil extends CommonAbstract {
if (agencyConfig == null || !hasText(agencyConfig.getNoticeUrl())){
logger.error("通知渠道,获取密钥异常:{}", "未找到机构配置");
//回调结果入库
saveCallBackResult(order, callbackModel, "", "未找到机构相关配置");
saveCallBackResult(order,"没有配通知地址", callbackModel, "", "未找到机构相关配置");
return null;
}
//异步执行,不影响主业务,减少耗时
@@ -89,7 +89,7 @@ public class QdCallUtil extends CommonAbstract {
} catch (Exception e) {
logger.error("通知渠道,获取密钥异常:{}", e.getMessage());
//回调结果入库
saveCallBackResult(order, callbackModel, "", "获取密钥失败");
saveCallBackResult(order,agencyConfig.getNoticeUrl(), callbackModel, "", "获取密钥失败");
return null;
}
//通知请求参数
@@ -109,17 +109,17 @@ public class QdCallUtil extends CommonAbstract {
logger.error("通知渠道异常:{}", exceMsg);
} finally {
//回调结果入库
saveCallBackResult(order, callbackModel, response == null ? "" : response.toJson(), exceMsg);
saveCallBackResult(order,agencyConfig.getNoticeUrl(), callbackModel, response == null ? "" : response.toJson(), exceMsg);
}
return response;
// }
// );
}

private void saveCallBackResult(IssueOrderinfo order, CallbackModel callbackModel, String response, String exceMsg) {
private void saveCallBackResult(IssueOrderinfo order,String url, CallbackModel callbackModel, String response, String exceMsg) {
IssueOrderChannelNotice quDaoCallBackResult = new IssueOrderChannelNotice();
quDaoCallBackResult.setOrderNo(order.getOrderNo());
quDaoCallBackResult.setReqUrl(order.getReturnUrl());
quDaoCallBackResult.setReqUrl(url);
quDaoCallBackResult.setType(OrderType.ISSUE);
quDaoCallBackResult.setReqJson(callbackModel.toJson());
quDaoCallBackResult.setRespJson(response);

Carregando…
Cancelar
Salvar