Merge remote-tracking branch 'origin/master'
commit
9d9005f2c4
5
pom.xml
5
pom.xml
|
@ -180,6 +180,11 @@
|
||||||
<artifactId>forest-spring-boot3-starter</artifactId>
|
<artifactId>forest-spring-boot3-starter</artifactId>
|
||||||
<version>1.5.36</version>
|
<version>1.5.36</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- oss -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.muyu.common.core.enums;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Data 2024/8/1
|
||||||
|
* @Description 系统是否枚举
|
||||||
|
* @Version 1.0.0
|
||||||
|
*/
|
||||||
|
public enum SystemYesNo {
|
||||||
|
|
||||||
|
YES("Y","是"),
|
||||||
|
NO("N","否");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
SystemYesNo(String code, String info) {
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode () {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo () {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean isCode (String code) {
|
||||||
|
return Arrays.stream(values())
|
||||||
|
.map(SystemYesNo::getCode)
|
||||||
|
.anyMatch(c -> c.equals(code));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue