保存日志
This commit is contained in:
parent
943829f8d7
commit
97d5129ca5
|
@ -45,7 +45,6 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
|||
@Override
|
||||
public SysExtensionApiEntity payApply(SysExtensionApiEntity entity) {
|
||||
String bodys = entity.getBodys();
|
||||
logger.info("Cbs8ExtServiceImpl.payApply方法body参数:{}",bodys);
|
||||
if (StrUtil.isNotEmpty(bodys)) {
|
||||
PaymentEntity paymentEntity = JSONObject.parseObject(bodys, PaymentEntity.class);
|
||||
if (null != paymentEntity) {
|
||||
|
@ -73,10 +72,11 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
|||
String requestData = JSONObject.toJSONString(list);
|
||||
//加密 签名
|
||||
encrypAndsign(entity, requestData);
|
||||
//重试日志id
|
||||
entity.getHeaders().put("integration_task_living_details_id",paymentEntity.getTaskDetailId());
|
||||
entity.setBodys(requestData);
|
||||
}
|
||||
}
|
||||
logger.info("Cbs8ExtServiceImpl.payApply方法执行完毕:{}",JSONObject.toJSONString(entity));
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,7 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
|||
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
||||
//自定义参数,存放的是请求报文明文
|
||||
String hzyaExtData = targetHeaders.getString("hzyaExtData");
|
||||
String taskDetailId = targetHeaders.getString("integration_task_living_details_id");
|
||||
String returnDataBase64 = logEntity.getReturnData();
|
||||
byte[] secretResByte = Base64.getDecoder().decode(returnDataBase64);
|
||||
//解密报文
|
||||
|
@ -111,12 +112,20 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
|||
//调用接口请求参数
|
||||
logTask.setRootAppNewData(hzyaExtData);
|
||||
PayResponseDTO payResponseDTO = PayResponseDTO.payResValueOf(decryptRes);
|
||||
if (StrUtil.isEmpty(taskDetailId)){
|
||||
//为true是成功
|
||||
if (payResponseDTO.getSuccessed()) {
|
||||
taskLivingDetailsService.saveLogToSuccess(logTask);
|
||||
}else {
|
||||
taskLivingDetailsService.saveLogToFail(logTask);
|
||||
}
|
||||
}else {
|
||||
if (payResponseDTO.getSuccessed()){
|
||||
taskLivingDetailsService.saveLogFailToSuccess(logTask);
|
||||
}else {
|
||||
taskLivingDetailsService.updateLogFailToSuccess(logTask);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("payApplyCallBack方法执行出错:{}",e);
|
||||
}
|
||||
|
|
|
@ -46,8 +46,9 @@ public class PaymentEntity extends BaseEntity {
|
|||
private String payCompanyCode;//付款公司编码
|
||||
|
||||
//是否重试
|
||||
private String retry_flag;
|
||||
|
||||
private String retryFlag;
|
||||
//重试日志id
|
||||
private String taskDetailId;
|
||||
public String getOaId() {
|
||||
return oaId;
|
||||
}
|
||||
|
@ -328,11 +329,19 @@ public class PaymentEntity extends BaseEntity {
|
|||
this.applyCode = applyCode;
|
||||
}
|
||||
|
||||
public String getRetry_flag() {
|
||||
return retry_flag;
|
||||
public String getRetryFlag() {
|
||||
return retryFlag;
|
||||
}
|
||||
|
||||
public void setRetry_flag(String retry_flag) {
|
||||
this.retry_flag = retry_flag;
|
||||
public void setRetryFlag(String retryFlag) {
|
||||
this.retryFlag = retryFlag;
|
||||
}
|
||||
|
||||
public String getTaskDetailId() {
|
||||
return taskDetailId;
|
||||
}
|
||||
|
||||
public void setTaskDetailId(String taskDetailId) {
|
||||
this.taskDetailId = taskDetailId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@
|
|||
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
||||
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
||||
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
||||
<if test="retry_flag == null or retry_flag == ''">
|
||||
<if test="retryFlag == null or retryFlag == ''">
|
||||
and v.payResult is null
|
||||
and v.amount > 0
|
||||
and v.finishedflag = 1
|
||||
|
|
Loading…
Reference in New Issue