commit
c8b6ed5823
|
@ -162,11 +162,13 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||||
private void processMessageCatalogList(RequestEvent evt) {
|
private void processMessageCatalogList(RequestEvent evt) {
|
||||||
try {
|
try {
|
||||||
Element rootElement = getRootElement(evt);
|
Element rootElement = getRootElement(evt);
|
||||||
|
String name = rootElement.getName();
|
||||||
Element deviceIdElement = rootElement.element("DeviceID");
|
Element deviceIdElement = rootElement.element("DeviceID");
|
||||||
String deviceId = deviceIdElement.getText();
|
String deviceId = deviceIdElement.getText();
|
||||||
Element deviceListElement = rootElement.element("DeviceList");
|
Element deviceListElement = rootElement.element("DeviceList");
|
||||||
if (deviceListElement == null) { // 存在DeviceList则为响应 catalog, 不存在DeviceList则为查询请求
|
// if (deviceListElement == null) { // 存在DeviceList则为响应 catalog, 不存在DeviceList则为查询请求
|
||||||
// TODO 后续将代码拆分
|
if (name == "Query") { // 区分是Response——查询响应,还是Query——查询请求
|
||||||
|
// TODO 后续将代码拆分
|
||||||
ParentPlatform parentPlatform = storager.queryParentPlatById(deviceId);
|
ParentPlatform parentPlatform = storager.queryParentPlatById(deviceId);
|
||||||
if (parentPlatform == null) {
|
if (parentPlatform == null) {
|
||||||
response404Ack(evt);
|
response404Ack(evt);
|
||||||
|
|
|
@ -63,6 +63,7 @@ public interface DeviceChannelMapper {
|
||||||
" WHERE 1=1 " +
|
" WHERE 1=1 " +
|
||||||
" <if test=\"hasSubChannel == true\" > AND subCount >0</if>" +
|
" <if test=\"hasSubChannel == true\" > AND subCount >0</if>" +
|
||||||
" <if test=\"hasSubChannel == false\" > AND subCount=0</if>" +
|
" <if test=\"hasSubChannel == false\" > AND subCount=0</if>" +
|
||||||
|
" ORDER BY channelId ASC" +
|
||||||
" </script>"})
|
" </script>"})
|
||||||
List<DeviceChannel> queryChannelsByDeviceId(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online);
|
List<DeviceChannel> queryChannelsByDeviceId(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online);
|
||||||
|
|
||||||
|
@ -96,6 +97,7 @@ public interface DeviceChannelMapper {
|
||||||
" <if test=\"hasSubChannel!= null and hasSubChannel == false\" > AND subCount=0</if> " +
|
" <if test=\"hasSubChannel!= null and hasSubChannel == false\" > AND subCount=0</if> " +
|
||||||
" <if test=\"platformId != null and inPlatform == true \" > AND platformId='${platformId}'</if> " +
|
" <if test=\"platformId != null and inPlatform == true \" > AND platformId='${platformId}'</if> " +
|
||||||
" <if test=\"platformId != null and inPlatform == false \" > AND (platformId != '${platformId}' OR platformId is NULL ) </if> " +
|
" <if test=\"platformId != null and inPlatform == false \" > AND (platformId != '${platformId}' OR platformId is NULL ) </if> " +
|
||||||
|
" ORDER BY deviceId, channelId ASC" +
|
||||||
" </script>"})
|
" </script>"})
|
||||||
|
|
||||||
List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, Boolean inPlatform);
|
List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, Boolean inPlatform);
|
||||||
|
|
|
@ -51,7 +51,7 @@ public interface ParentPlatformMapper {
|
||||||
@Select("SELECT * FROM parent_platform WHERE enable=#{enable}")
|
@Select("SELECT * FROM parent_platform WHERE enable=#{enable}")
|
||||||
List<ParentPlatform> getEnableParentPlatformList(boolean enable);
|
List<ParentPlatform> getEnableParentPlatformList(boolean enable);
|
||||||
|
|
||||||
@Select("SELECT * FROM parent_platform WHERE deviceGBId=#{platformGbId}")
|
@Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}")
|
||||||
ParentPlatform getParentPlatById(String platformGbId);
|
ParentPlatform getParentPlatById(String platformGbId);
|
||||||
|
|
||||||
@Update("UPDATE parent_platform SET status=false" )
|
@Update("UPDATE parent_platform SET status=false" )
|
||||||
|
|
|
@ -18,7 +18,7 @@ public interface PatformChannelMapper {
|
||||||
*/
|
*/
|
||||||
@Select("<script> "+
|
@Select("<script> "+
|
||||||
"SELECT deviceAndChannelId FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceAndChannelId in" +
|
"SELECT deviceAndChannelId FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceAndChannelId in" +
|
||||||
"<foreach collection='deviceAndChannelIds' open='(' item='id_' separator=',' close=')'> '${id_}'</foreach>" +
|
"<foreach collection='deviceAndChannelIds' open='(' item='id_' separator=',' close=')'> '${id_}'</foreach> ORDER BY deviceAndChannelId ASC" +
|
||||||
"</script>")
|
"</script>")
|
||||||
List<String> findChannelRelatedPlatform(String platformId, List<String> deviceAndChannelIds);
|
List<String> findChannelRelatedPlatform(String platformId, List<String> deviceAndChannelIds);
|
||||||
|
|
||||||
|
|
|
@ -231,14 +231,14 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
|
||||||
@Override
|
@Override
|
||||||
public boolean updateParentPlatform(ParentPlatform parentPlatform) {
|
public boolean updateParentPlatform(ParentPlatform parentPlatform) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getDeviceGBId());
|
ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
|
||||||
if ( platformMapper.getParentPlatById(parentPlatform.getDeviceGBId()) == null) {
|
if ( platformMapper.getParentPlatById(parentPlatform.getServerGBId()) == null) {
|
||||||
result = platformMapper.addParentPlatform(parentPlatform);
|
result = platformMapper.addParentPlatform(parentPlatform);
|
||||||
|
|
||||||
if (parentPlatformCatch == null) {
|
if (parentPlatformCatch == null) {
|
||||||
parentPlatformCatch = new ParentPlatformCatch();
|
parentPlatformCatch = new ParentPlatformCatch();
|
||||||
parentPlatformCatch.setParentPlatform(parentPlatform);
|
parentPlatformCatch.setParentPlatform(parentPlatform);
|
||||||
parentPlatformCatch.setId(parentPlatform.getDeviceGBId());
|
parentPlatformCatch.setId(parentPlatform.getServerGBId());
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
result = platformMapper.updateParentPlatform(parentPlatform);
|
result = platformMapper.updateParentPlatform(parentPlatform);
|
||||||
|
|
|
@ -82,7 +82,8 @@ public class PlatformController {
|
||||||
}
|
}
|
||||||
// TODO 检查是否已经存在,且注册成功, 如果注册成功,需要先注销之前再,修改并注册
|
// TODO 检查是否已经存在,且注册成功, 如果注册成功,需要先注销之前再,修改并注册
|
||||||
|
|
||||||
ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId());
|
// ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId());
|
||||||
|
ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getServerGBId());
|
||||||
|
|
||||||
boolean updateResult = storager.updateParentPlatform(parentPlatform);
|
boolean updateResult = storager.updateParentPlatform(parentPlatform);
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -72,7 +72,7 @@ export default {
|
||||||
online: "",
|
online: "",
|
||||||
choosed: "",
|
choosed: "",
|
||||||
currentPage: 0,
|
currentPage: 0,
|
||||||
count: 15,
|
count: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
eventEnanle: false
|
eventEnanle: false
|
||||||
|
|
||||||
|
|
|
@ -200,6 +200,7 @@ export default {
|
||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
this.onSubmit_text = "保存";
|
this.onSubmit_text = "保存";
|
||||||
} else {
|
} else {
|
||||||
|
this.onSubmit_text = "立即创建";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSubmit: function () {
|
onSubmit: function () {
|
||||||
|
|
Loading…
Reference in New Issue