Commit 2752a50d authored by 赵啸非's avatar 赵啸非

修改pom文件

parent bc7429ca
......@@ -70,18 +70,12 @@ public class CaptureStartedService implements IApplicationStartedService {
continue;
}
//读取窗口id
Integer windowId = 0;
boolean exist = FileUtil.exist(confPath);
if (exist) {
Props props = new Props(confPath);
//获取窗口id 默认值为0
windowId = props.getInt("windowId", 0);
}
log.info("start deviceName:{},ip:{}, is ipv4:{}", device.getName(), ip, ipv4);
Map<String, Set<String>> filterMap = DestInfo.build();
//String redirectUrl = "";
CaptureThread captureThread = new CaptureThread(device, hcpUrl, hcpGovUrl, filterMap, windowId);
CaptureThread captureThread = new CaptureThread(device, hcpUrl, hcpGovUrl, filterMap,confPath);
ThreadPool.getInstance().execute(captureThread);
}
} catch (Exception e) {
......
package com.mortals.xhx.daemon.applicationservice;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.net.Ipv4Util;
import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.setting.dialect.Props;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.mortals.framework.common.Rest;
......@@ -48,7 +50,8 @@ public class CaptureThread implements Runnable {
private String redirectUrl;
private String hcpGovUrl;
private Map<String, Set<String>> filterMap;
private Integer windowId;
private String confPath;
@Override
public void run() {
......@@ -229,16 +232,25 @@ public class CaptureThread implements Runnable {
return;
}
//读取窗口id
Integer windowId = 0;
boolean exist = FileUtil.exist(confPath);
if (!exist) {
log.info("配置文件不存在,返回!");
return;
}
Props props = new Props(confPath);
//获取窗口id 默认值为0
windowId = props.getInt("windowId", 0);
//读取当前设置的窗口id
HcpReq hcpReq = new HcpReq();
/* HcpReq hcpReq = new HcpReq();
hcpReq.setWindowid(windowId);//todo 读取窗口 共享文件
String hcpUrl = hcpGovUrl + "?affairCode=" + affairCode;
hcpReq.setUrl(hcpUrl);
String body = JSON.toJSONString(hcpReq);
// log.info("req url:{},body:{}", url, body);
// log.info("req url:{},body:{}", url, body);*/
String hcpUrl = hcpGovUrl + "?affairCode=" + affairCode;
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("url", hcpUrl);
paramMap.put("windowid", windowId);
......
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