Commit e0e2f9bf authored by 赵啸非's avatar 赵啸非

添加批量激活设备

parent 5cec7d47
package com.mortals.xhx.busiz.web;
import cn.hutool.core.net.URLDecoder;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.URLUtil;
......@@ -64,6 +65,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
......@@ -909,7 +911,9 @@ public class DeviceApiController {
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.3.24:11078");
//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);
log.info("homeurl:" + serverInfo.getHomeUrl());
serverInfo.setEventUrl(productEntity.getEventUrl());
......@@ -935,6 +939,14 @@ public class DeviceApiController {
UrlBuilder urlBuilder = UrlBuilder.ofHttp(domain).addPath("test");
System.out.println(urlBuilder.build());
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));
......
......@@ -97,7 +97,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao
@Override
public void active(AppPublishEntity appPublishEntity, Context context) {
if (AppTypeEnum.前端.getValue() == appPublishEntity.getAppType()) {
String targetFilePath = uploadService.getFilePath(appPublishEntity.getFilePath());
String targetFilePath = appPublishEntity.getFilePath();
String disPath = "/home/publish/" + appPublishEntity.getAppCode();
boolean directory = FileUtil.isDirectory(new File(disPath));
if (directory) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment