主财务单表增加 payment_id
This commit is contained in:
parent
f5fdb55476
commit
3e3a66b3f4
|
|
@ -59,13 +59,14 @@ public class AdapayService {
|
||||||
* @param paymentId [必填] String(64) Adapay生成的支付对象id
|
* @param paymentId [必填] String(64) Adapay生成的支付对象id
|
||||||
* @param orderNo [必填] String(64) 请求订单号,只能为英文、数字或者下划线的一种或多种组合,保证在app_id下唯一
|
* @param orderNo [必填] String(64) 请求订单号,只能为英文、数字或者下划线的一种或多种组合,保证在app_id下唯一
|
||||||
* @param confirmAmt [必填] String(14) 确认金额,必须大于0,保留两位小数点,如0.10、100.05等。必须小于等于原支付金额-已确认金额-已撤销金额
|
* @param confirmAmt [必填] String(14) 确认金额,必须大于0,保留两位小数点,如0.10、100.05等。必须小于等于原支付金额-已确认金额-已撤销金额
|
||||||
* @param description String(128) 附加说明
|
|
||||||
* @param feeMode String(1) 手续费收取模式:O-商户手续费账户扣取手续费,I-交易金额中扣取手续费;值为空时,默认值为I;若为O时,分账对象列表中不支持传入手续费承担方
|
|
||||||
* @param divMembers 分账对象信息列表,一次请求最多仅支持7个分账方。json对象 形式,详见 分账对象信息列表
|
* @param divMembers 分账对象信息列表,一次请求最多仅支持7个分账方。json对象 形式,详见 分账对象信息列表
|
||||||
|
* @param feeMode String(1) 手续费收取模式:O-商户手续费账户扣取手续费,I-交易金额中扣取手续费;值为空时,默认值为I;若为O时,分账对象列表中不支持传入手续费承担方
|
||||||
|
* @param description String(128) 附加说明
|
||||||
* @return 成功时同步返回一个包含 支付确认对象的JSON https://docs.adapay.tech/api/trade.html#id54
|
* @return 成功时同步返回一个包含 支付确认对象的JSON https://docs.adapay.tech/api/trade.html#id54
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> paymentConfirm(@NotNull Long deptId, @NotNull String paymentId, @NotNull String orderNo, @NotNull String confirmAmt,
|
public Map<String, Object> paymentConfirm(@NotNull Long deptId, @NotNull String paymentId, @NotNull String orderNo,
|
||||||
String description, String feeMode, List<DivMember> divMembers) throws BaseAdaPayException {
|
@NotNull String confirmAmt, List<DivMember> divMembers,
|
||||||
|
String feeMode, String description) throws BaseAdaPayException {
|
||||||
Map<String, Object> confirmParams = new HashMap<>();
|
Map<String, Object> confirmParams = new HashMap<>();
|
||||||
confirmParams.put("payment_id", paymentId);
|
confirmParams.put("payment_id", paymentId);
|
||||||
confirmParams.put("order_no", orderNo);
|
confirmParams.put("order_no", orderNo);
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,17 @@ public class DivMember {
|
||||||
this.feeFlag = feeFlag ? "Y" : "N";
|
this.feeFlag = feeFlag ? "Y" : "N";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 此构造方法不指定手续费承担方
|
||||||
|
* 由商户手续费账户扣取手续费
|
||||||
|
* 使用时请确保商户手续费账户余额充足
|
||||||
|
*
|
||||||
|
* @param memberId 分账用户 Member 对象的 id;若是商户本身时传入"0"
|
||||||
|
* @param amount 分账金额,精确到分,如 "0.50"、"1.00" 等 分账总金额必须等于主交易金额,金额不能为 "0.00"
|
||||||
|
*/
|
||||||
|
public DivMember(@NotNull String memberId, @NotNull String amount) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -51,11 +51,15 @@ public class FinancialMaster extends BaseEntity {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date payTime;
|
private Date payTime;
|
||||||
|
|
||||||
|
@Excel(name = "Adapay的唯一支付ID", cellType = Excel.ColumnType.STRING)
|
||||||
|
private String paymentId;
|
||||||
|
|
||||||
public FinancialMaster() {
|
public FinancialMaster() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FinancialMaster(String code, Long deptId, Long orderMasterId, String orderMasterCode, BigDecimal totalMoney, BigDecimal discountMoney, BigDecimal payMoney) {
|
public FinancialMaster(String code, Long deptId, Long orderMasterId, String orderMasterCode, BigDecimal totalMoney, BigDecimal discountMoney, BigDecimal payMoney) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
|
this.deptId = deptId;
|
||||||
this.orderMasterId = orderMasterId;
|
this.orderMasterId = orderMasterId;
|
||||||
this.orderMasterCode = orderMasterCode;
|
this.orderMasterCode = orderMasterCode;
|
||||||
this.totalMoney = totalMoney;
|
this.totalMoney = totalMoney;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
<result property="payType" column="pay_type"/>
|
<result property="payType" column="pay_type"/>
|
||||||
<result property="payStatus" column="pay_status"/>
|
<result property="payStatus" column="pay_status"/>
|
||||||
<result property="payTime" column="pay_time"/>
|
<result property="payTime" column="pay_time"/>
|
||||||
|
<result property="paymentId" column="payment_id"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
|
|
@ -25,7 +26,7 @@
|
||||||
|
|
||||||
<sql id="selectFinancialMaster">
|
<sql id="selectFinancialMaster">
|
||||||
SELECT id, dept_id, code, order_master_id, order_master_code, total_money, discount_money, pay_money,
|
SELECT id, dept_id, code, order_master_id, order_master_code, total_money, discount_money, pay_money,
|
||||||
pay_type, pay_status, pay_time, create_by, create_time, update_by, update_time, remark
|
pay_type, pay_status, pay_time, payment_id, create_by, create_time, update_by, update_time, remark
|
||||||
FROM financial_master
|
FROM financial_master
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -75,6 +76,7 @@
|
||||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||||
<if test="payMoney != null">pay_money = #{payMoney},</if>
|
<if test="payMoney != null">pay_money = #{payMoney},</if>
|
||||||
|
<if test="paymentId != null and paymentId != ''">payment_id = #{paymentId},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
update_time = SYSDATE()
|
update_time = SYSDATE()
|
||||||
</set>
|
</set>
|
||||||
|
|
@ -98,8 +100,6 @@
|
||||||
<if test="orderMasterCode != null and orderMasterCode != ''">order_master_code,</if>
|
<if test="orderMasterCode != null and orderMasterCode != ''">order_master_code,</if>
|
||||||
<if test="totalMoney != null">total_money,</if>
|
<if test="totalMoney != null">total_money,</if>
|
||||||
<if test="discountMoney != null">discount_money,</if>
|
<if test="discountMoney != null">discount_money,</if>
|
||||||
<if test="payType != null">pay_type,</if>
|
|
||||||
<if test="payStatus != null">pay_status,</if>
|
|
||||||
<if test="payMoney != null">pay_money,</if>
|
<if test="payMoney != null">pay_money,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
create_time
|
create_time
|
||||||
|
|
@ -110,8 +110,6 @@
|
||||||
<if test="orderMasterCode != null and orderMasterCode != ''">#{orderMasterCode},</if>
|
<if test="orderMasterCode != null and orderMasterCode != ''">#{orderMasterCode},</if>
|
||||||
<if test="totalMoney != null">#{totalMoney},</if>
|
<if test="totalMoney != null">#{totalMoney},</if>
|
||||||
<if test="discountMoney != null">#{discountMoney},</if>
|
<if test="discountMoney != null">#{discountMoney},</if>
|
||||||
<if test="payType != null">#{payType},</if>
|
|
||||||
<if test="payStatus != null">#{payStatus},</if>
|
|
||||||
<if test="payMoney != null">#{payMoney},</if>
|
<if test="payMoney != null">#{payMoney},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
SYSDATE()
|
SYSDATE()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue