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

Commit ae4a9b70 authored by anjiabin's avatar anjiabin

优化支付代码

parent 88cf7656
package com.liquidnet.service.dragon.dto;
import com.alibaba.fastjson.JSON;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
......@@ -37,7 +37,7 @@ public class DragonPayBaseReqDto implements Serializable, Cloneable{
@Override
public String toString(){
return JSON.toJSONString(this);
return JsonUtils.toJson(this);
}
private static final DragonPayBaseReqDto obj = new DragonPayBaseReqDto();
......
......@@ -143,7 +143,7 @@ public class AlipayBiz{
* @return
*/
public static Map<String, Object> tradeQuery(String outTradeNo) {
log.info("======>支付宝交易查询");
log.info("AlipayBiz.tradeQuery-->> 支付宝交易查询");
AlipayClient alipayClient = PayAlipayUtils.getInstance().getHttpClient();
SortedMap<String, Object> bizContentMap = new TreeMap<>();
......
......@@ -37,8 +37,8 @@ public class WepayBiz{
* @return
*/
public Map<String, Object> tradeQuery(String outTradeNo, String appid) {
log.info("WepayBiz.tradeQuery-->> request outTradeNo:{} appid:{} ",outTradeNo,appid);
Map<String, Object> respMap = new HashMap<>();
log.info("======>支付宝交易查询");
SortedMap<String, Object> paramMap = new TreeMap<>();
paramMap.put("appid", appid);
paramMap.put("mch_id", merchantId);
......@@ -57,7 +57,7 @@ public class WepayBiz{
//接受到返回信息
String xmlStr = EntityUtils.toString(response.getEntity(), "UTF-8");
EntityUtils.consume(entity);
log.info("dragonPay:wepay:wap response xmlStr: {} ",xmlStr);
log.info("WepayBiz.tradeQuery-->> response xmlStr: {} ",xmlStr);
respMap = XmlUtil.xmlToMap(xmlStr);
}catch (Exception e){
log.error(e.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