新增 甬城泊车相关接口、controller

This commit is contained in:
Lemon
2023-11-09 13:50:41 +08:00
parent 4e853ed592
commit 7d7a68a9ad
10 changed files with 256 additions and 104 deletions

View File

@@ -0,0 +1,66 @@
package com.jsowell.common.enums.thirdparty;
import com.jsowell.common.util.StringUtils;
/**
* TODO
*
* @author Lemon
* @Date 2023/11/8 9:11:55
*/
public enum ThirdPartyOperatorIdEnum {
LIAN_LIAN_PLATFORM("1", "425010765"),
ZHONG_DIAN_LIAN_PLATFORM("2", "14405899X"),
JIANG_SU_PLATFORM("3", "726079387"),
YONG_CHENG_BO_CHE("4", "330205020"),
;
private String type;
private String OperatorId;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getOperatorId() {
return OperatorId;
}
public void setOperatorId(String operatorId) {
OperatorId = operatorId;
}
ThirdPartyOperatorIdEnum(String type, String operatorId) {
this.type = type;
OperatorId = operatorId;
}
/**
* 根据 type 获取 operatorId
*
* @param type 编码
* @return operatorId
*/
public static String getOperatorIdByType(String type) {
for (ThirdPartyOperatorIdEnum item : ThirdPartyOperatorIdEnum.values()) {
if (StringUtils.equals(item.getType(), type)) {
return item.getOperatorId();
}
}
return null;
}
public static String getTypeByOperatorId(String operatorId) {
for (ThirdPartyOperatorIdEnum item : ThirdPartyOperatorIdEnum.values()) {
if (StringUtils.equals(item.getOperatorId(), operatorId)) {
return item.getType();
}
}
return null;
}
}

View File

@@ -47,7 +47,7 @@ public enum ThirdPlatformTypeEnum {
* @param code 编码
* @return 停止原因描述
*/
public static String getMsgByCode(String code) {
public static String getLabelByCode(String code) {
for (ThirdPlatformTypeEnum item : ThirdPlatformTypeEnum.values()) {
if (StringUtils.equals(item.getCode(), code)) {
return item.getLabel();