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

Commit e494e1b2 authored by zhengfuxin's avatar zhengfuxin

修改抖音支付代码。

parent c2a6385e
...@@ -74,26 +74,19 @@ public abstract class AbstractDouYinPayStrategy implements IDouYinpayStrategy { ...@@ -74,26 +74,19 @@ public abstract class AbstractDouYinPayStrategy implements IDouYinpayStrategy {
//生成签名 //生成签名
String sign = PayDouYinpayUtils.getInstance().createSign(parameters); String sign = PayDouYinpayUtils.getInstance().createSign(parameters);
parameters.put("sign", sign); parameters.put("sign", sign);
//map转string //map转string
String data = JSON.toJSONString(parameters); String data = JSON.toJSONString(parameters);
log.info("dragonPay:douYinPay:"+dragonPayBaseReqDto.getDeviceFrom()+" request jsondata: {} ",data); log.info("dragonPay:douYinPay:"+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(); startTime = System.currentTimeMillis();
CloseableHttpClient httpClient = PayDouYinpayUtils.getInstance().getHttpClient(); CloseableHttpClient httpClient = PayDouYinpayUtils.getInstance().getHttpClient();
log.info("douYinPay-->request--> getHttpClient耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒"); log.info("douYinPay-->request--> getHttpClient耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒");
startTime = System.currentTimeMillis(); startTime = System.currentTimeMillis();
CloseableHttpResponse response = httpClient.execute(httpost); CloseableHttpResponse response = httpClient.execute(httpost);
log.info("douYinPay-->request--> execute耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒"); log.info("douYinPay-->request--> execute耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒");
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
//接到返回信息 //接到返回信息
String json = EntityUtils.toString(response.getEntity(), "UTF-8"); String json = EntityUtils.toString(response.getEntity(), "UTF-8");
EntityUtils.consume(entity); EntityUtils.consume(entity);
log.info("dragonPay:douYinPay:"+dragonPayBaseReqDto.getDeviceFrom()+" response jsonStr: {} ",json); log.info("dragonPay:douYinPay:"+dragonPayBaseReqDto.getDeviceFrom()+" response jsonStr: {} ",json);
......
...@@ -44,7 +44,7 @@ public class PayController { ...@@ -44,7 +44,7 @@ public class PayController {
@ApiOperation("Dragon支付") @ApiOperation("Dragon支付")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "payType", value = "支付类型:alipay,wepay,iappay", example = "alipay"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "payType", value = "支付类型:alipay,wepay,iappay,douyinpay", example = "alipay"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "deviceFrom", value = "设备来源:web,wap,app,js,apple", example = "wap"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "deviceFrom", value = "设备来源:web,wap,app,js,apple", example = "wap"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "type", value = "业务类型:TICKET,PRODUCT,COST,MBEANS,LIVE,VIDEO,VIP,CLUB,STRAWBERRY", example = "TICKET"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "type", value = "业务类型:TICKET,PRODUCT,COST,MBEANS,LIVE,VIDEO,VIP,CLUB,STRAWBERRY", example = "TICKET"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "price", value = "支付金额", example = "0.1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "price", value = "支付金额", example = "0.1"),
......
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