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
a1f02489
Commit
a1f02489
authored
1 year ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加修改删除设备校验
parent
43d4748c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
device-manager/pom.xml
device-manager/pom.xml
+3
-3
device-manager/src/main/bin/start.cmd
device-manager/src/main/bin/start.cmd
+1
-1
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+13
-3
No files found.
device-manager/pom.xml
View file @
a1f02489
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
<profile>
<profile>
<id>
xuanhan
</id>
<id>
xuanhan
</id>
<properties>
<properties>
<profiles.active>
yibi
n
</profiles.active>
<profiles.active>
xuanha
n
</profiles.active>
<profiles.server.path>
/m
</profiles.server.path>
<profiles.server.path>
/m
</profiles.server.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.server.port>
18222
</profiles.server.port>
<profiles.server.port>
18222
</profiles.server.port>
...
@@ -193,8 +193,8 @@
...
@@ -193,8 +193,8 @@
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.type>
3
</profiles.sms.type>
<profiles.sms.type>
3
</profiles.sms.type>
<profiles.log.path>
D:
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.filepath>
D:
/mortals/app/data
</profiles.filepath>
<profiles.filepath>
/mortals/app/data
</profiles.filepath>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
...
...
This diff is collapsed.
Click to expand it.
device-manager/src/main/bin/start.cmd
View file @
a1f02489
...
@@ -18,7 +18,7 @@ set HEAP_DUMP_PATH=%LOG_PATH%/heap_dump.hprof
...
@@ -18,7 +18,7 @@ set HEAP_DUMP_PATH=%LOG_PATH%/heap_dump.hprof
set
TEMP_PATH
=
%LOG_PATH%
/temp
/
set
TEMP_PATH
=
%LOG_PATH%
/temp
/
if
not
exist
"
%TEMP_PATH%
"
md
"
%TEMP_PATH%
"
if
not
exist
"
%TEMP_PATH%
"
md
"
%TEMP_PATH%
"
rem jvm启动参数
rem jvm启动参数
set
JAVA_OPTS
=
-Xms
512
M
-Xmx
512
M
-Xss
256
K
-XX
:
+UseAdaptiveSizePolicy -XX
:
+UseParallelGC -XX
:
+UseParallelOldGC -XX
:GCTimeRatio
=
39
-XX
:
+PrintGCDetails -XX
:
+PrintGCDateStamps -XX
:
+HeapDumpOnOutOfMemoryError
set
JAVA_OPTS
=
-Xms
512
M
-Xmx
1024
M
-Xss
256
K
-XX
:
+UseAdaptiveSizePolicy -XX
:
+UseParallelGC -XX
:
+UseParallelOldGC -XX
:GCTimeRatio
=
39
-XX
:
+PrintGCDetails -XX
:
+PrintGCDateStamps -XX
:
+HeapDumpOnOutOfMemoryError
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:
+PrintGCDateStamps -Xloggc
:
%GC_PATH%
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:
+PrintGCDateStamps -Xloggc
:
%GC_PATH%
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:ErrorFile
=
%HS_ERR_PATH%
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:ErrorFile
=
%HS_ERR_PATH%
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:HeapDumpPath
=
%HEAP_DUMP_PATH%
set
JAVA_OPTS
=
%JAVA_OPTS%
-XX
:HeapDumpPath
=
%HEAP_DUMP_PATH%
...
...
This diff is collapsed.
Click to expand it.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
a1f02489
...
@@ -936,9 +936,19 @@ public class DeviceApiController {
...
@@ -936,9 +936,19 @@ public class DeviceApiController {
private
void
deviceDel
(
DeviceReq
req
)
throws
AppException
{
private
void
deviceDel
(
DeviceReq
req
)
throws
AppException
{
log
.
info
(
"【设备删除】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
log
.
info
(
"【设备删除】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
//根据设备编码查询设备
//根据设备编码查询设备
DeviceEntity
deviceEntity
=
checkDeviceExist
(
req
);
if
(
ObjectUtils
.
isEmpty
(
req
.
getDeviceCode
()))
{
deviceService
.
remove
(
new
Long
[]{
deviceEntity
.
getId
()},
null
);
throw
new
AppException
(
DEVICE_CODE_IS_EMPTY
,
DEVICE_CODE_IS_EMPTY_CONTENT
);
}
DeviceEntity
deviceEntity
=
deviceService
.
getExtCache
(
req
.
getDeviceCode
());
if
(
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
throw
new
AppException
(
DEVICE_NOT_EXIST
,
DEVICE_NOT_EXIST_CONTENT
);
}
//判断提交设备类型是否和已存在的一直
Long
productId
=
deviceEntity
.
getProductId
();
ProductEntity
productCache
=
productService
.
getCache
(
productId
.
toString
());
if
(!
ObjectUtils
.
isEmpty
(
productCache
)&&
req
.
getProductCode
().
equals
(
productCache
.
getProductCode
())){
deviceService
.
remove
(
new
Long
[]{
deviceEntity
.
getId
()},
null
);
}
}
}
private
void
deviceActive
(
DeviceReq
req
)
throws
AppException
{
private
void
deviceActive
(
DeviceReq
req
)
throws
AppException
{
...
...
This diff is collapsed.
Click to expand it.
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