临时提交

This commit is contained in:
lin
2025-10-24 16:23:07 +08:00
parent d132e35094
commit d029fb7adb
7 changed files with 57 additions and 24 deletions

View File

@@ -665,4 +665,7 @@ public interface CommonGBChannelMapper {
@SelectProvider(type = ChannelProvider.class, method = "queryOldChanelListByChannels")
List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList);
@SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList")
List<CameraChannel> queryMeetingChannelList(String business);
}

View File

@@ -567,13 +567,14 @@ public class ChannelProvider {
public String queryListForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) AND coalesce(wdc.gb_parent_id, wdc.parent_id) = #{groupDeviceId}");
sqlBuild.append(" where wdc.channel_type != 0 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) AND coalesce(wdc.gb_parent_id, wdc.parent_id) = #{groupDeviceId}");
if (params.get("online") != null && (Boolean)params.get("online")) {
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'");
}
if (params.get("online") != null && !(Boolean)params.get("online")) {
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'OFF'");
}
sqlBuild.append(" order by coalesce(wdc.gb_status, wdc.status) desc");
return sqlBuild.toString();
}
@@ -581,7 +582,7 @@ public class ChannelProvider {
public String queryListWithChildForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -654,7 +655,7 @@ public class ChannelProvider {
public String queryListInBox(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -682,7 +683,7 @@ public class ChannelProvider {
public String queryListInCircleForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -711,7 +712,7 @@ public class ChannelProvider {
public String queryListInCircleForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -740,7 +741,7 @@ public class ChannelProvider {
public String queryListInPolygonForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -778,7 +779,7 @@ public class ChannelProvider {
public String queryListInPolygonForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " +
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
@@ -836,19 +837,11 @@ public class ChannelProvider {
public String queryListByDeviceIds(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append("<script> ");
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where coalesce(wdc.gb_device_id, wdc.device_id) in ( ");
List<String> deviceIds = (List<String>)params.get("deviceIds");
boolean first = true;
for (String deviceId : deviceIds) {
if (!first) {
sqlBuild.append(",");
}
sqlBuild.append(deviceId);
first = false;
}
sqlBuild.append(" )");
sqlBuild.append(" where coalesce(wdc.gb_device_id, wdc.device_id) in ");
sqlBuild.append(" <foreach item='item' index='index' collection='deviceIds' open='(' separator=',' close=')'> #{item} </foreach>");
sqlBuild.append(" </script>");
return sqlBuild.toString() ;
}
@@ -873,13 +866,20 @@ public class ChannelProvider {
public String queryListForSyMobile(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" WHERE wdc.gb_ptz_type = 99 ");
sqlBuild.append(" WHERE wdc.gb_ptz_type = 99 and wdc.channel_type != 1 ");
if (params.get("business") != null) {
sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}");
}
return sqlBuild.toString();
}
public String queryMeetingChannelList(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" WHERE wdc.channel_type = 2 and wdc.gb_ptz_type = 98 and coalesce(gb_business_group_id, business_group_id) = #{business}");
return sqlBuild.toString();
}
public String queryCameraChannelById(Map<String, Object> params ){
return BASE_SQL_FOR_CAMERA_DEVICE + " where wdc.id = #{gbId}";

View File

@@ -93,4 +93,5 @@ public interface IStreamProxyService {
StreamProxy getStreamProxy(int id);
void delete(int id);
}

View File

@@ -13,6 +13,7 @@ import com.genersoft.iot.vmp.service.bean.CloudRecordItem;
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.streamProxy.service.IStreamProxyService;
import com.genersoft.iot.vmp.streamPush.service.IStreamPushPlayService;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.utils.HttpUtils;
@@ -70,6 +71,9 @@ public class CameraChannelController {
@Autowired
private IStreamPushPlayService streamPushPlayService;
@Autowired
private IStreamProxyService streamProxyService;
@GetMapping(value = "/camera/list")
@ResponseBody
@@ -550,4 +554,14 @@ public class CameraChannelController {
public void stop(String app, String stream){
streamPushPlayService.stop(app, stream);
}
@GetMapping(value = "/camera/meeting/list")
@ResponseBody
@Operation(summary = "查询拉流代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "topGroupAlias", description = "分组别名")
public List<CameraChannel> queryMeetingChannelList(String topGroupAlias){
return channelService.queryMeetingChannelList(topGroupAlias);
}
}

View File

@@ -45,6 +45,10 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
chain.doFilter(request, response);
return;
}
// if (request.getParameter("ccerty") != null) {
// chain.doFilter(request, response);
// return;
// }
// 设置响应内容类型
response.setContentType("application/json;charset=UTF-8");
@@ -150,9 +154,11 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
}catch (Exception e) {
log.info("[SY-接口验签] 读取body失败, 请求地址: {} ", requestURI, e);
response.setStatus(Response.OK);
PrintWriter out = response.getWriter();
out.println(getErrorResult(6017, "接口鉴权异常"));
out.close();
if (!response.isCommitted()) {
PrintWriter out = response.getWriter();
out.println(getErrorResult(6017, "接口鉴权异常"));
out.close();
}
return;
}
chain.doFilter(request, response);

View File

@@ -635,4 +635,12 @@ public class CameraChannelService implements CommandLineRunner {
}
public List<CameraChannel> queryMeetingChannelList(String topGroupAlias) {
CameraGroup cameraGroup = groupMapper.queryGroupByAlias(topGroupAlias);
Assert.notNull(cameraGroup, "域不存在");
String business = cameraGroup.getDeviceId();
Assert.notNull(business, "域不存在");
return channelMapper.queryMeetingChannelList(business);
}
}