1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| package com.dl.common.enums;
|
| import com.dl.common.utils.StringUtils;
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * 设备类型
| * 针对多套 用户体系
| *
| * @author Lion Li
| */
| @Getter
| @AllArgsConstructor
| public enum UserType {
|
| /**
| * pc端
| */
| SYS_USER("sys_user"),
|
| /**
| * app端
| */
| APP_USER("app_user");
|
| private final String userType;
|
| public static UserType getUserType(String str) {
| for (UserType value : values()) {
| if (StringUtils.contains(str, value.getUserType())) {
| return value;
| }
| }
| throw new RuntimeException("'UserType' not found By " + str);
| }
| }
|
|