mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-08 22:25:32 +08:00
feat 分账SDK相关接口, 版本号升级
This commit is contained in:
10
_doc/Task.md
10
_doc/Task.md
@@ -6,10 +6,12 @@
|
||||
- [ ] 支持配置背景色和图标
|
||||
- [ ] 定时同步任务频次不要太高, 预防产生过多的数据
|
||||
- [ ] 增加首页驾驶舱功能
|
||||
- [ ] 商户应用应该要有一个类似删除的功能, 实现停用冻结, 但不影响数据的关联
|
||||
## 3.0.0.bate3: 功能完善
|
||||
- 优化:
|
||||
- [x] 分账界面功能
|
||||
- [ ] 商户应用要有类似删除的功能, 实现停用冻结, 但不影响数据的关联
|
||||
- [ ] 同步接口优化, 返回同步完的数据
|
||||
## 3.0.0.bate3: 分账
|
||||
- [x] SDK接口
|
||||
- [x] 分账相关接口: 分账,完结,同步,查询
|
||||
- [x] 分账界面功能优化
|
||||
- [x] 分账接收方配置
|
||||
- [x] 分账单管理
|
||||
- [x] 接口开发 开启/完结/同步
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-cache</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-config</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-exception-handler</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-header-holder</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-jackson</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-log</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-mybatis-plus</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-redis</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-spring</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-common</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>common-swagger</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
<modules>
|
||||
<module>service-baseapi</module>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-service</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>service-baseapi</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-service</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>service-iam</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
<modules>
|
||||
<module>starter-auth</module>
|
||||
@@ -25,7 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-core</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</dependency>
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-starter</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>starter-audit-log</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-starter</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>starter-auth</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-starter</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>starter-delay-queue</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-starter</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>starter-file</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform-starter</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>starter-quartz</artifactId>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<artifactId>bootx-platform</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>基础脚手架服务</description>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<bootx-platform.version>3.0.0.beta2</bootx-platform.version>
|
||||
<bootx-platform.version>3.0.0.beta3</bootx-platform.version>
|
||||
<!-- 再高的的新版本与会knife4j 4.5冲突 -->
|
||||
<springdoc.version>2.5.0</springdoc.version>
|
||||
<hutool.version>5.8.31</hutool.version>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-channel</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-alipay</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-channel</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-union</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-channel</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-wechat</artifactId>
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*
|
||||
* 微信回调通知控制器
|
||||
* @author xxm
|
||||
* @since 2024/7/29
|
||||
*/
|
||||
@@ -44,7 +44,6 @@ public class WechatPayCallbackController {
|
||||
return payCallbackService.payHandle(request);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "微信退款回调")
|
||||
@PostMapping("/refund")
|
||||
public String wechatRefundNotify(@PathVariable("AppId") String appId,HttpServletRequest request) {
|
||||
|
||||
@@ -1,644 +0,0 @@
|
||||
package org.dromara.daxpay.channel.wechat.result.pay;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信V3付款码返回结果
|
||||
* @author xxm
|
||||
* @since 2024/7/24
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class WxPayCodepayResult implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:应用ID
|
||||
* 变量名:appid
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 由微信生成的应用ID,全局唯一。请求统一下单接口时请注意APPID的应用属性,例如公众号场景下,需使用应用属性为公众号的APPID
|
||||
* 示例值:wxd678efh567hg6787
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "appid")
|
||||
protected String appid;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:直连商户号
|
||||
* 变量名:mchid
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 直连商户的商户号,由微信支付生成并下发。
|
||||
* 示例值:1230000109
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "mchid")
|
||||
protected String mchid;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户订单号
|
||||
* 变量名:out_trade_no
|
||||
* 是否必填:是
|
||||
* 类型:string[6,32]
|
||||
* 描述:
|
||||
* 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
|
||||
* 示例值:1217752501201407033233368018
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "out_trade_no")
|
||||
protected String outTradeNo;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:微信支付返回的订单号
|
||||
* 变量名:transaction_id
|
||||
* 是否必填:是
|
||||
* 类型:string(32)
|
||||
* 描述:
|
||||
* 微信分配的公众账号ID
|
||||
* 示例值:1000320306201511078440737890
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "transaction_id")
|
||||
private String transactionId;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:交易类型
|
||||
* 变量名:trade_type
|
||||
* 是否必填:是
|
||||
* 类型:string[1,16]
|
||||
* 描述:
|
||||
* 枚举值:
|
||||
* NATIVE:扫码支付
|
||||
* JSAPI:公众号支付
|
||||
* APP:APP支付
|
||||
* MWEB:H5支付
|
||||
* 示例值: JSAPI
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "trade_type")
|
||||
private String tradeType;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:付款银行
|
||||
* 变量名:bank_type
|
||||
* 是否必填:否
|
||||
* 类型:string(16)
|
||||
* 描述:
|
||||
* 银行类型,采用字符串类型的银行标识。
|
||||
* 示例值:CMC
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "bank_type")
|
||||
private String bankType;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:支付完成时间
|
||||
* 变量名:success_time
|
||||
* 是否必填:否
|
||||
* 类型:string(64)
|
||||
* 描述:支付完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
|
||||
* 示例值:2018-06-08T10:34:56+08:00
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "success_time")
|
||||
private String successTime;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:交易状态
|
||||
* 变量名:trade_state
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 交易状态,枚举值:
|
||||
* SUCCESS:支付成功
|
||||
* REFUND:转入退款
|
||||
* NOTPAY:未支付
|
||||
* REVOKED:已撤销(付款码支付)
|
||||
* USERPAYING:用户支付中(付款码支付)
|
||||
* PAYERROR:支付失败(其他原因,如银行返回失败)
|
||||
* 示例值:SUCCESS
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "trade_state")
|
||||
private String tradeState;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:交易状态描述
|
||||
* 变量名:trade_state_desc
|
||||
* 是否必填:是
|
||||
* 类型:string(256)
|
||||
* 描述:交易状态描述
|
||||
* 示例值:支付失败,请重新下单支付
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "trade_state_desc")
|
||||
private String tradeStateDesc;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:附加数据
|
||||
* 变量名:attach
|
||||
* 是否必填:否
|
||||
* 类型:string[1,128]
|
||||
* 描述:
|
||||
* 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
|
||||
* 示例值:自定义数据
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "attach")
|
||||
protected String attach;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:订单优惠标记
|
||||
* 变量名:goods_tag
|
||||
* 是否必填:否
|
||||
* 类型:string[1,256]
|
||||
* 描述:
|
||||
* 订单优惠标记
|
||||
* 示例值:WXG
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "goods_tag")
|
||||
private String goodsTag;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:电子发票入口开放标识
|
||||
* 变量名:support_fapiao
|
||||
* 是否必填:否
|
||||
* 类型:boolean
|
||||
* 描述:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "support_fapiao")
|
||||
private Boolean supportFapiao;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:支付者
|
||||
* 变量名:payer
|
||||
* 是否必填:是
|
||||
* 类型:object
|
||||
* 描述:
|
||||
* 支付者信息
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "payer")
|
||||
private Payer payer;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:订单金额
|
||||
* 变量名:amount
|
||||
* 是否必填:是
|
||||
* 类型:object
|
||||
* 描述:
|
||||
* 订单金额信息
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "amount")
|
||||
private Amount amount;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:场景信息
|
||||
* 变量名:scene_info
|
||||
* 是否必填:否
|
||||
* 类型:object
|
||||
* 描述:
|
||||
* 支付场景描述
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "scene_info")
|
||||
private SceneInfo sceneInfo;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠功能
|
||||
* 变量名:promotion_detail
|
||||
* 是否必填:否
|
||||
* 类型:array
|
||||
* 描述:
|
||||
* 优惠功能,享受优惠时返回该字段。
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "promotion_detail")
|
||||
private List<PromotionDetail> promotionDetails;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class Amount implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:总金额
|
||||
* 变量名:total
|
||||
* 是否必填:否
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 订单总金额,单位为分。
|
||||
* 示例值:100
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "total")
|
||||
private Integer total;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:用户支付金额
|
||||
* 变量名:payer_total
|
||||
* 是否必填:否
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 用户支付金额,单位为分。
|
||||
* 示例值:100
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "payer_total")
|
||||
private Integer payerTotal;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:货币类型
|
||||
* 变量名:currency
|
||||
* 是否必填:否
|
||||
* 类型:string[1,16]
|
||||
* 描述:
|
||||
* CNY:人民币,境内商户号仅支持人民币。
|
||||
* 示例值:CNY
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "currency")
|
||||
private String currency;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:用户支付币种
|
||||
* 变量名:payer_currency
|
||||
* 是否必填:否
|
||||
* 类型:string[1,16]
|
||||
* 描述:
|
||||
* 用户支付币种
|
||||
* 示例值: CNY
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "payer_currency")
|
||||
private String payerCurrency;
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class Payer implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:用户标识
|
||||
* 变量名:auth_code
|
||||
* 是否必填:是
|
||||
* 类型:string[32]
|
||||
* 描述:
|
||||
* 付款码支付授权码,即用户打开微信钱包显示的码。
|
||||
* 示例值:130061098828009406
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "auth_code")
|
||||
private String authCode;
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class SceneInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户端设备 IP
|
||||
* 变量名:device_ip
|
||||
* 是否必填:是
|
||||
* 类型:string[1,45]
|
||||
* 描述:
|
||||
* 用户的客户端IP,支持IPv4和IPv6两种格式的IP地址。
|
||||
* 示例值:14.23.150.211
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "device_ip")
|
||||
private String deviceIp;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户端设备号
|
||||
* 变量名:device_id
|
||||
* 是否必填:否
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 商户端设备号(门店号或收银设备ID)。
|
||||
* 示例值:013467007045764
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "device_id")
|
||||
private String deviceId;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户门店信息
|
||||
* 变量名:store_info
|
||||
* 是否必填:否
|
||||
* 类型:object
|
||||
* 描述:
|
||||
* 商户门店信息
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "store_info")
|
||||
private StoreInfo storeInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户门店信息
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class StoreInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:门店编号
|
||||
* 变量名:id
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 此参数与商家自定义编码(out_id)二选一必填。
|
||||
* 微信支付线下场所ID,格式为纯数字。
|
||||
* 基于合规要求与风险管理目的,线下条码支付时需传入用户实际付款的场景信息。
|
||||
* 指引参见:https://kf.qq.com/faq/230817neeaem2308177ZFfqM.html。
|
||||
* 示例值:0001
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "id")
|
||||
private String id;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商家自定义编码
|
||||
* 变量名:out_id
|
||||
* 是否必填:否
|
||||
* 类型:string[1,256]
|
||||
* 描述:
|
||||
* 此参数与门店(id)二选一必填。
|
||||
* 商户系统的门店编码,支持大小写英文字母、数字,仅支持utf-8格式。
|
||||
* 基于合规要求与风险管理目的,线下条码支付时需传入用户实际付款的场景信息。
|
||||
* 示例值:A1111
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "out_id")
|
||||
private String outId;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class SettleInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:是否指定分账
|
||||
* 变量名:profit_sharing
|
||||
* 是否必填:否
|
||||
* 类型:boolean
|
||||
* 描述:
|
||||
* 是否指定分账
|
||||
* 示例值:false
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "profit_sharing")
|
||||
private Boolean profitSharing;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class PromotionDetail implements Serializable {
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:券ID
|
||||
* 变量名:coupon_id
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 券ID
|
||||
* 示例值:109519
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "coupon_id")
|
||||
private String couponId;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠名称
|
||||
* 变量名:name
|
||||
* 是否必填:否
|
||||
* 类型:string[1,64]
|
||||
* 描述:
|
||||
* 优惠名称
|
||||
* 示例值:单品惠-6
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "name")
|
||||
private String name;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠范围
|
||||
* 变量名:scope
|
||||
* 是否必填:否
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* GLOBAL:全场代金券
|
||||
* SINGLE:单品优惠
|
||||
* 示例值:GLOBAL
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "scope")
|
||||
private String scope;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠类型
|
||||
* 变量名:type
|
||||
* 是否必填:否
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* CASH:充值
|
||||
* NOCASH:预充值
|
||||
* 示例值:CASH
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "type")
|
||||
private String type;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠券面额
|
||||
* 变量名:amount
|
||||
* 是否必填:是
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 优惠券面额
|
||||
* 示例值:100
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "amount")
|
||||
private Integer amount;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:活动ID
|
||||
* 变量名:stock_id
|
||||
* 是否必填:否
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 活动ID
|
||||
* 示例值:931386
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "stock_id")
|
||||
private String stockId;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:微信出资
|
||||
* 变量名:wechatpay_contribute
|
||||
* 是否必填:否
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 微信出资,单位为分
|
||||
* 示例值:0
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "wechatpay_contribute")
|
||||
private Integer wechatpayContribute;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户出资
|
||||
* 变量名:merchant_contribute
|
||||
* 是否必填:否
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 商户出资,单位为分
|
||||
* 示例值:0
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "merchant_contribute")
|
||||
private Integer merchantContribute;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:其他出资
|
||||
* 变量名:other_contribute
|
||||
* 是否必填:否
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 其他出资,单位为分
|
||||
* 示例值:0
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "other_contribute")
|
||||
private Integer otherContribute;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:优惠币种
|
||||
* 变量名:currency
|
||||
* 是否必填:否
|
||||
* 类型:string[1,16]
|
||||
* 描述:
|
||||
* CNY:人民币,境内商户号仅支持人民币。
|
||||
* 示例值:CNY
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "currency")
|
||||
private String currency;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:单品列表
|
||||
* 变量名:goods_detail
|
||||
* 是否必填:否
|
||||
* 类型:array
|
||||
* 描述:
|
||||
* 单品列表信息
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "goods_detail")
|
||||
private List<GoodsDetail> goodsDetails;
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class GoodsDetail implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商品编码
|
||||
* 变量名:goods_id
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 商品编码
|
||||
* 示例值:M1006
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商品数量
|
||||
* 变量名:quantity
|
||||
* 是否必填:是
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 用户购买的数量
|
||||
* 示例值:1
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "quantity")
|
||||
private Integer quantity;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商品单价
|
||||
* 变量名:unit_price
|
||||
* 是否必填:是
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 商品单价,单位为分
|
||||
* 示例值:100
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "unit_price")
|
||||
private Integer unitPrice;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商品优惠金额
|
||||
* 变量名:discount_amount
|
||||
* 是否必填:是
|
||||
* 类型:int
|
||||
* 描述:
|
||||
* 商品优惠金额
|
||||
* 示例值:0
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "discount_amount")
|
||||
private Integer discountAmount;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商品备注
|
||||
* 变量名:goods_remark
|
||||
* 是否必填:否
|
||||
* 类型:string[1,128]
|
||||
* 描述:
|
||||
* 商品备注信息
|
||||
* 示例值:商品备注信息
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "goods_remark")
|
||||
private String goodsRemark;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
package org.dromara.daxpay.channel.wechat.result.pay;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 微信V3撤销支付订单返回结果
|
||||
* @author xxm
|
||||
* @since 2024/7/24
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class WxPayOrderReverseV3Result {
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:应用ID
|
||||
* 变量名:appid
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 由微信生成的应用ID,全局唯一。请求统一下单接口时请注意APPID的应用属性,例如公众号场景下,需使用应用属性为公众号的APPID
|
||||
* 示例值:wxd678efh567hg6787
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "appid")
|
||||
protected String appid;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:直连商户号
|
||||
* 变量名:mchid
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 直连商户的商户号,由微信支付生成并下发。
|
||||
* 示例值:1230000109
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "mchid")
|
||||
protected String mchid;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户订单号
|
||||
* 变量名:out_trade_no
|
||||
* 是否必填:是
|
||||
* 类型:string[6,32]
|
||||
* 描述:
|
||||
* 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
|
||||
* 示例值:1217752501201407033233368018
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "out_trade_no")
|
||||
protected String outTradeNo;
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-channel</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>单商户支付通道功能实现</description>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<autopoi.version>1.4.8</autopoi.version>
|
||||
<easypoi.version>4.5.0</easypoi.version>
|
||||
|
||||
<bootx-platform.version>3.0.0.beta2</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta2</daxpay.version>
|
||||
<bootx-platform.version>3.0.0.beta3</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta3</daxpay.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -67,7 +67,7 @@
|
||||
<dependency>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-service</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-sdk</artifactId>
|
||||
<version>3.0.0.beta1</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<!-- 项目信息 -->
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.dromara.daxpay.single.sdk.code;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 分账明细处理结果
|
||||
* 字典: alloc_detail_result
|
||||
* @author xxm
|
||||
* @since 2024/4/16
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AllocDetailResultEnum {
|
||||
|
||||
PENDING("pending", "待分账"),
|
||||
SUCCESS("success", "分账成功"),
|
||||
FAIL("fail", "分账失败"),
|
||||
/** 金额为0时不进行分账 */
|
||||
IGNORE("ignore", "忽略分账"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.dromara.daxpay.single.sdk.code;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 分账订单处理结果
|
||||
* 字典: allocation_result
|
||||
* @author xxm
|
||||
* @since 2024/4/16
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AllocationResultEnum {
|
||||
|
||||
ALL_PENDING("all_pending", "处理中"),
|
||||
ALL_SUCCESS("all_success", "全部成功"),
|
||||
PART_SUCCESS("part_success", "部分成功"),
|
||||
ALL_FAILED("all_failed", "全部失败"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.dromara.daxpay.single.sdk.code;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 分账状态枚举
|
||||
* 字典 allocation_status
|
||||
* @author xxm
|
||||
* @since 2024/4/7
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AllocationStatusEnum {
|
||||
|
||||
PROCESSING("processing", "分账处理中"),
|
||||
ALLOC_END("alloc_end", "分账处理完成"),
|
||||
ALLOC_FAILED("alloc_failed", "分账失败"),
|
||||
FINISH("finish", "分账完结"),
|
||||
FINISH_FAILED("finish_failed", "完结失败"),
|
||||
IGNORE("ignore", "忽略"),
|
||||
;
|
||||
|
||||
final String code;
|
||||
final String name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocDetailResultEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocReceiverTypeEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 分账订单明细
|
||||
* @author xxm
|
||||
* @since 2024/5/21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocDetailModel {
|
||||
|
||||
@Schema(description = "分账接收方编号")
|
||||
private String receiverNo;
|
||||
|
||||
/** 分账金额 */
|
||||
@Schema(description = "分账金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 分账比例 */
|
||||
@Schema(description = "分账比例(百分之多少)")
|
||||
private BigDecimal rate;
|
||||
|
||||
/**
|
||||
* 分账接收方类型
|
||||
* @see AllocReceiverTypeEnum
|
||||
*/
|
||||
@Schema(description = "分账接收方类型")
|
||||
private String receiverType;
|
||||
|
||||
/** 接收方账号 */
|
||||
@Schema(description = "接收方账号")
|
||||
private String receiverAccount;
|
||||
|
||||
/** 接收方姓名 */
|
||||
@Schema(description = "接收方姓名")
|
||||
private String receiverName;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @see AllocDetailResultEnum
|
||||
*/
|
||||
@Schema(description = "分账结果")
|
||||
private String result;
|
||||
|
||||
/** 错误代码 */
|
||||
@Schema(description = "错误代码")
|
||||
private String errorCode;
|
||||
|
||||
/** 错误原因 */
|
||||
@Schema(description = "错误原因")
|
||||
private String errorMsg;
|
||||
|
||||
/** 分账完成时间 */
|
||||
@Schema(description = "分账完成时间")
|
||||
private LocalDateTime finishTime;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationResultEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationStatusEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账订单
|
||||
* @author xxm
|
||||
* @since 2024/5/21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocOrderModel {
|
||||
|
||||
/** 分账单号 */
|
||||
private String allocNo;
|
||||
|
||||
/** 商户分账单号 */
|
||||
private String bizAllocNo;
|
||||
|
||||
/** 通道分账号 */
|
||||
private String outAllocNo;
|
||||
|
||||
/** 支付订单号 */
|
||||
private String orderNo;
|
||||
|
||||
/** 商户支付订单号 */
|
||||
private String bizOrderNo;
|
||||
|
||||
/** 通道支付订单号 */
|
||||
private String outOrderNo;
|
||||
|
||||
/** 分账标题 */
|
||||
private String title;
|
||||
|
||||
/** 所属通道 */
|
||||
private String channel;
|
||||
|
||||
/**
|
||||
* 总分账金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 分账描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
* @see AllocationStatusEnum
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 处理结果
|
||||
* @see AllocationResultEnum
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private String errorCode;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errorMsg;
|
||||
|
||||
/** 分账订单完成时间 */
|
||||
private LocalDateTime finishTime;
|
||||
|
||||
/** 分账明细 */
|
||||
private List<AllocDetailModel> details;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationResultEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationStatusEnum;
|
||||
|
||||
/**
|
||||
* 分账同步结果返回类
|
||||
* @author xxm
|
||||
* @since 2024/5/20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocSyncModel {
|
||||
|
||||
/**
|
||||
* 分账状态
|
||||
* @see AllocationStatusEnum
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @see AllocationResultEnum
|
||||
*/
|
||||
private String result;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationResultEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocationStatusEnum;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @author xxm
|
||||
* @since 2024/12/18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocationModel {
|
||||
|
||||
/** 分账订单号 */
|
||||
private String allocNo;
|
||||
|
||||
/** 商户分账订单号 */
|
||||
private String bizAllocNo;
|
||||
|
||||
/**
|
||||
* 分账状态
|
||||
* @see AllocationStatusEnum
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @see AllocationResultEnum
|
||||
*/
|
||||
private String result;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
package org.dromara.daxpay.single.sdk.model.allocation.receiver;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
package org.dromara.daxpay.single.sdk.model.allocation.receiver;
|
||||
|
||||
import org.dromara.daxpay.single.sdk.code.AllocReceiverTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocRelationTypeEnum;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.dromara.daxpay.single.sdk.model.allocation;
|
||||
package org.dromara.daxpay.single.sdk.model.allocation.receiver;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocationModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
|
||||
/**
|
||||
* 分账完结参数
|
||||
* @author xxm
|
||||
* @since 2024/12/18
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocFinishParam extends DaxPayRequest<AllocationModel> {
|
||||
|
||||
|
||||
@Schema(description = "商户分账单号")
|
||||
private String bizAllocNo;
|
||||
|
||||
@Schema(description = "分账单号")
|
||||
private String allocNo;
|
||||
|
||||
/**
|
||||
* 方法请求路径
|
||||
*
|
||||
* @return 请求路径
|
||||
*/
|
||||
@Override
|
||||
public String path() {
|
||||
return "/unipay/alloc/finish";
|
||||
}
|
||||
|
||||
/**
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*
|
||||
* @param json json字符串
|
||||
* @return 反序列后的对象
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<AllocationModel> toModel(String json) {
|
||||
return JsonUtil.toBean(json, new TypeReference<DaxPayResult<AllocationModel>>() {});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocSyncModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
|
||||
/**
|
||||
* 分账同步请求参数
|
||||
* @author xxm
|
||||
* @since 2024/4/12
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(title = "分账同步请求参数")
|
||||
public class AllocSyncParam extends DaxPayRequest<AllocSyncModel> {
|
||||
|
||||
@Schema(description = "分账号")
|
||||
@Size(max = 32, message = "分账号不可超过32位")
|
||||
private String allocNo;
|
||||
|
||||
@Schema(description = "商户分账号")
|
||||
@Size(max = 100, message = "商户分账号不可超过100位")
|
||||
private String bizAllocNo;
|
||||
|
||||
/**
|
||||
* 方法请求路径
|
||||
*
|
||||
* @return 请求路径
|
||||
*/
|
||||
@Override
|
||||
public String path() {
|
||||
return "/unipay/alloc/sync";
|
||||
}
|
||||
|
||||
/**
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*
|
||||
* @param json json字符串
|
||||
* @return 反序列后的对象
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<AllocSyncModel> toModel(String json) {
|
||||
return JsonUtil.toBean(json, new TypeReference<DaxPayResult<AllocSyncModel>>() {});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocationModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账参数
|
||||
* @author xxm
|
||||
* @since 2024/12/18
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AllocationParam extends DaxPayRequest<AllocationModel> {
|
||||
|
||||
/** 商户分账单号 */
|
||||
private String bizAllocNo;
|
||||
|
||||
/** 支付订单号 */
|
||||
private String orderNo;
|
||||
|
||||
/** 商户支付订单号 */
|
||||
private String bizOrderNo;
|
||||
|
||||
/** 分账标题 */
|
||||
private String title;
|
||||
|
||||
/** 分账描述 */
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 优先级 分账接收方列表 > 分账组编号 > 默认分账组
|
||||
*/
|
||||
private String groupNo;
|
||||
|
||||
/** 分账接收方列表 */
|
||||
private List<ReceiverParam> receivers;
|
||||
|
||||
/** 回调通知地址 */
|
||||
private String notifyUrl;
|
||||
|
||||
/** 商户扩展参数,回调时会原样返回 */
|
||||
private String attach;
|
||||
|
||||
|
||||
/**
|
||||
* 分账接收方列表
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class ReceiverParam {
|
||||
|
||||
/** 分账接收方编号 */
|
||||
private String receiverNo;
|
||||
|
||||
/** 分账金额 */
|
||||
private BigDecimal amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法请求路径
|
||||
*
|
||||
* @return 请求路径
|
||||
*/
|
||||
@Override
|
||||
public String path() {
|
||||
return "/unipay/alloc/start";
|
||||
}
|
||||
|
||||
/**
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*
|
||||
* @param json json字符串
|
||||
* @return 反序列后的对象
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<AllocationModel> toModel(String json) {
|
||||
return JsonUtil.toBean(json, new TypeReference<DaxPayResult<AllocationModel>>() {});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocOrderModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
|
||||
/**
|
||||
* 分账订单查询参数
|
||||
* @author xxm
|
||||
* @since 2024/4/7
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(title = "支付订单查询参数")
|
||||
public class QueryAllocOrderParam extends DaxPayRequest<AllocOrderModel> {
|
||||
|
||||
@Schema(description = "分账单号")
|
||||
private String allocNo;
|
||||
|
||||
@Schema(description = "商户分账单号")
|
||||
private String bizAllocNo;
|
||||
|
||||
/**
|
||||
* 方法请求路径
|
||||
*
|
||||
* @return 请求路径
|
||||
*/
|
||||
@Override
|
||||
public String path() {
|
||||
return "/unipay/alloc/query";
|
||||
}
|
||||
|
||||
/**
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*
|
||||
* @param json json字符串
|
||||
* @return 反序列后的对象
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<AllocOrderModel> toModel(String json) {
|
||||
return JsonUtil.toBean(json, new TypeReference<DaxPayResult<AllocOrderModel>>() {});
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
package org.dromara.daxpay.single.sdk.param.allocation.receiver;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import lombok.Data;
|
||||
@@ -7,7 +7,7 @@ import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocReceiverTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocRelationTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.ChannelEnum;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverAddModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverAddModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
package org.dromara.daxpay.single.sdk.param.allocation.receiver;
|
||||
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverRemoveModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverRemoveModel;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import lombok.Data;
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.dromara.daxpay.single.sdk.param.allocation;
|
||||
package org.dromara.daxpay.single.sdk.param.allocation.receiver;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
@@ -4,14 +4,14 @@ import org.dromara.daxpay.single.sdk.code.AllocReceiverTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.AllocRelationTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.ChannelEnum;
|
||||
import org.dromara.daxpay.single.sdk.code.SignTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverAddModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.AllocReceiverRemoveModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverAddModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverModel;
|
||||
import org.dromara.daxpay.single.sdk.model.allocation.receiver.AllocReceiverRemoveModel;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayConfig;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayKit;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.AllocReceiverAddParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.AllocReceiverRemoveParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.QueryAllocReceiverParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.receiver.AllocReceiverAddParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.receiver.AllocReceiverRemoveParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.receiver.QueryAllocReceiverParam;
|
||||
import org.dromara.daxpay.single.sdk.response.DaxPayResult;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
import org.dromara.daxpay.single.sdk.util.PaySignUtil;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.dromara.daxpay.single.sdk.test.allocation;
|
||||
|
||||
import lombok.var;
|
||||
import org.dromara.daxpay.single.sdk.code.SignTypeEnum;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayConfig;
|
||||
import org.dromara.daxpay.single.sdk.net.DaxPayKit;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.AllocFinishParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.AllocSyncParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.AllocationParam;
|
||||
import org.dromara.daxpay.single.sdk.param.allocation.QueryAllocOrderParam;
|
||||
import org.dromara.daxpay.single.sdk.util.JsonUtil;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* 分账测试类
|
||||
* @author xxm
|
||||
* @since 2024/12/18
|
||||
*/
|
||||
public class AllocationTest {
|
||||
@Before
|
||||
public void init() {
|
||||
// 初始化支付配置
|
||||
DaxPayConfig config = DaxPayConfig.builder()
|
||||
.serviceUrl("http://127.0.0.1:9999")
|
||||
.signSecret("123456")
|
||||
.appId("M8207639754663343")
|
||||
.signType(SignTypeEnum.HMAC_SHA256)
|
||||
.build();
|
||||
DaxPayKit.initConfig(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账发起接口
|
||||
*/
|
||||
@Test
|
||||
public void start() {
|
||||
// 请求参数
|
||||
AllocationParam param = new AllocationParam();
|
||||
param.setBizAllocNo("SDK_"+ System.currentTimeMillis());
|
||||
param.setOrderNo("123");
|
||||
var execute = DaxPayKit.execute(param);
|
||||
System.out.println(JsonUtil.toJsonStr(execute));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账完结接口
|
||||
*/
|
||||
@Test
|
||||
public void finish() {
|
||||
// 请求参数
|
||||
var param = new AllocFinishParam();
|
||||
param.setAllocNo("DEVA2024121721431860000035");
|
||||
var execute = DaxPayKit.execute(param);
|
||||
System.out.println(JsonUtil.toJsonStr(execute));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账查询接口
|
||||
*/
|
||||
@Test
|
||||
public void query() {
|
||||
// 请求参数
|
||||
var param = new QueryAllocOrderParam();
|
||||
param.setAllocNo("DEVA2024121721431860000035");
|
||||
var execute = DaxPayKit.execute(param);
|
||||
System.out.println(JsonUtil.toJsonStr(execute));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账同步接口
|
||||
*/
|
||||
@Test
|
||||
public void sync() {
|
||||
// 请求参数
|
||||
var param = new AllocSyncParam();
|
||||
param.setAllocNo("DEVA2024121721431860000035");
|
||||
var execute = DaxPayKit.execute(param);
|
||||
System.out.println(JsonUtil.toJsonStr(execute));
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,6 @@ public class PayOrderSyncTest {
|
||||
param.setBizOrderNo("SDK_1715341621498");
|
||||
DaxPayResult<PaySyncModel> execute = DaxPayKit.execute(param);
|
||||
System.out.println(JsonUtil.toJsonStr(execute));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
<description>daxpay服务端</description>
|
||||
|
||||
<properties>
|
||||
@@ -29,8 +29,8 @@
|
||||
<easypoi.version>4.5.0</easypoi.version>
|
||||
<minio.version>8.5.2</minio.version>
|
||||
|
||||
<bootx-platform.version>3.0.0.beta2</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta2</daxpay.version>
|
||||
<bootx-platform.version>3.0.0.beta3</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta3</daxpay.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-core</artifactId>
|
||||
|
||||
@@ -40,6 +40,11 @@ public class AllocationParam extends PaymentCommonParam {
|
||||
@Schema(description = "商户支付订单号")
|
||||
private String bizOrderNo;
|
||||
|
||||
/** 分账标题 */
|
||||
@Size(max = 100, message = "分账描述不可超过100位")
|
||||
@Schema(description = "分账标题")
|
||||
private String title;
|
||||
|
||||
/** 分账描述 */
|
||||
@Size(max = 150, message = "分账描述不可超过150位")
|
||||
@Schema(description = "分账描述")
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.dromara.daxpay.core.result.allocation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.core.enums.AllocationResultEnum;
|
||||
import org.dromara.daxpay.core.enums.AllocationStatusEnum;
|
||||
|
||||
/**
|
||||
* 分账同步接口返回类
|
||||
@@ -13,4 +15,18 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "分账同步接口")
|
||||
public class AllocSyncResult {
|
||||
|
||||
/**
|
||||
* 分账状态
|
||||
* @see AllocationStatusEnum
|
||||
*/
|
||||
@Schema(description = "分账状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @see AllocationResultEnum
|
||||
*/
|
||||
@Schema(description = "分账结果")
|
||||
private String result;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.dromara.daxpay.core.result.allocation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.daxpay.core.enums.AllocationResultEnum;
|
||||
import org.dromara.daxpay.core.enums.AllocationStatusEnum;
|
||||
|
||||
/**
|
||||
@@ -28,4 +29,11 @@ public class AllocationResult {
|
||||
*/
|
||||
@Schema(description = "分账状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 分账结果
|
||||
* @see AllocationResultEnum
|
||||
*/
|
||||
@Schema(description = "分账结果")
|
||||
private String result;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.dromara.daxpay.core.enums.AllocationResultEnum;
|
||||
import org.dromara.daxpay.core.enums.AllocationStatusEnum;
|
||||
import org.dromara.daxpay.core.enums.ChannelEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@@ -63,7 +64,7 @@ public class AllocOrderResult {
|
||||
* 总分账金额
|
||||
*/
|
||||
@Schema(description = "总分账金额")
|
||||
private Integer amount;
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 分账描述
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-service</artifactId>
|
||||
|
||||
@@ -110,7 +110,8 @@ public class AllocationService {
|
||||
return new AllocationResult()
|
||||
.setAllocNo(order.getAllocNo())
|
||||
.setBizAllocNo(order.getBizAllocNo())
|
||||
.setStatus(order.getStatus());
|
||||
.setStatus(order.getStatus())
|
||||
.setResult(order.getResult());
|
||||
}
|
||||
// 创建分账策略并初始化
|
||||
var allocationStrategy = PaymentStrategyFactory.create(payOrder.getChannel(),AbsAllocationStrategy.class);
|
||||
@@ -137,7 +138,8 @@ public class AllocationService {
|
||||
return new AllocationResult()
|
||||
.setAllocNo(order.getAllocNo())
|
||||
.setBizAllocNo(order.getBizAllocNo())
|
||||
.setStatus(order.getStatus());
|
||||
.setStatus(order.getStatus())
|
||||
.setResult(order.getResult());
|
||||
} finally {
|
||||
lockTemplate.releaseLock(lock);
|
||||
}
|
||||
@@ -214,7 +216,8 @@ public class AllocationService {
|
||||
return new AllocationResult()
|
||||
.setAllocNo(order.getAllocNo())
|
||||
.setBizAllocNo(order.getBizAllocNo())
|
||||
.setStatus(order.getStatus());
|
||||
.setStatus(order.getStatus())
|
||||
.setResult(order.getResult());
|
||||
} finally {
|
||||
lockTemplate.releaseLock(lock);
|
||||
}
|
||||
@@ -296,7 +299,8 @@ public class AllocationService {
|
||||
return new AllocationResult()
|
||||
.setAllocNo(allocOrder.getAllocNo())
|
||||
.setBizAllocNo(allocOrder.getBizAllocNo())
|
||||
.setStatus(allocOrder.getStatus());
|
||||
.setStatus(allocOrder.getStatus())
|
||||
.setResult(allocOrder.getResult());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class AllocationSyncService {
|
||||
|
||||
// 调用同步逻辑
|
||||
this.sync(allocOrder);
|
||||
return new AllocSyncResult();
|
||||
return new AllocSyncResult().setResult(allocOrder.getResult()).setStatus(allocOrder.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.bootx.platform.core.exception.ValidationFailedException;
|
||||
import cn.bootx.platform.core.util.BigDecimalUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.daxpay.core.enums.AllocDetailResultEnum;
|
||||
@@ -163,10 +164,10 @@ public class AllocOrderService {
|
||||
.setOrderNo(payOrder.getOrderNo())
|
||||
.setBizOrderNo(payOrder.getBizOrderNo())
|
||||
.setOutOrderNo(payOrder.getOutOrderNo())
|
||||
.setTitle(payOrder.getTitle())
|
||||
.setAllocNo(TradeNoGenerateUtil.allocation())
|
||||
.setBizAllocNo(param.getBizAllocNo())
|
||||
.setChannel(payOrder.getChannel())
|
||||
.setTitle(param.getTitle())
|
||||
.setDescription(param.getDescription())
|
||||
.setStatus(AllocationStatusEnum.PROCESSING.getCode())
|
||||
.setResult(AllocationResultEnum.ALL_PENDING.getCode())
|
||||
@@ -174,6 +175,10 @@ public class AllocOrderService {
|
||||
.setNotifyUrl(param.getNotifyUrl())
|
||||
.setAttach(param.getAttach())
|
||||
.setClientIp(param.getClientIp());
|
||||
// 订单标题为空, 则使用支付订单标题
|
||||
if (StrUtil.isBlank(allocOrder.getTitle())){
|
||||
allocOrder.setTitle(payOrder.getTitle());
|
||||
}
|
||||
// 如果分账订单金额为0, 设置为忽略状态
|
||||
if (BigDecimalUtil.isEqual(sumAmount, BigDecimal.ZERO)) {
|
||||
allocOrder.setStatus(AllocationStatusEnum.IGNORE.getCode())
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-single-unisdk</artifactId>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single</artifactId>
|
||||
<version>3.0.0.beta2</version>
|
||||
<version>3.0.0.beta3</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>单商户支付核心功能实现</description>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<lombok-mapstruct.version>0.2.0</lombok-mapstruct.version>
|
||||
<minio.version>8.5.2</minio.version>
|
||||
|
||||
<bootx-platform.version>3.0.0.beta2</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta2</daxpay.version>
|
||||
<bootx-platform.version>3.0.0.beta3</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta3</daxpay.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
daxpay-single:
|
||||
image: daxpay/daxpay-single:3.0.0.beta2
|
||||
image: daxpay/daxpay-single:3.0.0.beta3
|
||||
restart: always
|
||||
# window上不支持host网络模式, 需要更改为 bridge 网络模式, 然后走端口映射
|
||||
network_mode: host
|
||||
|
||||
Reference in New Issue
Block a user