记得上下班打卡 | git大法好,push需谨慎

Commit 272af690 authored by anjiabin's avatar anjiabin

微信支付增加日志

parent 4fec91be
...@@ -58,7 +58,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy { ...@@ -58,7 +58,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
@Override @Override
public ResponseDto<DragonPayBaseRespDto> dragonPay(DragonPayBaseReqDto dragonPayBaseReqDto) { public ResponseDto<DragonPayBaseRespDto> dragonPay(DragonPayBaseReqDto dragonPayBaseReqDto) {
long startTimeTotal = System.currentTimeMillis();
long startTime = System.currentTimeMillis();
try { try {
//构造请求参数 //构造请求参数
SortedMap<String, Object> commonParams = this.buildRequestParamMap(dragonPayBaseReqDto); SortedMap<String, Object> commonParams = this.buildRequestParamMap(dragonPayBaseReqDto);
...@@ -73,9 +74,12 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy { ...@@ -73,9 +74,12 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
log.info("dragonPay:wepay:"+dragonPayBaseReqDto.getDeviceFrom()+" request jsondata: {} ",data); log.info("dragonPay:wepay:"+dragonPayBaseReqDto.getDeviceFrom()+" request jsondata: {} ",data);
HttpPost httpost = new HttpPost(this.getRequestUrl()); HttpPost httpost = new HttpPost(this.getRequestUrl());
httpost.setEntity(new StringEntity(data, "UTF-8")); httpost.setEntity(new StringEntity(data, "UTF-8"));
startTime = System.currentTimeMillis();
CloseableHttpResponse response = PayWepayUtils.getInstance().getHttpClient().execute(httpost); CloseableHttpResponse response = PayWepayUtils.getInstance().getHttpClient().execute(httpost);
log.info("wepay-->request--> 耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒");
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
//接受到返回信息 //接受到返回信息
String xmlStr = EntityUtils.toString(response.getEntity(), "UTF-8"); String xmlStr = EntityUtils.toString(response.getEntity(), "UTF-8");
...@@ -98,6 +102,7 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy { ...@@ -98,6 +102,7 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
//支付订单持久化 //支付订单持久化
dragonServiceCommonBiz.buildPayOrders(dragonPayBaseReqDto,respPayDto); dragonServiceCommonBiz.buildPayOrders(dragonPayBaseReqDto,respPayDto);
log.info("wepay-->dragonPay--> 耗时:{}",(System.currentTimeMillis() - startTimeTotal)+"毫秒");
return ResponseDto.success(respPayDto); return ResponseDto.success(respPayDto);
}else{ }else{
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_PARAM_ERROR.getCode(),DragonErrorCodeEnum.TRADE_PARAM_ERROR.getMessage()); throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_PARAM_ERROR.getCode(),DragonErrorCodeEnum.TRADE_PARAM_ERROR.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment