Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
43d4748c
Commit
43d4748c
authored
Dec 07, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加信息公开平台通知
parent
97ff9b7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+2
-0
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+18
-5
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
43d4748c
...
@@ -288,6 +288,8 @@ public class DeviceApiController {
...
@@ -288,6 +288,8 @@ public class DeviceApiController {
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
try
{
try
{
log
.
info
(
"【getToken】【请求体】--> "
+
loginForm
.
getLoginName
(),
loginForm
.
getPassword
());
UserEntity
userEntity
=
userService
.
doLogin
(
loginForm
.
getLoginName
(),
loginForm
.
getPassword
(),
""
);
UserEntity
userEntity
=
userService
.
doLogin
(
loginForm
.
getLoginName
(),
loginForm
.
getPassword
(),
""
);
if
(!
ObjectUtils
.
isEmpty
(
userEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
userEntity
))
{
String
token
=
IdUtil
.
fastSimpleUUID
();
String
token
=
IdUtil
.
fastSimpleUUID
();
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
43d4748c
...
@@ -294,7 +294,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -294,7 +294,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setUpdateUserId
(
getContextUserId
(
context
));
deviceEntity
.
setUpdateUserId
(
getContextUserId
(
context
));
this
.
getDeviceDao
().
update
(
deviceEntity
);
this
.
getDeviceDao
().
update
(
deviceEntity
);
this
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
this
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
PlatformEntity
platformEntity
=
platformService
.
getCache
(
deviceEntity
.
getPlatformId
()
==
null
?
"-1"
:
deviceEntity
.
getPlatformId
().
toString
());
PlatformEntity
platformEntity
=
platformService
.
getCache
(
deviceEntity
.
getPlatformId
()
==
null
?
"-1"
:
deviceEntity
.
getPlatformId
().
toString
());
ProductEntity
productEntity
=
productService
.
getCache
(
deviceEntity
.
getProductId
()
==
null
?
"-1"
:
deviceEntity
.
getProductId
().
toString
());
ProductEntity
productEntity
=
productService
.
getCache
(
deviceEntity
.
getProductId
()
==
null
?
"-1"
:
deviceEntity
.
getProductId
().
toString
());
if
(
enabled
==
YesNoEnum
.
YES
.
getValue
())
{
if
(
enabled
==
YesNoEnum
.
YES
.
getValue
())
{
...
@@ -303,12 +303,12 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -303,12 +303,12 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
this
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
STOP
);
this
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
STOP
);
}
}
if
(
enabled
==
EnabledEnum
.
停止
.
getValue
())
{
if
(
enabled
==
EnabledEnum
.
停止
.
getValue
())
{
ErrorLogPdu
errorLogPdu
=
new
ErrorLogPdu
();
ErrorLogPdu
errorLogPdu
=
new
ErrorLogPdu
();
errorLogPdu
.
initAttrValue
();
errorLogPdu
.
initAttrValue
();
errorLogPdu
.
setTraceID
(
IdUtil
.
objectId
());
errorLogPdu
.
setTraceID
(
IdUtil
.
objectId
());
errorLogPdu
.
setAppName
(
productEntity
.
getProductCode
());
errorLogPdu
.
setAppName
(
productEntity
.
getProductCode
());
errorLogPdu
.
setMessage
(
deviceEntity
.
getDeviceName
()
+
"设备停用!"
);
errorLogPdu
.
setMessage
(
deviceEntity
.
getDeviceName
()
+
"设备停用!"
);
errorLogPdu
.
setPlatform
(
"webos"
);
errorLogPdu
.
setPlatform
(
"webos"
);
errorLogPdu
.
setCulprit
(
""
);
errorLogPdu
.
setCulprit
(
""
);
errorLogPdu
.
setTags
(
""
);
errorLogPdu
.
setTags
(
""
);
...
@@ -317,7 +317,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -317,7 +317,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
errorLogPdu
.
setReleaseVersion
(
""
);
errorLogPdu
.
setReleaseVersion
(
""
);
errorLogPdu
.
setFingerprint
(
LogTypeEnum
.
上报事件
.
name
());
errorLogPdu
.
setFingerprint
(
LogTypeEnum
.
上报事件
.
name
());
errorLogPdu
.
setThreadNo
(
Thread
.
currentThread
().
toString
());
errorLogPdu
.
setThreadNo
(
Thread
.
currentThread
().
toString
());
errorLogPdu
.
setErrorStack
(
Thread
.
currentThread
()
+
deviceEntity
.
getDeviceName
()+
"设备停用!"
);
errorLogPdu
.
setErrorStack
(
Thread
.
currentThread
()
+
deviceEntity
.
getDeviceName
()
+
"设备停用!"
);
errorLogPdu
.
setContext
(
""
);
errorLogPdu
.
setContext
(
""
);
errorLogPdu
.
setExtra
(
""
);
errorLogPdu
.
setExtra
(
""
);
errorLogPdu
.
setLogTime
(
new
Date
());
errorLogPdu
.
setLogTime
(
new
Date
());
...
@@ -600,6 +600,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -600,6 +600,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
ProductEntity
productEntity
=
productService
.
selectOne
(
new
ProductQuery
().
productCode
(
entity
.
getProductCode
()));
ProductEntity
productEntity
=
productService
.
selectOne
(
new
ProductQuery
().
productCode
(
entity
.
getProductCode
()));
if
(!
ObjectUtils
.
isEmpty
(
productEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
productEntity
))
{
entity
.
setProductId
(
productEntity
.
getId
());
entity
.
setProductId
(
productEntity
.
getId
());
entity
.
setProductCode
(
productEntity
.
getProductCode
());
entity
.
setProductName
(
productEntity
.
getProductName
());
entity
.
setProductName
(
productEntity
.
getProductName
());
//根据产品查询平台
//根据产品查询平台
if
(!
ObjectUtils
.
isEmpty
(
productEntity
.
getPlatformId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
productEntity
.
getPlatformId
()))
{
...
@@ -638,7 +639,19 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -638,7 +639,19 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
protected
void
updateBefore
(
DeviceEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateBefore
(
DeviceEntity
entity
,
Context
context
)
throws
AppException
{
super
.
updateBefore
(
entity
,
context
);
super
.
updateBefore
(
entity
,
context
);
ProductEntity
productEntity
=
productService
.
get
(
entity
.
getProductId
(),
context
);
ProductEntity
productEntity
=
productService
.
get
(
entity
.
getProductId
(),
context
);
entity
.
setProductCode
(
productEntity
==
null
?
""
:
productEntity
.
getProductCode
());
if
(!
ObjectUtils
.
isEmpty
(
productEntity
))
{
entity
.
setProductCode
(
productEntity
.
getProductCode
());
entity
.
setProductName
(
productEntity
.
getProductName
());
PlatformEntity
platformEntity
=
platformService
.
getCache
(
productEntity
.
getPlatformId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
))
{
entity
.
setPlatformId
(
platformEntity
.
getId
());
entity
.
setPlatformCode
(
platformEntity
.
getPlatformSn
());
entity
.
setPlatformName
(
platformEntity
.
getPlatformName
());
}
}
//更新平台
updateDeviceHomeUrl
(
entity
);
updateDeviceHomeUrl
(
entity
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment