Skip to content

Commit

Permalink
face(微信支付): 新增商家转账到零钱接口服务
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjun96 committed Jun 17, 2022
1 parent 5ac2e69 commit db09605
Show file tree
Hide file tree
Showing 10 changed files with 608 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.github.binarywang.wxpay.bean.transfer;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 查询微信批次单号查询批次单API参数
*
* @author zhongjun
* @date 2022/6/17
**/
@Data
@Builder(builderMethodName = "newBuilder")
@NoArgsConstructor
@AllArgsConstructor
public class QueryTransferBatchesRequest implements Serializable {
private static final long serialVersionUID = -2175582517588397426L;

/**
* 微信批次单号
*/
private String batchId;

/**
* 是否查询转账明细单
*/
private Boolean needQueryDetail;

private Integer offset;

private Integer limit;

/**
* 明细状态
* 查询指定状态的转账明细单,当need_query_detail为true时,该字段必填
* ALL:全部。需要同时查询转账成功和转账失败的明细单
* SUCCESS:转账成功。只查询转账成功的明细单
* FAIL:转账失败。只查询转账失败的明细单
*/
private String detailStatus;

/**
* 商家批次单号
*/
private String outBatchNo;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package com.github.binarywang.wxpay.bean.transfer;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
* 查询微信批次单号查询批次单API响应
*
* @author zhongjun
* @date 2022/6/17
**/
@Data
@NoArgsConstructor
public class QueryTransferBatchesResult implements Serializable {
private static final long serialVersionUID = -2175582517588397426L;

@SerializedName("offset")
private Integer offset;

@SerializedName("limit")
private Integer limit;

@SerializedName("transfer_batch")
private TransferBatch transferBatch;

@SerializedName("transfer_detail_list")
private List<TransferDetail> transferDetailList;

@NoArgsConstructor
@Data
public static class TransferBatch {
@SerializedName("mchid")
private String mchid;

@SerializedName("out_batch_no")
private String outBatchNo;

@SerializedName("batch_id")
private String batchId;

@SerializedName("appid")
private String appid;

@SerializedName("batch_status")
private String batchStatus;

@SerializedName("batch_type")
private String batchType;

@SerializedName("batch_name")
private String batchName;

@SerializedName("batch_remark")
private String batchRemark;

@SerializedName("close_reason")
private String closeReason;

@SerializedName("total_amount")
private Integer totalAmount;

@SerializedName("total_num")
private Integer totalNum;

@SerializedName("create_time")
private String createTime;

@SerializedName("update_time")
private String updateTime;

@SerializedName("success_amount")
private Integer successAmount;

@SerializedName("success_num")
private Integer successNum;

@SerializedName("fail_amount")
private Integer failAmount;

@SerializedName("fail_num")
private Integer failNum;
}

@NoArgsConstructor
@Data
public static class TransferDetail {

@SerializedName("detail_id")
private String detailId;

@SerializedName("out_detail_no")
private String outDetailNo;

@SerializedName("detail_status")
private String detailStatus;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.github.binarywang.wxpay.bean.transfer;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 微信明细单号查询明细单API
*
* @author zhongjun
*/
@NoArgsConstructor
@Data
public class TransferBatchDetailResult implements Serializable {
private static final long serialVersionUID = -2175582517588397426L;

@SerializedName("mchid")
private String mchid;

@SerializedName("out_batch_no")
private String outBatchNo;

@SerializedName("batch_id")
private String batchId;

@SerializedName("appid")
private String appid;

@SerializedName("out_detail_no")
private String outDetailNo;

@SerializedName("detail_id")
private String detailId;

@SerializedName("detail_status")
private String detailStatus;

@SerializedName("transfer_amount")
private Integer transferAmount;

@SerializedName("transfer_remark")
private String transferRemark;

@SerializedName("fail_reason")
private String failReason;

@SerializedName("openid")
private String openid;

@SerializedName("user_name")
private String userName;

@SerializedName("initiate_time")
private String initiateTime;

@SerializedName("update_time")
private String updateTime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package com.github.binarywang.wxpay.bean.transfer;

import com.github.binarywang.wxpay.v3.SpecEncrypt;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
* 发起商家转账API参数
*
* @author zhongjun
* @date 2022/6/17
**/
@Data
@Builder(builderMethodName = "newBuilder")
@NoArgsConstructor
@AllArgsConstructor
public class TransferBatchesRequest implements Serializable {
private static final long serialVersionUID = -2175582517588397426L;

/**
* 直连商户的appid
*/
@SerializedName("appid")
private String appid;

/**
* 商家批次单号
*/
@SerializedName("out_batch_no")
private String outBatchNo;

/**
* 批次名称
*/
@SerializedName("batch_name")
private String batchName;

/**
* 批次备注
*/
@SerializedName("batch_remark")
private String batchRemark;

/**
* 转账总金额
*/
@SerializedName("total_amount")
private Integer totalAmount;

/**
* 转账总笔数
*/
@SerializedName("total_num")
private Integer totalNum;

/**
* 转账明细列表
*/
@SerializedName("transfer_detail_list")
private List<TransferDetail> transferDetailList;


@Data
@Builder(builderMethodName = "newBuilder")
@AllArgsConstructor
@NoArgsConstructor
public static class TransferDetail {

/**
* 商家明细单号
*/
@SerializedName("out_detail_no")
private String outDetailNo;

/**
* 转账金额
*/
@SerializedName("transfer_amount")
private Integer transferAmount;

/**
* 转账备注
*/
@SerializedName("transfer_remark")
private String transferRemark;

/**
* 用户在直连商户应用下的用户标示
*/
@SerializedName("openid")
private String openid;

/**
* 收款用户姓名
*/
@SpecEncrypt
@SerializedName("user_name")
private String userName;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.github.binarywang.wxpay.bean.transfer;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 商家转账结果
*
* @author zhongjun
* @date 2022/6/17
**/
@Data
@NoArgsConstructor
public class TransferBatchesResult implements Serializable {
private static final long serialVersionUID = -2175582517588397426L;

/**
* 商家批次单号
*/
@SerializedName("out_batch_no")
private String outBatchNo;

/**
* 微信批次单号
*/
@SerializedName("batch_id")
private String batchId;

/**
* 批次创建时间
*/
@SerializedName("create_time")
private String createTime;
}
Loading

0 comments on commit db09605

Please sign in to comment.