增加商户转账到零钱v3版本
This commit is contained in:
parent
73f2d24816
commit
2b0eebdc0f
@ -1460,6 +1460,7 @@
|
||||
ho.act_price as actPrice,
|
||||
ho.act_power_price as actPowerPrice,
|
||||
ho.act_service_price as actServicePrice,
|
||||
ho.act_total_price as actTotalPrice,
|
||||
ho.internet_commission as internetCommission,
|
||||
ho.internet_svc_commission as internetSvcCommission,
|
||||
ho.internet_degree_commission as internetDegreeCommission,
|
||||
|
||||
@ -90,6 +90,13 @@
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>3.14.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
<artifactId>wechatpay-java</artifactId>
|
||||
<version>0.2.17</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xhpc.payment.service;
|
||||
import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.domain.XhpcRefundOrder;
|
||||
import com.xhpc.payment.domain.XhpcRefundAudit;
|
||||
import com.xhpc.payment.util.TransferBatchNotifyData;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
@ -22,6 +23,10 @@ public interface IXhpcRefundOriginalOrderService {
|
||||
//微信回调处理(退款)
|
||||
void updateXhpcRefundOriginalOrder(Map<String, String> reqInfo);
|
||||
|
||||
|
||||
//微信回调处理V3(退款)
|
||||
void updateXhpcRefundOriginalOrderV3(TransferBatchNotifyData notifyData);
|
||||
|
||||
void updateXhpcRefundOrder(XhpcRefundOrder refundOrder, BigDecimal refundFee, Integer type,Integer status);
|
||||
|
||||
//新增退款订单
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
package com.xhpc.payment.util;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 微信支付回调通知外层报文
|
||||
* 对应 resource 加密前的原始 JSON
|
||||
*/
|
||||
public class TransferBatchCallbackNotification {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
@SerializedName("resource_type")
|
||||
private String resourceType;
|
||||
|
||||
@SerializedName("event_type")
|
||||
private String eventType;
|
||||
|
||||
@SerializedName("summary")
|
||||
private String summary;
|
||||
|
||||
@SerializedName("resource")
|
||||
private Resource resource;
|
||||
|
||||
// ----- Getters and Setters -----
|
||||
public String getId() { return id; }
|
||||
public void setId(String id) { this.id = id; }
|
||||
|
||||
public String getCreateTime() { return createTime; }
|
||||
public void setCreateTime(String createTime) { this.createTime = createTime; }
|
||||
|
||||
public String getResourceType() { return resourceType; }
|
||||
public void setResourceType(String resourceType) { this.resourceType = resourceType; }
|
||||
|
||||
public String getEventType() { return eventType; }
|
||||
public void setEventType(String eventType) { this.eventType = eventType; }
|
||||
|
||||
public String getSummary() { return summary; }
|
||||
public void setSummary(String summary) { this.summary = summary; }
|
||||
|
||||
public Resource getResource() { return resource; }
|
||||
public void setResource(Resource resource) { this.resource = resource; }
|
||||
|
||||
public static class Resource {
|
||||
@SerializedName("original_type")
|
||||
private String originalType;
|
||||
|
||||
@SerializedName("algorithm")
|
||||
private String algorithm;
|
||||
|
||||
@SerializedName("ciphertext")
|
||||
private String ciphertext;
|
||||
|
||||
@SerializedName("associated_data")
|
||||
private String associatedData;
|
||||
|
||||
@SerializedName("nonce")
|
||||
private String nonce;
|
||||
|
||||
// ----- Getters and Setters -----
|
||||
public String getOriginalType() { return originalType; }
|
||||
public void setOriginalType(String originalType) { this.originalType = originalType; }
|
||||
|
||||
public String getAlgorithm() { return algorithm; }
|
||||
public void setAlgorithm(String algorithm) { this.algorithm = algorithm; }
|
||||
|
||||
public String getCiphertext() { return ciphertext; }
|
||||
public void setCiphertext(String ciphertext) { this.ciphertext = ciphertext; }
|
||||
|
||||
public String getAssociatedData() { return associatedData; }
|
||||
public void setAssociatedData(String associatedData) { this.associatedData = associatedData; }
|
||||
|
||||
public String getNonce() { return nonce; }
|
||||
public void setNonce(String nonce) { this.nonce = nonce; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.xhpc.payment.util;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信商家转账批次回调通知数据
|
||||
* 文档:https://pay.weixin.qq.com/doc/v3/merchant/4012071382
|
||||
*/
|
||||
public class TransferBatchNotifyData {
|
||||
@SerializedName("mchid")
|
||||
private String mchid;
|
||||
|
||||
@SerializedName("out_batch_no")
|
||||
private String outBatchNo;
|
||||
|
||||
@SerializedName("batch_id")
|
||||
private String batchId;
|
||||
|
||||
@SerializedName("batch_status")
|
||||
private String batchStatus; // FINISHED, CLOSED
|
||||
|
||||
@SerializedName("total_num")
|
||||
private Integer totalNum;
|
||||
|
||||
@SerializedName("total_amount")
|
||||
private Long totalAmount; // 单位:分
|
||||
|
||||
@SerializedName("transfer_detail_list")
|
||||
private List<TransferDetail> transferDetailList;
|
||||
|
||||
// ----- Getter/Setter -----
|
||||
public String getMchid() { return mchid; }
|
||||
public void setMchid(String mchid) { this.mchid = mchid; }
|
||||
|
||||
public String getOutBatchNo() { return outBatchNo; }
|
||||
public void setOutBatchNo(String outBatchNo) { this.outBatchNo = outBatchNo; }
|
||||
|
||||
public String getBatchId() { return batchId; }
|
||||
public void setBatchId(String batchId) { this.batchId = batchId; }
|
||||
|
||||
public String getBatchStatus() { return batchStatus; }
|
||||
public void setBatchStatus(String batchStatus) { this.batchStatus = batchStatus; }
|
||||
|
||||
public Integer getTotalNum() { return totalNum; }
|
||||
public void setTotalNum(Integer totalNum) { this.totalNum = totalNum; }
|
||||
|
||||
public Long getTotalAmount() { return totalAmount; }
|
||||
public void setTotalAmount(Long totalAmount) { this.totalAmount = totalAmount; }
|
||||
|
||||
public List<TransferDetail> getTransferDetailList() { return transferDetailList; }
|
||||
public void setTransferDetailList(List<TransferDetail> transferDetailList) { this.transferDetailList = transferDetailList; }
|
||||
|
||||
public static class TransferDetail {
|
||||
@SerializedName("detail_id")
|
||||
private String detailId;
|
||||
|
||||
@SerializedName("out_detail_no")
|
||||
private String outDetailNo;
|
||||
|
||||
@SerializedName("detail_status")
|
||||
private String detailStatus; // SUCCESS, FAIL
|
||||
|
||||
@SerializedName("transfer_amount")
|
||||
private Long transferAmount;
|
||||
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
|
||||
@SerializedName("fail_reason")
|
||||
private String failReason;
|
||||
|
||||
// ----- Getter/Setter -----
|
||||
public String getDetailId() { return detailId; }
|
||||
public void setDetailId(String detailId) { this.detailId = detailId; }
|
||||
|
||||
public String getOutDetailNo() { return outDetailNo; }
|
||||
public void setOutDetailNo(String outDetailNo) { this.outDetailNo = outDetailNo; }
|
||||
|
||||
public String getDetailStatus() { return detailStatus; }
|
||||
public void setDetailStatus(String detailStatus) { this.detailStatus = detailStatus; }
|
||||
|
||||
public Long getTransferAmount() { return transferAmount; }
|
||||
public void setTransferAmount(Long transferAmount) { this.transferAmount = transferAmount; }
|
||||
|
||||
public String getOpenid() { return openid; }
|
||||
public void setOpenid(String openid) { this.openid = openid; }
|
||||
|
||||
public String getFailReason() { return failReason; }
|
||||
public void setFailReason(String failReason) { this.failReason = failReason; }
|
||||
}
|
||||
}
|
||||
@ -32,9 +32,16 @@
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="wx_api_serial_no" property="wxApiSerialNo"/>
|
||||
<result column="wx_api_v3_key" property="wxApiV3Key"/>
|
||||
<result column="wx_pay_public_keyId" property="wxPayPublicKeyId"/>
|
||||
<result column="wx_pay_public_key_path" property="wxPayPublicKeyPath"/>
|
||||
<result column="wx_v3_callback_url" property="wxV3CallbackUrl"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="getXhpcSettingConfigTenantId" resultMap="XhpcSettingConfigResult">
|
||||
select * from xhpc_setting_config where del_flag =0 and status=#{status} and tenant_id=#{tenantId} limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user