update订单逻辑改造工厂模式

This commit is contained in:
2023-09-01 11:36:31 +08:00
parent 5a7e130e26
commit b53aedb423
12 changed files with 181 additions and 66 deletions

View File

@@ -0,0 +1,58 @@
package com.jsowell.common.enums.adapay;
/**
* 汇付支付 分账模式
*/
public enum MerchantDelayModeEnum {
DELAY("1", "延时分账", "delay"),
NOT_DELAY("0", "非延时分账", null),
;
private String value;
private String label;
private String mode;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getMode() {
return mode;
}
public void setMode(String mode) {
this.mode = mode;
}
/**
* 传入value获取 给汇付的payMode
* @param value
* @return
*/
public static String getAdapayPayMode(String value) {
for (MerchantDelayModeEnum merchantDelayModeEnum : MerchantDelayModeEnum.values()) {
if (merchantDelayModeEnum.getValue().equals(value)) {
return merchantDelayModeEnum.getMode();
}
}
return null;
}
MerchantDelayModeEnum(String value, String label, String mode) {
this.value = value;
this.label = label;
this.mode = mode;
}
}

View File

@@ -1,33 +0,0 @@
package com.jsowell.common.enums.adapay;
/**
* 汇付支付 分账模式
*/
public enum MerchantDelayModelEnum {
DELAY("1", "延时分账"),
NOT_DELAY("0", "非延时分账"),
;
private String value;
private String label;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
MerchantDelayModelEnum(String value, String label) {
this.value = value;
this.label = label;
}
}

View File

@@ -120,6 +120,8 @@ public enum ReturnCodeEnum {
CODE_QUERY_PARKING_INFO_IS_NULL("00100057", "未查到停车平台信息"),
CODE_GET_FIRST_LEVEL_MERCHANT_BY_APP_ID("00100058", "根据小程序appId未查询到一级运营商信息"),
/* 个人桩 start */
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),