mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-07-15 05:13:16 +08:00
🎨 优化规范部分代码
This commit is contained in:
parent
bd100bf846
commit
aca8dbabbc
@ -87,7 +87,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.jedis-lock</groupId>
|
<groupId>com.github.jedis-lock</groupId>
|
||||||
<artifactId>jedis-lock</artifactId>
|
<artifactId>jedis-lock</artifactId>
|
||||||
<version>1.0.0</version>
|
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,8 +19,8 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class ApplymentStateQueryResult {
|
public class ApplymentStateQueryResult implements Serializable {
|
||||||
|
private static final long serialVersionUID = 6539090917423486409L;
|
||||||
/**
|
/**
|
||||||
* 业务申请编号
|
* 业务申请编号
|
||||||
*/
|
*/
|
||||||
@ -43,7 +44,6 @@ public class ApplymentStateQueryResult {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请单状态
|
* 申请单状态
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@SerializedName("applyment_state")
|
@SerializedName("applyment_state")
|
||||||
private ApplymentStateEnum applymentState;
|
private ApplymentStateEnum applymentState;
|
||||||
|
@ -9,6 +9,8 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.github.binarywang.wxpay.v3.SpecEncrypt;
|
import com.github.binarywang.wxpay.v3.SpecEncrypt;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改结算账户请求对象
|
* 修改结算账户请求对象
|
||||||
*/
|
*/
|
||||||
@ -17,7 +19,8 @@ import com.github.binarywang.wxpay.v3.SpecEncrypt;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class ModifySettlementRequest {
|
public class ModifySettlementRequest implements Serializable {
|
||||||
|
private static final long serialVersionUID = 4568552340365230872L;
|
||||||
/**
|
/**
|
||||||
*账户类型
|
*账户类型
|
||||||
*/
|
*/
|
||||||
|
@ -7,6 +7,8 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询结算账户返回对象信息
|
* 查询结算账户返回对象信息
|
||||||
*/
|
*/
|
||||||
@ -15,8 +17,8 @@ import lombok.experimental.Accessors;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class SettlementInfoResult {
|
public class SettlementInfoResult implements Serializable {
|
||||||
|
private static final long serialVersionUID = 4568552340365230872L;
|
||||||
/**
|
/**
|
||||||
* 账户类型
|
* 账户类型
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ApplymentsRequest implements Serializable {
|
public class ApplymentsRequest implements Serializable {
|
||||||
|
private static final long serialVersionUID = -3092662029966103592L;
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:业务申请编号
|
* 字段名:业务申请编号
|
||||||
|
@ -12,7 +12,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ApplymentsResult implements Serializable {
|
public class ApplymentsResult implements Serializable {
|
||||||
|
private static final long serialVersionUID = -4549193755252593150L;
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:微信支付申请单号
|
* 字段名:微信支付申请单号
|
||||||
|
@ -145,6 +145,7 @@ public class ApplymentsStatusResult implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public static class AccountValidation implements Serializable {
|
public static class AccountValidation implements Serializable {
|
||||||
|
private static final long serialVersionUID = 4379880030965808588L;
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:付款户名
|
* 字段名:付款户名
|
||||||
@ -276,6 +277,7 @@ public class ApplymentsStatusResult implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public static class AuditDetail implements Serializable {
|
public static class AuditDetail implements Serializable {
|
||||||
|
private static final long serialVersionUID = 5446130564359386809L;
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:参数名称
|
* 字段名:参数名称
|
||||||
|
@ -21,8 +21,6 @@ public interface Applyment4SubService {
|
|||||||
*/
|
*/
|
||||||
WxPayApplymentCreateResult createApply(WxPayApplyment4SubCreateRequest request) throws WxPayException;
|
WxPayApplymentCreateResult createApply(WxPayApplyment4SubCreateRequest request) throws WxPayException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过业务申请编号查询申请状态
|
* 通过业务申请编号查询申请状态
|
||||||
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/applyment4sub/chapter3_2.shtml
|
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/applyment4sub/chapter3_2.shtml
|
||||||
@ -34,6 +32,8 @@ public interface Applyment4SubService {
|
|||||||
* 3、每个编号对应一个申请单,每个申请单审核通过后生成一个微信支付商户号。
|
* 3、每个编号对应一个申请单,每个申请单审核通过后生成一个微信支付商户号。
|
||||||
* 4、若申请单被驳回,可填写相同的“业务申请编号”,即可覆盖修改原申请单信息。
|
* 4、若申请单被驳回,可填写相同的“业务申请编号”,即可覆盖修改原申请单信息。
|
||||||
* 示例值:1900013511_10000
|
* 示例值:1900013511_10000
|
||||||
|
* @return the applyment state query result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
ApplymentStateQueryResult queryApplyStatusByBusinessCode(String businessCode) throws WxPayException;
|
ApplymentStateQueryResult queryApplyStatusByBusinessCode(String businessCode) throws WxPayException;
|
||||||
|
|
||||||
@ -43,6 +43,8 @@ public interface Applyment4SubService {
|
|||||||
* 接口链接:https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/applyment_id/{applyment_id}
|
* 接口链接:https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/applyment_id/{applyment_id}
|
||||||
*
|
*
|
||||||
* @param applymentId 微信支付分的申请单号。示例值:2000001234567890
|
* @param applymentId 微信支付分的申请单号。示例值:2000001234567890
|
||||||
|
* @return the applyment state query result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
ApplymentStateQueryResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException;
|
ApplymentStateQueryResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException;
|
||||||
|
|
||||||
@ -52,6 +54,8 @@ public interface Applyment4SubService {
|
|||||||
* 接口链接:https://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/settlement
|
* 接口链接:https://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/settlement
|
||||||
*
|
*
|
||||||
* @param subMchid 本服务商进件、已签约的特约商户号。
|
* @param subMchid 本服务商进件、已签约的特约商户号。
|
||||||
|
* @return the settlement info result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
SettlementInfoResult querySettlementBySubMchid(String subMchid) throws WxPayException;
|
SettlementInfoResult querySettlementBySubMchid(String subMchid) throws WxPayException;
|
||||||
|
|
||||||
@ -59,8 +63,10 @@ public interface Applyment4SubService {
|
|||||||
* 修改结算帐号
|
* 修改结算帐号
|
||||||
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/applyment4sub/chapter3_3.shtml
|
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/applyment4sub/chapter3_3.shtml
|
||||||
* 接口链接:https://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/modify-settlement
|
* 接口链接:https://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/modify-settlement
|
||||||
|
*
|
||||||
* @param subMchid 特约商户号
|
* @param subMchid 特约商户号
|
||||||
* @param request 修改结算账户请求对象信息
|
* @param request 修改结算账户请求对象信息
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
void modifySettlement(String subMchid, ModifySettlementRequest request) throws WxPayException;
|
void modifySettlement(String subMchid, ModifySettlementRequest request) throws WxPayException;
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ public interface EcommerceService {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param request 请求对象
|
* @param request 请求对象
|
||||||
* @return .
|
* @return . applyments result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException;
|
ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException;
|
||||||
|
|
||||||
@ -36,7 +37,8 @@ public interface EcommerceService {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param applymentId 申请单ID
|
* @param applymentId 申请单ID
|
||||||
* @return .
|
* @return . applyments status result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException;
|
ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException;
|
||||||
|
|
||||||
@ -48,7 +50,8 @@ public interface EcommerceService {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param outRequestNo 业务申请编号
|
* @param outRequestNo 业务申请编号
|
||||||
* @return .
|
* @return . applyments status result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo) throws WxPayException;
|
ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo) throws WxPayException;
|
||||||
|
|
||||||
|
@ -9,21 +9,14 @@ import com.github.binarywang.wxpay.service.WxPayService;
|
|||||||
import com.github.binarywang.wxpay.v3.util.RsaCryptoUtil;
|
import com.github.binarywang.wxpay.v3.util.RsaCryptoUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class EcommerceServiceImpl implements EcommerceService {
|
public class EcommerceServiceImpl implements EcommerceService {
|
||||||
|
|
||||||
private static final Gson GSON = new GsonBuilder().create();
|
private static final Gson GSON = new GsonBuilder().create();
|
||||||
private WxPayService payService;
|
private final WxPayService payService;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param payService
|
|
||||||
*/
|
|
||||||
public EcommerceServiceImpl(WxPayService payService) {
|
|
||||||
this.payService = payService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException {
|
public ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException {
|
||||||
|
Loading…
Reference in New Issue
Block a user