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
e0e2f9bf
Commit
e0e2f9bf
authored
Feb 02, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加批量激活设备
parent
5cec7d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+14
-2
device-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppPublishServiceImpl.java
...ls/xhx/module/app/service/impl/AppPublishServiceImpl.java
+1
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
e0e2f9bf
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
cn.hutool.core.net.URLDecoder
;
import
cn.hutool.core.net.url.UrlBuilder
;
import
cn.hutool.core.net.url.UrlBuilder
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.URLUtil
;
import
cn.hutool.core.util.URLUtil
;
...
@@ -64,6 +65,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -64,6 +65,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.URL
;
import
java.net.URL
;
import
java.nio.charset.Charset
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -909,7 +911,9 @@ public class DeviceApiController {
...
@@ -909,7 +911,9 @@ public class DeviceApiController {
String
domain
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_HTTP_URL
,
"http://192.168.3.24:11078"
);
String
domain
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_HTTP_URL
,
"http://192.168.3.24:11078"
);
//domain+homeUrl;
//domain+homeUrl;
serverInfo
.
setHomeUrl
(
UrlBuilder
.
of
(
domain
.
trim
()).
addPath
(
homeUrl
).
toString
());
String
str
=
UrlBuilder
.
of
(
domain
.
trim
()).
addPath
(
homeUrl
).
build
();
String
decodeStr
=
URLDecoder
.
decode
(
str
,
Charset
.
defaultCharset
());
serverInfo
.
setHomeUrl
(
decodeStr
);
//serverInfo.setHomeUrl(domain + "/" + homeUrl);
//serverInfo.setHomeUrl(domain + "/" + homeUrl);
log
.
info
(
"homeurl:"
+
serverInfo
.
getHomeUrl
());
log
.
info
(
"homeurl:"
+
serverInfo
.
getHomeUrl
());
serverInfo
.
setEventUrl
(
productEntity
.
getEventUrl
());
serverInfo
.
setEventUrl
(
productEntity
.
getEventUrl
());
...
@@ -935,7 +939,15 @@ public class DeviceApiController {
...
@@ -935,7 +939,15 @@ public class DeviceApiController {
UrlBuilder
urlBuilder
=
UrlBuilder
.
ofHttp
(
domain
).
addPath
(
"test"
);
UrlBuilder
urlBuilder
=
UrlBuilder
.
ofHttp
(
domain
).
addPath
(
"test"
);
System
.
out
.
println
(
urlBuilder
.
build
());
System
.
out
.
println
(
urlBuilder
.
build
());
//URL url = URLUtil.url(domain);
String
str
=
"http://10.12.185.213:11078/homeDeviceUrl%2Fdsj%2F1920x1080"
;
System
.
out
.
println
(
str
);
String
decode
=
URLDecoder
.
decode
(
str
,
Charset
.
defaultCharset
());
System
.
out
.
println
(
decode
);
//URL url = URLUtil.url(domain);
// System.out.println(StrUtil.removeAllLineBreaks(domain));
// System.out.println(StrUtil.removeAllLineBreaks(domain));
...
...
device-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppPublishServiceImpl.java
View file @
e0e2f9bf
...
@@ -97,7 +97,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao
...
@@ -97,7 +97,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao
@Override
@Override
public
void
active
(
AppPublishEntity
appPublishEntity
,
Context
context
)
{
public
void
active
(
AppPublishEntity
appPublishEntity
,
Context
context
)
{
if
(
AppTypeEnum
.
前端
.
getValue
()
==
appPublishEntity
.
getAppType
())
{
if
(
AppTypeEnum
.
前端
.
getValue
()
==
appPublishEntity
.
getAppType
())
{
String
targetFilePath
=
uploadService
.
getFilePath
(
appPublishEntity
.
getFilePath
()
);
String
targetFilePath
=
appPublishEntity
.
getFilePath
(
);
String
disPath
=
"/home/publish/"
+
appPublishEntity
.
getAppCode
();
String
disPath
=
"/home/publish/"
+
appPublishEntity
.
getAppCode
();
boolean
directory
=
FileUtil
.
isDirectory
(
new
File
(
disPath
));
boolean
directory
=
FileUtil
.
isDirectory
(
new
File
(
disPath
));
if
(
directory
)
{
if
(
directory
)
{
...
...
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