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

Commit c1c27426 authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev' into dev

parents ec3f5d7d 7f296f8c
package com.liquidnet.service.dragon.channel.alipay.strategy.impl; package com.liquidnet.service.dragon.channel.alipay.strategy.impl;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.channel.alipay.biz.AlipayBiz; import com.liquidnet.service.dragon.channel.alipay.biz.AlipayBiz;
import com.liquidnet.service.dragon.channel.alipay.req.AlipayTradePayReq; import com.liquidnet.service.dragon.channel.alipay.req.AlipayTradePayReq;
...@@ -40,7 +41,9 @@ public abstract class AbstractAlipayStrategy implements IAlipayStrategy { ...@@ -40,7 +41,9 @@ public abstract class AbstractAlipayStrategy implements IAlipayStrategy {
alipayTradePayReq.setBody(dragonPayBaseReqDto.getDetail()); alipayTradePayReq.setBody(dragonPayBaseReqDto.getDetail());
//dragon中支付编号 //dragon中支付编号
alipayTradePayReq.setOutTradeNo(dragonPayBaseReqDto.getCode()); alipayTradePayReq.setOutTradeNo(dragonPayBaseReqDto.getCode());
alipayTradePayReq.setTimeExpire(dragonPayBaseReqDto.getExpireTime()); //设置订单过期时间
String timeExpire = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(dragonPayBaseReqDto.getCreateDate()).plusMinutes(Long.parseLong(dragonPayBaseReqDto.getExpireTime())),DateUtil.Formatter.yyyyMMddHHmmss);
alipayTradePayReq.setTimeExpire(timeExpire);
alipayTradePayReq.setNotifyUrl(this.getNotifyUrl()); alipayTradePayReq.setNotifyUrl(this.getNotifyUrl());
alipayTradePayReq.setTimestamp(dragonPayBaseReqDto.getCreateDate()); alipayTradePayReq.setTimestamp(dragonPayBaseReqDto.getCreateDate());
//调用支付 //调用支付
......
...@@ -106,7 +106,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy { ...@@ -106,7 +106,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
parameters.put("body", dragonPayBaseReqDto.getName()); parameters.put("body", dragonPayBaseReqDto.getName());
parameters.put("detail", dragonPayBaseReqDto.getDetail()); parameters.put("detail", dragonPayBaseReqDto.getDetail());
parameters.put("out_trade_no", dragonPayBaseReqDto.getCode()); parameters.put("out_trade_no", dragonPayBaseReqDto.getCode());
parameters.put("time_expire", "203110908103456"); String timeExpire = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(dragonPayBaseReqDto.getCreateDate()).plusMinutes(Long.parseLong(dragonPayBaseReqDto.getExpireTime())),DateUtil.Formatter.yyyyMMddHHmmssTrim);
parameters.put("time_expire", timeExpire);
parameters.put("notify_url", this.getNotifyUrl()); parameters.put("notify_url", this.getNotifyUrl());
return parameters; return parameters;
}; };
......
...@@ -47,7 +47,9 @@ public class PayController { ...@@ -47,7 +47,9 @@ public class PayController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "detail", value = "订单描述", example = "测试订单001"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "detail", value = "订单描述", example = "测试订单001"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderCode", value = "订单编号", example = "ORDER0001"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderCode", value = "订单编号", example = "ORDER0001"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "clientIp", value = "客户端ip", example = "127.0.0.1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "clientIp", value = "客户端ip", example = "127.0.0.1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "notifyUrl", value = "通知url", example = "testdragon.zhengzai.tv"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "notifyUrl", value = "通知url", example = "devdragon.zhengzai.tv"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "createDate", value = "订单创建时间", example = "2021-07-13 13:00:00"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "expireTime", value = "订单过期时间", example = "5"),
}) })
@ResponseBody @ResponseBody
public ResponseDto<DragonPayBaseRespDto> dragonPay( public ResponseDto<DragonPayBaseRespDto> dragonPay(
...@@ -65,8 +67,8 @@ public class PayController { ...@@ -65,8 +67,8 @@ public class PayController {
// @RequestParam(value = "quitUrl",required = false) String quitUrl, // @RequestParam(value = "quitUrl",required = false) String quitUrl,
// @RequestParam(value = "showUrl",required = false) String showUrl, // @RequestParam(value = "showUrl",required = false) String showUrl,
// @RequestParam(value = "code",required = false) String code, // @RequestParam(value = "code",required = false) String code,
@RequestParam(value = "createDate",required = false) String createDate, @RequestParam(value = "createDate",required = true) String createDate,
@RequestParam(value = "expireTime",required = false) String expireTime){ @RequestParam(value = "expireTime",required = true) String expireTime){
//为什么在js和applet中才需要判断open_id? //为什么在js和applet中才需要判断open_id?
if(payType.equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())){ if(payType.equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())){
if(StringUtil.isEmpty(openId)){ if(StringUtil.isEmpty(openId)){
......
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