临时提交
parent
d720275ada
commit
86879aa58d
|
@ -18,16 +18,13 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
|
||||||
@Tag(name = "媒体流相关")
|
@Tag(name = "媒体流相关")
|
||||||
@Controller
|
@RestController
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequestMapping(value = "/api/media")
|
@RequestMapping(value = "/api/media")
|
||||||
public class MediaController {
|
public class MediaController {
|
||||||
|
|
|
@ -122,8 +122,8 @@ public class ChannelProvider {
|
||||||
sqlBuild.append(BASE_SQL);
|
sqlBuild.append(BASE_SQL);
|
||||||
sqlBuild.append(" where channel_type = 0 ");
|
sqlBuild.append(" where channel_type = 0 ");
|
||||||
if (params.get("query") != null) {
|
if (params.get("query") != null) {
|
||||||
sqlBuild.append(" AND (coalesce(gb_device_id, device_id) LIKE concat('%',#{query},'%')" +
|
sqlBuild.append(" AND (coalesce(gb_device_id, device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||||
" OR coalesce(gb_name, name) LIKE concat('%',#{query},'%') )")
|
" OR coalesce(gb_name, name) LIKE concat('%',#{query},'%') escape '/' )")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (params.get("online") != null && (Boolean)params.get("online")) {
|
if (params.get("online") != null && (Boolean)params.get("online")) {
|
||||||
|
@ -154,8 +154,8 @@ public class ChannelProvider {
|
||||||
sqlBuild.append(BASE_SQL);
|
sqlBuild.append(BASE_SQL);
|
||||||
sqlBuild.append(" where channel_type = 0 ");
|
sqlBuild.append(" where channel_type = 0 ");
|
||||||
if (params.get("query") != null) {
|
if (params.get("query") != null) {
|
||||||
sqlBuild.append(" AND (coalesce(gb_device_id, device_id) LIKE concat('%',#{query},'%')" +
|
sqlBuild.append(" AND (coalesce(gb_device_id, device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||||
" OR coalesce(gb_name, name) LIKE concat('%',#{query},'%') )")
|
" OR coalesce(gb_name, name) LIKE concat('%',#{query},'%') escape '/' )")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (params.get("online") != null && (Boolean)params.get("online")) {
|
if (params.get("online") != null && (Boolean)params.get("online")) {
|
||||||
|
|
|
@ -71,8 +71,8 @@ public class DeviceChannelProvider {
|
||||||
"OR (LENGTH(coalesce(dc.gb_device_id, dc.device_id))=LENGTH(#{civilCode}) + 2) AND coalesce(dc.gb_device_id, dc.device_id) LIKE concat(#{civilCode},'%'))");
|
"OR (LENGTH(coalesce(dc.gb_device_id, dc.device_id))=LENGTH(#{civilCode}) + 2) AND coalesce(dc.gb_device_id, dc.device_id) LIKE concat(#{civilCode},'%'))");
|
||||||
}
|
}
|
||||||
if (params.get("query") != null && !ObjectUtils.isEmpty(params.get("query"))) {
|
if (params.get("query") != null && !ObjectUtils.isEmpty(params.get("query"))) {
|
||||||
sqlBuild.append(" AND (coalesce(dc.gb_device_id, dc.device_id) LIKE concat('%',#{query},'%')" +
|
sqlBuild.append(" AND (coalesce(dc.gb_device_id, dc.device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||||
" OR coalesce(dc.gb_name, dc.name) LIKE concat('%',#{query},'%'))")
|
" OR coalesce(dc.gb_name, dc.name) LIKE concat('%',#{query},'%') escape '/')")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (params.get("online") != null && (Boolean)params.get("online")) {
|
if (params.get("online") != null && (Boolean)params.get("online")) {
|
||||||
|
|
|
@ -609,6 +609,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
parentId = channelId;
|
parentId = channelId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
List<DeviceChannel> all = channelMapper.queryChannels(deviceDbId, civilCode, businessGroupId, parentId, query, channelType, online,null);
|
List<DeviceChannel> all = channelMapper.queryChannels(deviceDbId, civilCode, businessGroupId, parentId, query, channelType, online,null);
|
||||||
return new PageInfo<>(all);
|
return new PageInfo<>(all);
|
||||||
}
|
}
|
||||||
|
@ -624,7 +629,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
if (device == null) {
|
if (device == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到设备:" + deviceId);
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到设备:" + deviceId);
|
||||||
}
|
}
|
||||||
// 获取到所有正在播放的流
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
List<DeviceChannel> all = channelMapper.queryChannels(device.getId(), null,null, null, query, hasSubChannel, online,null);
|
List<DeviceChannel> all = channelMapper.queryChannels(device.getId(), null,null, null, query, hasSubChannel, online,null);
|
||||||
return new PageInfo<>(all);
|
return new PageInfo<>(all);
|
||||||
|
|
|
@ -390,6 +390,11 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<CommonGBChannel> queryListByCivilCode(int page, int count, String query, Boolean online, Integer channelType, String civilCode) {
|
public PageInfo<CommonGBChannel> queryListByCivilCode(int page, int count, String query, Boolean online, Integer channelType, String civilCode) {
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
List<CommonGBChannel> all = commonGBChannelMapper.queryListByCivilCode(query, online, channelType, civilCode);
|
List<CommonGBChannel> all = commonGBChannelMapper.queryListByCivilCode(query, online, channelType, civilCode);
|
||||||
return new PageInfo<>(all);
|
return new PageInfo<>(all);
|
||||||
}
|
}
|
||||||
|
@ -397,6 +402,11 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<CommonGBChannel> queryListByParentId(int page, int count, String query, Boolean online, Integer channelType, String groupDeviceId) {
|
public PageInfo<CommonGBChannel> queryListByParentId(int page, int count, String query, Boolean online, Integer channelType, String groupDeviceId) {
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
List<CommonGBChannel> all = commonGBChannelMapper.queryListByParentId(query, online, channelType, groupDeviceId);
|
List<CommonGBChannel> all = commonGBChannelMapper.queryListByParentId(query, online, channelType, groupDeviceId);
|
||||||
return new PageInfo<>(all);
|
return new PageInfo<>(all);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Map;
|
||||||
* 拉流代理接口
|
* 拉流代理接口
|
||||||
*/
|
*/
|
||||||
@Tag(name = "拉流代理", description = "")
|
@Tag(name = "拉流代理", description = "")
|
||||||
@Controller
|
@RestController
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequestMapping(value = "/api/proxy")
|
@RequestMapping(value = "/api/proxy")
|
||||||
public class StreamProxyController {
|
public class StreamProxyController {
|
||||||
|
|
|
@ -43,7 +43,7 @@ import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Tag(name = "推流信息管理")
|
@Tag(name = "推流信息管理")
|
||||||
@Controller
|
@RestController
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequestMapping(value = "/api/push")
|
@RequestMapping(value = "/api/push")
|
||||||
public class StreamPushController {
|
public class StreamPushController {
|
||||||
|
|
Loading…
Reference in New Issue