mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-04 19:49:07 +00:00
style 一些常量和参数的调整
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
package cn.bootx.platform.daxpay.admin.controller.channel;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.PageResult;
|
||||
import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.union.service.UnionPayRecordService;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.union.UnionPayRecordDto;
|
||||
import cn.bootx.platform.daxpay.service.param.channel.union.UnionPayRecordQuery;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -15,4 +24,18 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/union/pay")
|
||||
@RequiredArgsConstructor
|
||||
public class UnionPayController {
|
||||
|
||||
private final UnionPayRecordService unionPayRecordService;;
|
||||
|
||||
@Operation(summary = "记录分页")
|
||||
@GetMapping("/record/page")
|
||||
public ResResult<PageResult<UnionPayRecordDto>> recordPage(PageParam pageParam, UnionPayRecordQuery query){
|
||||
return Res.ok(unionPayRecordService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询记录详情")
|
||||
@GetMapping("/record/findById")
|
||||
public ResResult<UnionPayRecordDto> findById(Long id){
|
||||
return Res.ok(unionPayRecordService.findById(id));
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@ public class WeChatPayController {
|
||||
return Res.ok(weChatPayRecordService.page(pageParam, query));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询记录详情")
|
||||
@GetMapping("/record/findById")
|
||||
public ResResult<WeChatPayRecordDto> findById(Long id){
|
||||
|
@@ -28,7 +28,7 @@ public enum PaySyncStatusEnum {
|
||||
* 所以查询为了区分,增加一个未知的状态, 用于处理这种特殊情况, 然后根据业务需要,关闭订单或者进行其他操作
|
||||
*/
|
||||
NOT_FOUND_UNKNOWN("pay_not_found_unknown","交易不存在(特殊)"),
|
||||
/** 本地订单到了超时时间, 但是网关和本地都未关闭, 需要触发关闭相关处理, 可以进行手动设置 */
|
||||
/** 订单到了超时时间, 不分情况可以进行手动设置支付超时状态 */
|
||||
TIMEOUT("pay_timeout", "支付超时");
|
||||
|
||||
/** 编码 */
|
||||
|
@@ -12,43 +12,7 @@ import lombok.Data;
|
||||
@Schema(title = "云闪付支付参数")
|
||||
public class UnionPayParam {
|
||||
|
||||
@Schema(description = "微信openId")
|
||||
private String openId;
|
||||
|
||||
@Schema(description = "授权码(主动扫描用户的付款码)")
|
||||
private String authCode;
|
||||
|
||||
/**
|
||||
* 银联JS支付时进行传输
|
||||
*/
|
||||
@Schema(description = "用户ID")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户的外网ip,需要与访问银联支付页面的ip一致,银联会进行校验
|
||||
*/
|
||||
@Schema(description = "用户ip")
|
||||
private String customerIp;
|
||||
|
||||
/**
|
||||
* 商户app对应的微信开放平台移动应用APPID
|
||||
* 微信APP支付时进行传输
|
||||
*/
|
||||
@Schema(description = "移动应用APPID")
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 微信开放平台审核通过的移动应用AppID
|
||||
* 微信APP支付时进行传输
|
||||
*/
|
||||
@Schema(description = "移动应用AppID")
|
||||
private String subAppId;
|
||||
|
||||
/**
|
||||
* 买家支付宝用户ID
|
||||
* 支付宝服务窗时传输
|
||||
*/
|
||||
@Schema(description = "微信支付授权码")
|
||||
private String buyerId;
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public class UnionPayWay {
|
||||
|
||||
// 支付方式
|
||||
private static final List<PayWayEnum> PAY_WAYS = Arrays.asList(PayWayEnum.WAP, PayWayEnum.APP, PayWayEnum.WEB,
|
||||
PayWayEnum.JSAPI, PayWayEnum.QRCODE, PayWayEnum.BARCODE,PayWayEnum.B2B);
|
||||
PayWayEnum.JSAPI, PayWayEnum.QRCODE, PayWayEnum.BARCODE );
|
||||
|
||||
/**
|
||||
* 根据编码获取
|
||||
|
@@ -84,7 +84,7 @@ public class UnionPayService {
|
||||
else if (payWayEnum == PayWayEnum.WAP) {
|
||||
payBody = this.formPay(totalFee, payOrder, unionPayKit, UnionTransactionType.WAP );
|
||||
}
|
||||
// b2b支付
|
||||
// b2b支付 TODO 未完成
|
||||
else if (payWayEnum == PayWayEnum.B2B) {
|
||||
payBody = this.b2bPay(totalFee, payOrder, unionPayKit);
|
||||
}
|
||||
@@ -102,7 +102,6 @@ public class UnionPayService {
|
||||
unionPayOrder.setOutTradeNo(String.valueOf(payOrder.getId()));
|
||||
unionPayOrder.setSubject(payOrder.getTitle());
|
||||
unionPayOrder.setPrice(amount);
|
||||
unionPayOrder.setBankType();
|
||||
unionPayOrder.setExpirationTime(expiredTime);
|
||||
unionPayOrder.setTransactionType(type);
|
||||
return unionPayKit.toPay(unionPayOrder);
|
||||
|
Reference in New Issue
Block a user