重试参数

This commit is contained in:
xiang2lin 2024-07-10 18:33:47 +08:00
parent 4ae3c5b623
commit 043f7704aa
3 changed files with 16 additions and 8 deletions

View File

@ -286,14 +286,11 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
* @return
*/
private Map<String, String> headersValueOf(String sign, long timestamp) {
logger.info("开始组装请求头参数:{},{}",sign,timestamp);
Map<String, String> header = new HashMap();
header.put(CBSUtil.SIGN_HEADER_NAME, sign);
header.put(CBSUtil.TIMESTAMP_HEADER, Long.toString(timestamp));
header.put(HTTP.CONTENT_TYPE, CBSUtil.TARGET_CONTENT_TYPE);
logger.info("准备获取token");
header.put(CBSUtil.AUTHORIZATION, CBSUtil.BEARER + CbsAccessToken.getToken());
logger.info("组装后的header参数:{}",JSONObject.toJSONString(header));
return header;
}
@ -306,7 +303,6 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
private void encrypAndsign(SysExtensionApiEntity entity, String requestData) {
//签名
long timestamp = System.currentTimeMillis();
logger.info("CBS请求参数明文:{}", requestData);
String sign = CBSUtil.sign(requestData, timestamp);
//加密
byte[] encryptedData = CBSUtil.encrypt(requestData);
@ -314,6 +310,5 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
header.put("hzyaExtData", requestData);
entity.setByteBodys(encryptedData);
entity.setHeaders(header);
logger.info("加密,签名方法执行完毕");
}
}

View File

@ -45,6 +45,9 @@ public class PaymentEntity extends BaseEntity {
private String payType;//付款类别
private String payCompanyCode;//付款公司编码
//是否重试
private String retry_flag;
public String getOaId() {
return oaId;
}
@ -324,4 +327,12 @@ public class PaymentEntity extends BaseEntity {
public void setApplyCode(String applyCode) {
this.applyCode = applyCode;
}
public String getRetry_flag() {
return retry_flag;
}
public void setRetry_flag(String retry_flag) {
this.retry_flag = retry_flag;
}
}

View File

@ -412,9 +412,11 @@
<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>
and v.amount > 0
and v.payResult is null
and v.finishedflag = 1
<if test="retry_flag == null or retry_flag == ''">
and v.payResult is null
and v.amount > 0
and v.finishedflag = 1
</if>
</trim>
</select>