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
d0cc8dad
Commit
d0cc8dad
authored
Jan 12, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口修改设备
parent
698559dc
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
33 deletions
+85
-33
device-manager-ui/admin/.env.production
device-manager-ui/admin/.env.production
+1
-4
device-manager-ui/admin/.env.test
device-manager-ui/admin/.env.test
+1
-1
device-manager-ui/admin/.env.yibin
device-manager-ui/admin/.env.yibin
+15
-0
device-manager-ui/admin/package.json
device-manager-ui/admin/package.json
+1
-0
device-manager/db/module.sql
device-manager/db/module.sql
+1
-1
device-manager/db/params.sql
device-manager/db/params.sql
+20
-15
device-manager/pom.xml
device-manager/pom.xml
+42
-0
device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
...er/src/main/java/com/mortals/xhx/common/key/Constant.java
+3
-0
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceModuleDistributeServiceImpl.java
...evice/service/impl/DeviceModuleDistributeServiceImpl.java
+0
-6
device-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
...com/mortals/xhx/module/product/web/ProductController.java
+1
-6
No files found.
device-manager-ui/admin/.env.production
View file @
d0cc8dad
# 生产环境配置
# 生产环境配置
NODE_ENV = production
NODE_ENV = production
# 地址
VUE_APP_BASE_API = http://192.168.0.251:9005/m
# websocket地址
# websocket地址
VUE_APP_WEBSOCKET_API =192.168.0.251:18222/m
VUE_APP_WEBSOCKET_API =192.168.0.251:18222/m
# 门户登录地址
# 门户登录地址
VUE_APP_PORTAL_URL =
http://192.168.0.251:11072
VUE_APP_PORTAL_URL =
/portal_home
# 站点请求地址
# 站点请求地址
...
...
device-manager-ui/admin/.env.test
View file @
d0cc8dad
...
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = http://192.168.0.98:11091/m
...
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = http://192.168.0.98:11091/m
VUE_APP_WEBSOCKET_API
=
192.168
.
0.98
:
18222
/
m
VUE_APP_WEBSOCKET_API
=
192.168
.
0.98
:
18222
/
m
# 门户登录地址
# 门户登录地址
VUE_APP_PORTAL_URL
=
http
://
192.168
.
0.98
:
11072
VUE_APP_PORTAL_URL
=
/
portal_home
# 站点请求地址
# 站点请求地址
...
...
device-manager-ui/admin/.env.yibin
0 → 100644
View file @
d0cc8dad
# 测试环境配置
NODE_ENV = production
# 地址
VUE_APP_BASE_API = http://192.168.2.144:11091/m
# websocket地址
VUE_APP_WEBSOCKET_API =192.168.2.144:18222/m
# 门户登录地址
VUE_APP_PORTAL_URL = /portal_home
# 站点请求地址
VUE_APP_SITETREE_URL = http://192.168.2.144:11078/base/site/siteTree
\ No newline at end of file
device-manager-ui/admin/package.json
View file @
d0cc8dad
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"dev"
:
"vue-cli-service serve"
,
"dev"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"build"
:
"vue-cli-service build"
,
"test"
:
"vue-cli-service build --mode test"
,
"test"
:
"vue-cli-service build --mode test"
,
"yibin"
:
"vue-cli-service build --mode yibin"
,
"build:prod"
:
"vue-cli-service build --model prod"
"build:prod"
:
"vue-cli-service build --model prod"
},
},
"dependencies"
:
{
"dependencies"
:
{
...
...
device-manager/db/module.sql
View file @
d0cc8dad
...
@@ -84,7 +84,7 @@ DROP TABLE IF EXISTS `mortals_xhx_product`;
...
@@ -84,7 +84,7 @@ DROP TABLE IF EXISTS `mortals_xhx_product`;
CREATE
TABLE
mortals_xhx_product
CREATE
TABLE
mortals_xhx_product
(
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'主键ID,主键,自增长'
,
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'主键ID,主键,自增长'
,
`platformId`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'关联平台'
,
`platformId`
bigint
(
20
)
NOT
NULL
COMMENT
'关联平台'
,
`productName`
varchar
(
20
)
NOT
NULL
COMMENT
'产品名称,名称唯一'
,
`productName`
varchar
(
20
)
NOT
NULL
COMMENT
'产品名称,名称唯一'
,
`productCode`
varchar
(
256
)
COMMENT
'产品编码'
,
`productCode`
varchar
(
256
)
COMMENT
'产品编码'
,
`skinId`
bigint
(
20
)
NOT
NULL
COMMENT
'皮肤id'
,
`skinId`
bigint
(
20
)
NOT
NULL
COMMENT
'皮肤id'
,
...
...
device-manager/db/params.sql
View file @
d0cc8dad
...
@@ -34,6 +34,11 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '日志类型,', 'DeviceLog', 'l
...
@@ -34,6 +34,11 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '日志类型,', 'DeviceLog', 'l
INSERT
INTO
`mortals_xhx_param`
VALUES
(
null
,
'数据获取方式'
,
'Device'
,
'deviceDataSourceWay'
,
'1'
,
'被动拉取'
,
1
,
4
,
0
,
'deviceDataSourceWay'
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`mortals_xhx_param`
VALUES
(
null
,
'数据获取方式'
,
'Device'
,
'deviceDataSourceWay'
,
'1'
,
'被动拉取'
,
1
,
4
,
0
,
'deviceDataSourceWay'
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`mortals_xhx_param`
VALUES
(
null
,
'服务对外接口地址'
,
NULL
,
NULL
,
'server_http_url'
,
'http://192.168.0.98:11078'
,
1
,
4
,
0
,
NULL
,
'2022-09-23 16:21:58'
,
1
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
VALUES
(
null
,
'设备资源部署细致'
,
NULL
,
NULL
,
'distribute_path'
,
'/home/publish/device-manager-ui/homeDeviceUrl'
,
1
,
4
,
0
,
NULL
,
'2022-11-14 10:02:41'
,
1
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
1
,
'排号系统'
,
'phxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-05-31 15:56:20'
,
1
,
'2022-07-02 11:46:48'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
1
,
'排号系统'
,
'phxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-05-31 15:56:20'
,
1
,
'2022-07-02 11:46:48'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
2
,
'无感一码通'
,
'noninductive'
,
0
,
'baidu.com'
,
''
,
1
,
'baidu.com'
,
'noninductivenoninductive'
,
1
,
'2022-07-07 15:24:31'
,
1
,
'2022-07-07 15:24:40'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
2
,
'无感一码通'
,
'noninductive'
,
0
,
'baidu.com'
,
''
,
1
,
'baidu.com'
,
'noninductivenoninductive'
,
1
,
'2022-07-07 15:24:31'
,
1
,
'2022-07-07 15:24:40'
);
...
@@ -41,18 +46,18 @@ INSERT INTO `mortals_xhx_platform` VALUES (3, '短信系统', 'information', 0,
...
@@ -41,18 +46,18 @@ INSERT INTO `mortals_xhx_platform` VALUES (3, '短信系统', 'information', 0,
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
4
,
'存取件平台'
,
'cqj'
,
0
,
'http://192.168.0.98:8090'
,
''
,
0
,
''
,
''
,
1
,
'2022-07-26 10:28:08'
,
1
,
'2022-07-29 10:09:11'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
4
,
'存取件平台'
,
'cqj'
,
0
,
'http://192.168.0.98:8090'
,
''
,
0
,
''
,
''
,
1
,
'2022-07-26 10:28:08'
,
1
,
'2022-07-29 10:09:11'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
5
,
'信息发布系统'
,
'xxfbxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-08-04 09:46:43'
,
1
,
'2022-08-04 14:52:56'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
5
,
'信息发布系统'
,
'xxfbxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-08-04 09:46:43'
,
1
,
'2022-08-04 14:52:56'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
6
,
'评价系统'
,
'pjxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-08-17 16:33:34'
,
1
,
'2022-08-17 16:34:22'
);
INSERT
INTO
`mortals_xhx_platform`
VALUES
(
6
,
'评价系统'
,
'pjxt'
,
0
,
'http://192.168.0.98:8090'
,
''
,
1
,
''
,
''
,
1
,
'2022-08-17 16:33:34'
,
1
,
'2022-08-17 16:34:22'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
1
,
1
,
'排队机'
,
'pdj'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/pdj/1920x1080'
,
NULL
,
''
,
1
,
'2022-05-12 10:35:18'
,
1
,
'2022-08-03 10:14:18'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
1
,
1
,
'排队机'
,
'pdj'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/pdj/1920x1080'
,
''
,
1
,
'2022-05-12 10:35:18'
,
1
,
'2022-08-03 10:14:18'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
2
,
1
,
'窗口屏'
,
'ckp'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/ckp/1920x1080'
,
NULL
,
'1111'
,
1
,
'2022-05-31 15:52:59'
,
1
,
'2022-08-01 16:59:54'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
2
,
1
,
'窗口屏'
,
'ckp'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/ckp/1920x1080'
,
'1111'
,
1
,
'2022-05-31 15:52:59'
,
1
,
'2022-08-01 16:59:54'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
3
,
1
,
'呼叫器'
,
'hjq'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/hjq/1920x1080'
,
NULL
,
''
,
1
,
'2022-05-31 15:53:12'
,
1
,
'2022-08-02 09:28:19'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
3
,
1
,
'呼叫器'
,
'hjq'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/hjq/1920x1080'
,
''
,
1
,
'2022-05-31 15:53:12'
,
1
,
'2022-08-02 09:28:19'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
4
,
1
,
'集中显示屏'
,
'jzxsp'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/jzxsp/1920x1080'
,
NULL
,
''
,
1
,
'2022-05-31 15:53:27'
,
1
,
'2022-08-02 09:28:28'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
4
,
1
,
'集中显示屏'
,
'jzxsp'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/jzxsp/1920x1080'
,
''
,
1
,
'2022-05-31 15:53:27'
,
1
,
'2022-08-02 09:28:28'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
5
,
1
,
'导视机'
,
'dsj'
,
NULL
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:53:41'
,
1
,
'2022-05-31 15:53:41'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
5
,
1
,
'导视机'
,
'dsj'
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:53:41'
,
1
,
'2022-05-31 15:53:41'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
6
,
1
,
'评价器'
,
'pjq'
,
1
,
'1920x1080'
,
'/homeDeviceUrl/pjq/1920x1080'
,
'http://www.ceshi.com'
,
''
,
1
,
'2022-05-31 15:53:55'
,
1
,
'2022-11-09 14:17:41'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
6
,
1
,
'评价器'
,
'pjq'
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:53:55'
,
1
,
'2022-09-19 09:41:01'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
7
,
1
,
'自助服务终端'
,
'zzfwzd'
,
NULL
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:09'
,
1
,
'2022-05-31 15:54:09'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
7
,
1
,
'自助服务终端'
,
'zzfwzd'
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:09'
,
1
,
'2022-05-31 15:54:09'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
8
,
1
,
'填单机'
,
'tdj'
,
NULL
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:20'
,
1
,
'2022-05-31 15:54:20'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
8
,
1
,
'填单机'
,
'tdj'
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:20'
,
1
,
'2022-05-31 15:54:20'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
9
,
1
,
'样表机'
,
'ybj'
,
NULL
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:29'
,
1
,
'2022-05-31 15:54:29'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
9
,
1
,
'样表机'
,
'ybj'
,
NULL
,
NULL
,
NULL
,
''
,
1
,
'2022-05-31 15:54:29'
,
1
,
'2022-05-31 15:54:29'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
10
,
2
,
'一码通'
,
'ymt'
,
NULL
,
NULL
,
NULL
,
NULL
,
'123'
,
1
,
'2022-07-12 15:08:51'
,
1
,
'2022-07-12 15:08:51'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
10
,
2
,
'一码通'
,
'ymt'
,
NULL
,
NULL
,
NULL
,
'123'
,
1
,
'2022-07-12 15:08:51'
,
1
,
'2022-07-12 15:08:51'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
11
,
1
,
'LED通屏'
,
'ledtp'
,
NULL
,
NULL
,
'http://www.baidu.com'
,
NULL
,
''
,
1
,
'2022-07-19 10:13:06'
,
1
,
'2022-07-19 10:13:06'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
11
,
1
,
'LED通屏'
,
'ledtp'
,
NULL
,
NULL
,
'http://www.baidu.com'
,
''
,
1
,
'2022-07-19 10:13:06'
,
1
,
'2022-07-19 10:13:06'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
13
,
4
,
'取件柜'
,
'qjg'
,
NULL
,
NULL
,
'http://www.baidu.com'
,
NULL
,
''
,
1
,
'2022-07-26 10:28:42'
,
1
,
'2022-07-26 10:28:42'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
13
,
4
,
'取件柜'
,
'qjg'
,
NULL
,
NULL
,
'http://www.baidu.com'
,
''
,
1
,
'2022-07-26 10:28:42'
,
1
,
'2022-07-26 10:28:42'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
14
,
5
,
'信息发布屏'
,
'xxfbp'
,
NULL
,
''
,
''
,
NULL
,
''
,
1
,
'2022-08-04 09:42:01'
,
1
,
'2022-08-04 09:46:51'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
14
,
5
,
'信息发布屏'
,
'xxfbp'
,
NULL
,
''
,
''
,
''
,
1
,
'2022-08-04 09:42:01'
,
1
,
'2022-08-04 09:46:51'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
15
,
6
,
'背靠背评价设备'
,
'bkb'
,
NULL
,
''
,
''
,
NULL
,
'背靠背评价设备'
,
1
,
'2022-08-17 16:35:05'
,
1
,
'2022-08-17 16:35:05'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
15
,
6
,
'背靠背评价设备'
,
'bkb'
,
NULL
,
''
,
''
,
'背靠背评价设备'
,
1
,
'2022-08-17 16:35:05'
,
1
,
'2022-08-17 16:35:05'
);
INSERT
INTO
`mortals_xhx_product`
VALUES
(
16
,
7
,
'数字样表机'
,
'szybj'
,
NULL
,
''
,
''
,
NULL
,
''
,
1
,
'2022-10-27 16:21:41'
,
1
,
'2022-10-27 16:21:41'
);
\ No newline at end of file
\ No newline at end of file
device-manager/pom.xml
View file @
d0cc8dad
...
@@ -137,6 +137,48 @@
...
@@ -137,6 +137,48 @@
<skipDeploy>
false
</skipDeploy>
<skipDeploy>
false
</skipDeploy>
</properties>
</properties>
</profile>
</profile>
<profile>
<id>
yibin
</id>
<properties>
<profiles.active>
yibin
</profiles.active>
<profiles.server.ip>
192.168.2.144
</profiles.server.ip>
<profiles.server.port>
17002
</profiles.server.port>
<profiles.nginx.port>
11099
</profiles.nginx.port>
<profiles.server.gatewayport>
11078
</profiles.server.gatewayport>
<profiles.server.path>
/sampleform
</profiles.server.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.server.port>
18222
</profiles.server.port>
<profiles.platform.type>
cloud
</profiles.platform.type>
<profiles.datasource.uri>
<![CDATA[jdbc:mysql://127.0.0.1:3306/device-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.password>
xhx@2022
</profiles.datasource.password>
<profiles.redis.uri>
127.0.0.1
</profiles.redis.uri>
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.rabbitmq.host>
192.168.2.144
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.password>
admin@2020
</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>
/
</profiles.rabbitmq.virtualhost>
<profiles.rabbitmq.exchange>
amp.direct
</profiles.rabbitmq.exchange>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.type>
3
</profiles.sms.type>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.filepath>
/home/mortals/app/data
</profiles.filepath>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.data.path>
/data
</profiles.data.path>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
yibin
</package.environment>
<skipDeploy>
false
</skipDeploy>
</properties>
</profile>
</profiles>
</profiles>
<properties>
<properties>
...
...
device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
View file @
d0cc8dad
...
@@ -117,6 +117,9 @@ public final class Constant {
...
@@ -117,6 +117,9 @@ public final class Constant {
*/
*/
public
static
final
String
PATH_SITETREE
=
"site/siteTree"
;
public
static
final
String
PATH_SITETREE
=
"site/siteTree"
;
/**
* 应用部署目录
*/
public
static
final
String
DISTRIBUTE_PATH
=
"distribute_path"
;
public
static
final
String
DISTRIBUTE_PATH
=
"distribute_path"
;
/**
/**
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceModuleDistributeServiceImpl.java
View file @
d0cc8dad
...
@@ -74,21 +74,15 @@ public class DeviceModuleDistributeServiceImpl extends AbstractCRUDServiceImpl<D
...
@@ -74,21 +74,15 @@ public class DeviceModuleDistributeServiceImpl extends AbstractCRUDServiceImpl<D
//部署路径是否存在 如果不存在 创建目录,
//部署路径是否存在 如果不存在 创建目录,
String
path
=
GlobalSysInfo
.
getParamValue
(
Constant
.
DISTRIBUTE_PATH
,
"/home/publish/device-manager-ui/homeDeviceUrl"
);
String
path
=
GlobalSysInfo
.
getParamValue
(
Constant
.
DISTRIBUTE_PATH
,
"/home/publish/device-manager-ui/homeDeviceUrl"
);
String
code
=
distributeEntity
.
getProductCode
();
String
code
=
distributeEntity
.
getProductCode
();
String
imageRe
=
distributeEntity
.
getImageResolutionValue
();
String
imageRe
=
distributeEntity
.
getImageResolutionValue
();
String
disPath
=
"/"
+
path
+
"/"
+
code
+
"/"
+
imageRe
;
String
disPath
=
"/"
+
path
+
"/"
+
code
+
"/"
+
imageRe
;
//判断目标目录是否存在 如果存在 这删除
//判断目标目录是否存在 如果存在 这删除
if
(
FileUtil
.
isDirectory
(
disPath
))
{
if
(
FileUtil
.
isDirectory
(
disPath
))
{
FileUtil
.
del
(
disPath
);
FileUtil
.
del
(
disPath
);
}
}
ZipUtils
.
unzip
(
new
File
(
targetFilePath
),
disPath
);
ZipUtils
.
unzip
(
new
File
(
targetFilePath
),
disPath
);
// ZipUtil.unzip(targetFilePath, disPath);
//更新
//更新
distributeEntity
.
setDistributeFilePath
(
disPath
);
distributeEntity
.
setDistributeFilePath
(
disPath
);
distributeEntity
.
setDistribute
(
YesNoEnum
.
YES
.
getValue
());
distributeEntity
.
setDistribute
(
YesNoEnum
.
YES
.
getValue
());
...
...
device-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
View file @
d0cc8dad
...
@@ -2,15 +2,12 @@ package com.mortals.xhx.module.product.web;
...
@@ -2,15 +2,12 @@ package com.mortals.xhx.module.product.web;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.skin.SkinBasePdu
;
import
com.mortals.xhx.common.pdu.skin.SkinBasePdu
;
import
com.mortals.xhx.feign.skin.ISkinBaseFeign
;
import
com.mortals.xhx.feign.skin.ISkinBaseFeign
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.platform.model.PlatformQuery
;
import
com.mortals.xhx.module.platform.model.PlatformQuery
;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
...
@@ -51,11 +48,9 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
...
@@ -51,11 +48,9 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
//获取所有产品皮肤 分组显示
//获取所有产品皮肤 分组显示
Rest
<
RespData
<
List
<
SkinBasePdu
>>>
resp
=
skinBaseFeign
.
list
(
new
SkinBasePdu
());
Rest
<
RespData
<
List
<
SkinBasePdu
>>>
resp
=
skinBaseFeign
.
list
(
new
SkinBasePdu
());
if
(
resp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
if
(
resp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
()
==
null
?
""
:
a
.
getImageResolution
(),
b
->
b
.
getImageResolutionValue
()
==
null
?
""
:
b
.
getImageResolutionValue
(),
(
o
,
n
)
->
n
)));
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
()
==
null
?
""
:
a
.
getImageResolution
()
+
""
,
b
->
b
.
getImageResolutionValue
()
==
null
?
""
:
b
.
getImageResolutionValue
(),
(
o
,
n
)
->
n
)));
this
.
addDict
(
model
,
"skinProductCodeMap"
,
skinProductCodeMap
);
this
.
addDict
(
model
,
"skinProductCodeMap"
,
skinProductCodeMap
);
}
}
this
.
addDict
(
model
,
"platformId"
,
platformService
.
find
(
new
PlatformQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getPlatformName
())));
this
.
addDict
(
model
,
"platformId"
,
platformService
.
find
(
new
PlatformQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getPlatformName
())));
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
...
...
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