Merge remote-tracking branch 'origin/master' into 重构/1078
# Conflicts: # src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java # src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java # src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java # src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java # 数据库/2.7.3/初始化-mysql-2.7.3.sql # 数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql
This commit is contained in:
@@ -9,6 +9,7 @@ public enum ErrorCode {
|
||||
ERROR400(400, "参数或方法错误"),
|
||||
ERROR404(404, "资源未找到"),
|
||||
ERROR403(403, "无权限操作"),
|
||||
ERROR486(486, "超时或无响应"),
|
||||
ERROR401(401, "请登录后重新请求"),
|
||||
ERROR408(408, "请求超时"),
|
||||
ERROR500(500, "系统异常");
|
||||
|
||||
@@ -110,10 +110,7 @@ public class CloudRecordController {
|
||||
}
|
||||
mediaServers.add(mediaServer);
|
||||
} else {
|
||||
mediaServers = mediaServerService.getAllOnlineList();
|
||||
}
|
||||
if (mediaServers.isEmpty()) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "当前无流媒体");
|
||||
mediaServers = null;
|
||||
}
|
||||
if (query != null && ObjectUtils.isEmpty(query.trim())) {
|
||||
query = null;
|
||||
@@ -342,10 +339,7 @@ public class CloudRecordController {
|
||||
}
|
||||
mediaServers.add(mediaServer);
|
||||
} else {
|
||||
mediaServers = mediaServerService.getAll();
|
||||
}
|
||||
if (mediaServers.isEmpty()) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "当前无流媒体");
|
||||
mediaServers = null;
|
||||
}
|
||||
if (query != null && ObjectUtils.isEmpty(query.trim())) {
|
||||
query = null;
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.common.SystemAllInfo;
|
||||
import com.genersoft.iot.vmp.common.VersionPo;
|
||||
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
|
||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.conf.VersionInfo;
|
||||
@@ -42,10 +43,7 @@ import oshi.software.os.OperatingSystem;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Tag(name = "服务控制")
|
||||
@@ -225,7 +223,7 @@ public class ServerController {
|
||||
}
|
||||
|
||||
@GetMapping(value = "/config")
|
||||
@Operation(summary = "获取配置信息")
|
||||
@Operation(summary = "获取配置信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "type", description = "配置类型(sip, base)", required = true)
|
||||
@ResponseBody
|
||||
public JSONObject getVersion(String type) {
|
||||
@@ -252,7 +250,7 @@ public class ServerController {
|
||||
|
||||
@GetMapping(value = "/system/info")
|
||||
@ResponseBody
|
||||
@Operation(summary = "获取系统信息")
|
||||
@Operation(summary = "获取系统信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public SystemAllInfo getSystemInfo() {
|
||||
SystemAllInfo systemAllInfo = redisCatchStorage.getSystemInfo();
|
||||
|
||||
@@ -261,7 +259,7 @@ public class ServerController {
|
||||
|
||||
@GetMapping(value = "/media_server/load")
|
||||
@ResponseBody
|
||||
@Operation(summary = "获取负载信息")
|
||||
@Operation(summary = "获取负载信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public List<MediaServerLoad> getMediaLoad() {
|
||||
List<MediaServerLoad> result = new ArrayList<>();
|
||||
List<MediaServer> allOnline = mediaServerService.getAllOnline();
|
||||
@@ -277,7 +275,7 @@ public class ServerController {
|
||||
|
||||
@GetMapping(value = "/resource/info")
|
||||
@ResponseBody
|
||||
@Operation(summary = "获取负载信息")
|
||||
@Operation(summary = "获取负载信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public ResourceInfo getResourceInfo() {
|
||||
ResourceInfo result = new ResourceInfo();
|
||||
ResourceBaseInfo deviceInfo = deviceService.getOverview();
|
||||
@@ -294,7 +292,7 @@ public class ServerController {
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ResponseBody
|
||||
@Operation(summary = "获取系统信息")
|
||||
@Operation(summary = "获取系统信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public Map<String, Map<String, String>> getInfo() {
|
||||
Map<String, Map<String, String>> result = new LinkedHashMap<>();
|
||||
Map<String, String> hardwareMap = new LinkedHashMap<>();
|
||||
@@ -346,6 +344,20 @@ public class ServerController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping(value = "/channel/datatype")
|
||||
@ResponseBody
|
||||
@Operation(summary = "获取系统接入的数据类型", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public List<Map<String, Object>> getDataType() {
|
||||
List<Map<String, Object>> result = new LinkedList<>();
|
||||
for (ChannelDataType item : ChannelDataType.values()) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("key", item.desc);
|
||||
map.put("value", item.value);
|
||||
result.add(map);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单位转换
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user