Commit 532d7724 by 杨林龙

优化设备调频

1 parent 86ef6709
...@@ -306,4 +306,37 @@ public class TypeConverseEunm { ...@@ -306,4 +306,37 @@ public class TypeConverseEunm {
return typeStr; return typeStr;
} }
} }
/**
* 用户类型枚举类
*/
public enum UserTypeEnum {
WEB(1, "WEB"),
MINI(2, "小程序");
private final Integer userType;
private final String userTypeStr;
UserTypeEnum(Integer userType, String userTypeStr) {
this.userType = userType;
this.userTypeStr = userTypeStr;
}
public static String getStrByUserType(Integer userType) {
for (UserTypeEnum userTypeEnum : UserTypeEnum.values()) {
if (userTypeEnum.getUserType().equals(userType)) {
return userTypeEnum.getUserTypeStr();
}
}
return null;
}
public Integer getUserType() {
return userType;
}
public String getUserTypeStr() {
return userTypeStr;
}
}
} }
...@@ -1728,7 +1728,8 @@ public class VehicleService extends AbstractCommonService { ...@@ -1728,7 +1728,8 @@ public class VehicleService extends AbstractCommonService {
df.setBatteryLevel(devicePower.getSoc() + ""); df.setBatteryLevel(devicePower.getSoc() + "");
} }
df.setStatus(1); df.setStatus(1);
df.setUserType(1); // WEB类型
df.setUserType(TypeConverseEunm.UserTypeEnum.WEB.getUserType());
df.setCreatedBy(ShieldContextHolder.getUserId()); df.setCreatedBy(ShieldContextHolder.getUserId());
df.setCreatedDate(new Date()); df.setCreatedDate(new Date());
df.setUpdatedDate(new Date()); df.setUpdatedDate(new Date());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!