Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 532d7724
authored
Jul 08, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化设备调频
1 parent
86ef6709
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletions
src/main/java/cn/com/glsx/admin/common/enums/TypeConverseEunm.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/common/enums/TypeConverseEunm.java
View file @
532d772
...
@@ -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
;
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
532d772
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment