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
17e39aae
Commit
17e39aae
authored
May 31, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备新增等
parent
2ca0c53b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
7 deletions
+18
-7
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+5
-0
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
...java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
+5
-0
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+3
-1
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+2
-4
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+3
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
17e39aae
...
...
@@ -327,6 +327,7 @@ public class DeviceApiController {
deviceEntity
.
setDeviceRemark
(
req
.
getDeviceRemark
());
deviceEntity
.
setCreateUserId
(
1L
);
deviceEntity
.
setCreateTime
(
new
Date
());
deviceEntity
.
setSwitchSend
(
false
);
deviceService
.
save
(
deviceEntity
);
}
...
...
@@ -372,6 +373,7 @@ public class DeviceApiController {
deviceEntity
.
setDeviceRemark
(
req
.
getDeviceRemark
());
deviceEntity
.
setUpdateUserId
(
1L
);
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setSwitchSend
(
false
);
deviceService
.
save
(
deviceEntity
);
}
...
...
@@ -394,6 +396,7 @@ public class DeviceApiController {
deviceEntity
.
setActive
(
ActiveEnum
.
已激活
.
getValue
());
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setUpdateUserId
(
1L
);
deviceEntity
.
setSwitchSend
(
false
);
deviceService
.
update
(
deviceEntity
);
}
...
...
@@ -405,6 +408,7 @@ public class DeviceApiController {
deviceEntity
.
setActive
(
YesNoEnum
.
YES
.
getValue
());
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setUpdateUserId
(
1L
);
deviceEntity
.
setSwitchSend
(
false
);
deviceService
.
update
(
deviceEntity
);
}
...
...
@@ -414,6 +418,7 @@ public class DeviceApiController {
deviceEntity
.
setActive
(
YesNoEnum
.
YES
.
getValue
());
deviceEntity
.
setUpdateTime
(
new
Date
());
deviceEntity
.
setUpdateUserId
(
1L
);
deviceEntity
.
setSwitchSend
(
false
);
deviceService
.
update
(
deviceEntity
);
}
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
View file @
17e39aae
...
...
@@ -31,4 +31,9 @@ public class DeviceVo extends BaseEntityLong {
*/
private
Long
expireTime
;
/**
* 是否通知第三方
*/
private
Boolean
switchSend
=
true
;
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
17e39aae
...
...
@@ -182,7 +182,9 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
deviceReq
.
setReceiveMethod
(
update
.
getValue
());
deviceReq
.
setProductCode
(
productEntity
.
getProductCode
());
deviceReq
.
setPlatformCode
(
platformEntity
.
getPlatformSn
());
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
.
getSendUrl
())
&&
platformEntity
.
getSendSwitch
()
==
SendSwitchEnum
.
启用
.
getValue
())
{
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
.
getSendUrl
())
&&
platformEntity
.
getSendSwitch
()
==
SendSwitchEnum
.
启用
.
getValue
()
&&
entity
.
getSwitchSend
())
{
if
(
PatternPool
.
URL_HTTP
.
matcher
(
platformEntity
.
getSendUrl
()).
find
())
{
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
platformEntity
.
getSendUrl
(),
deviceReq
);
}
else
{
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
17e39aae
...
...
@@ -166,12 +166,10 @@ public class DeviceController extends BaseCRUDJsonMappingController<DeviceServic
}
@Override
protected
int
saveAfter
(
HttpServletRequest
request
,
HttpServletResponse
response
,
DeviceForm
form
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
return
super
.
saveAfter
(
request
,
response
,
form
,
model
,
context
);
protected
void
saveBefore
(
HttpServletRequest
request
,
HttpServletResponse
response
,
DeviceForm
form
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
super
.
saveBefore
(
request
,
response
,
form
,
model
,
context
);
}
/**
* 设备激活
*/
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
17e39aae
...
...
@@ -92,13 +92,14 @@ Content-Type: application/json
{
"receiveMethod": 1,
"deviceName": "测试接口创建设备3",
"deviceCode": "A1:12:23:12:23:112
3
",
"deviceCode": "A1:12:23:12:23:112
4
",
"siteId": 123,
"siteCode": "adfasfdasfdasf",
"siteName": "测试站点",
"platformCode": "phxt",
"productCode": "pdj",
"deviceRemark": "车是是是打发斯蒂芬"
"deviceRemark": "车是是是打发斯蒂芬",
"homeUrl": "http://www.baidu.com"
}
...
...
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