-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lxy01128250
committed
Dec 15, 2023
1 parent
1c9ed85
commit 5ba883b
Showing
16 changed files
with
340 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/beauty/aide/common/enums/AccountStatusEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.beauty.aide.common.enums; | ||
|
||
/** | ||
* @author xiaoliu | ||
*/ | ||
public enum AccountStatusEnum { | ||
ACTIVE("已激活"), | ||
DISABLED("已禁用"), | ||
; | ||
|
||
private String desc; | ||
|
||
AccountStatusEnum(String desc) { | ||
this.desc = desc; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public static String getByName(String name) { | ||
for (AccountStatusEnum e : AccountStatusEnum.values()) { | ||
if (e.name().equals(name)) { | ||
return e.getDesc(); | ||
} | ||
} | ||
return null; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/beauty/aide/common/enums/UserRoleEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.beauty.aide.common.enums; | ||
|
||
public enum UserRoleEnum { | ||
SUPER_ADMIN(1L, "超级管理员"), | ||
ADMIN(2L, "管理员"), | ||
COMMON_USER(3L, "普通用户"), | ||
; | ||
|
||
private String desc; | ||
private Long code; | ||
|
||
UserRoleEnum(long code, String desc) { | ||
this.code = code; | ||
this.desc = desc; | ||
} | ||
|
||
public static String getByCode(Long code) { | ||
for (UserRoleEnum e : UserRoleEnum.values()) { | ||
if (e.getCode().equals(code)) { | ||
return e.getDesc(); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public Long getCode() { | ||
return code; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../com/beauty/aide/model/entity/BaseDO.java → ...auty/aide/common/model/entity/BaseDO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.beauty.aide.model.entity; | ||
package com.beauty.aide.common.model.entity; | ||
|
||
import lombok.Data; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/com/beauty/aide/model/so/BaseSO.java → ...m/beauty/aide/common/model/so/BaseSO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.beauty.aide.model.so; | ||
package com.beauty.aide.common.model.so; | ||
|
||
import lombok.Data; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...java/com/beauty/aide/model/so/UserSO.java → ...m/beauty/aide/common/model/so/UserSO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.beauty.aide.model.so; | ||
package com.beauty.aide.common.model.so; | ||
|
||
import lombok.Data; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.