内网访问图片
This commit is contained in:
parent
94f4d6cddc
commit
e255264a01
@ -206,6 +206,12 @@ public class HikvisionCall {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
private static String xingzongIscIpPort;
|
||||
|
||||
@Value("${xingzongIscIpPort:}")
|
||||
public void setXingzongIscIpPort(String xingzongIscIpPort) {
|
||||
HikvisionCall.xingzongIscIpPort = xingzongIscIpPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片
|
||||
@ -229,7 +235,11 @@ public class HikvisionCall {
|
||||
JSONObject rsJo = JSONObject.parseObject(rs);
|
||||
String code = rsJo.getString("code");
|
||||
if (Objects.equals(code, "0")) {
|
||||
return rsJo.getJSONObject("data").getString("picUrl");
|
||||
String picUrl = rsJo.getJSONObject("data").getString("picUrl");
|
||||
if (EnvironmentUtil.isXingZong()) {
|
||||
picUrl = picUrl.replaceAll("^https:\\/\\/[^/]+\\/", xingzongIscIpPort);
|
||||
}
|
||||
return picUrl;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -73,3 +73,4 @@ spring.datasource.db2.jdbc-url=jdbc:mysql://127.0.0.1:3306/wflow_pro?useUnicode=
|
||||
spring.datasource.db2.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.db2.username=root
|
||||
spring.datasource.db2.password=JXJ@admin
|
||||
xingzongIscIpPort=https://10.168.1.100:6113/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user