Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.binarywang.wxpay.v3.SpecEncrypt;
import com.google.gson.annotations.SerializedName;

import lombok.*;

import java.io.Serializable;
Expand All @@ -17,6 +18,7 @@
@NoArgsConstructor
@AllArgsConstructor
public class ProfitSharingReceiverV3Request implements Serializable {

private static final long serialVersionUID = 1L;
/**
* <pre>
Expand Down Expand Up @@ -88,6 +90,26 @@ public class ProfitSharingReceiverV3Request implements Serializable {
@SpecEncrypt
private String name;

/**
* <pre>
* 字段名:分账金额
* 是否必填:是
* 描述:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额。调整最大分账比例:特约商户登录商户平台,进入以下页面:产品中心-授权的产品-分账授权
* </pre>
*/
@SerializedName("amount")
private Integer amount;

/**
* <pre>
* 字段名:分账描述
* 是否必填:是
* 描述:分账的原因描述,会在查询分账结果接口和分账账单中原样返回
* </pre>
*/
@SerializedName("description")
private String description;

/**
* <pre>
Comment on lines +93 to 114
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加的 amountdescription 字段可能不适用于分账接收方管理接口。

根据微信支付分账业务逻辑:

  • ProfitSharingReceiverV3Request 用于 /v3/profitsharing/receivers/add/v3/profitsharing/receivers/delete 接口,目的是管理分账接收方白名单(添加/删除哪些账户可以接收分账)
  • amount(分账金额)和 description(分账描述)应该属于实际执行分账操作时的参数,已经存在于 ProfitSharingV3Request.Receiver 类中(用于 /v3/profitsharing/orders 接口)

添加接收方时通常只需要指定接收方的身份信息(type、account、name、relation_type 等),而不需要指定具体的分账金额和描述。这些参数应该在每次实际分账请求时动态指定。

建议:

  1. 核实微信支付官方文档 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter8_1_8.shtml 是否真的要求在添加接收方时提供这些字段
  2. 如果文档未要求,应将这两个字段移除,保持 API 设计的准确性
Suggested change
/**
* <pre>
* 字段名分账金额
* 是否必填
* 描述分账金额单位为分只能为整数不能超过原订单支付金额及最大分账比例金额调整最大分账比例特约商户登录商户平台进入以下页面产品中心-授权的产品-分账授权
* </pre>
*/
@SerializedName("amount")
private Integer amount;
/**
* <pre>
* 字段名分账描述
* 是否必填
* 描述分账的原因描述会在查询分账结果接口和分账账单中原样返回
* </pre>
*/
@SerializedName("description")
private String description;
/**
* <pre>
/**
* <pre>

Copilot uses AI. Check for mistakes.
* 字段名:与分账方的关系类型
Expand Down