🎨 优化规范部分代码

This commit is contained in:
Binary Wang 2020-08-22 17:13:35 +08:00
parent bd100bf846
commit aca8dbabbc
11 changed files with 813 additions and 804 deletions

View File

@ -87,7 +87,6 @@
<dependency>
<groupId>com.github.jedis-lock</groupId>
<artifactId>jedis-lock</artifactId>
<version>1.0.0</version>
<optional>true</optional>
</dependency>
<dependency>

View File

@ -8,6 +8,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
/**
@ -18,8 +19,8 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@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")
private ApplymentStateEnum applymentState;

View File

@ -9,6 +9,8 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.github.binarywang.wxpay.v3.SpecEncrypt;
import java.io.Serializable;
/**
* 修改结算账户请求对象
*/
@ -17,7 +19,8 @@ import com.github.binarywang.wxpay.v3.SpecEncrypt;
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ModifySettlementRequest {
public class ModifySettlementRequest implements Serializable {
private static final long serialVersionUID = 4568552340365230872L;
/**
*账户类型
*/

View File

@ -7,6 +7,8 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 查询结算账户返回对象信息
*/
@ -15,8 +17,8 @@ import lombok.experimental.Accessors;
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SettlementInfoResult {
public class SettlementInfoResult implements Serializable {
private static final long serialVersionUID = 4568552340365230872L;
/**
* 账户类型
*/

View File

@ -17,6 +17,7 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
public class ApplymentsRequest implements Serializable {
private static final long serialVersionUID = -3092662029966103592L;
/**
* <pre>
* 字段名业务申请编号

View File

@ -12,7 +12,7 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
public class ApplymentsResult implements Serializable {
private static final long serialVersionUID = -4549193755252593150L;
/**
* <pre>
* 字段名微信支付申请单号

View File

@ -145,6 +145,7 @@ public class ApplymentsStatusResult implements Serializable {
@Data
@NoArgsConstructor
public static class AccountValidation implements Serializable {
private static final long serialVersionUID = 4379880030965808588L;
/**
* <pre>
* 字段名付款户名
@ -276,6 +277,7 @@ public class ApplymentsStatusResult implements Serializable {
@Data
@NoArgsConstructor
public static class AuditDetail implements Serializable {
private static final long serialVersionUID = 5446130564359386809L;
/**
* <pre>
* 字段名参数名称

View File

@ -21,8 +21,6 @@ public interface Applyment4SubService {
*/
WxPayApplymentCreateResult createApply(WxPayApplyment4SubCreateRequest request) throws WxPayException;
/**
* 通过业务申请编号查询申请状态
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/applyment4sub/chapter3_2.shtml
@ -34,6 +32,8 @@ public interface Applyment4SubService {
* 3每个编号对应一个申请单每个申请单审核通过后生成一个微信支付商户号
* 4若申请单被驳回可填写相同的业务申请编号即可覆盖修改原申请单信息
* 示例值1900013511_10000
* @return the applyment state query result
* @throws WxPayException the wx pay exception
*/
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}
*
* @param applymentId 微信支付分的申请单号示例值2000001234567890
* @return the applyment state query result
* @throws WxPayException the wx pay exception
*/
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
*
* @param subMchid 本服务商进件已签约的特约商户号
* @return the settlement info result
* @throws WxPayException the wx pay exception
*/
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://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/modify-settlement
*
* @param subMchid 特约商户号
* @param request 修改结算账户请求对象信息
* @throws WxPayException the wx pay exception
*/
void modifySettlement(String subMchid, ModifySettlementRequest request) throws WxPayException;

View File

@ -24,7 +24,8 @@ public interface EcommerceService {
* </pre>
*
* @param request 请求对象
* @return .
* @return . applyments result
* @throws WxPayException the wx pay exception
*/
ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException;
@ -36,7 +37,8 @@ public interface EcommerceService {
* </pre>
*
* @param applymentId 申请单ID
* @return .
* @return . applyments status result
* @throws WxPayException the wx pay exception
*/
ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException;
@ -48,7 +50,8 @@ public interface EcommerceService {
* </pre>
*
* @param outRequestNo 业务申请编号
* @return .
* @return . applyments status result
* @throws WxPayException the wx pay exception
*/
ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo) throws WxPayException;

View File

@ -9,21 +9,14 @@ import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.v3.util.RsaCryptoUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import lombok.RequiredArgsConstructor;
import java.net.URI;
@RequiredArgsConstructor
public class EcommerceServiceImpl implements EcommerceService {
private static final Gson GSON = new GsonBuilder().create();
private WxPayService payService;
/**
*
* @param payService
*/
public EcommerceServiceImpl(WxPayService payService) {
this.payService = payService;
}
private final WxPayService payService;
@Override
public ApplymentsResult createApply(ApplymentsRequest request) throws WxPayException {