临时提交

This commit is contained in:
648540858
2024-08-24 00:18:54 +08:00
parent d2654660cb
commit 5a259aaa63
10 changed files with 122 additions and 191 deletions

View File

@@ -262,7 +262,10 @@ public interface CommonGBChannelMapper {
@Select("<script>" +
" select " +
" *, " +
" id," +
" coalesce(gb_device_id, device_id) as device_id," +
" coalesce(gb_name, name) as name, " +
" coalesce(gb_parent_id, parent_id) as parent_device_id, " +
" 1 as type, " +
" true as is_leaf " +
" from wvp_device_channel " +

View File

@@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.gb28181.dao;
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
import com.genersoft.iot.vmp.gb28181.bean.Group;
import com.genersoft.iot.vmp.gb28181.bean.Region;
import com.genersoft.iot.vmp.gb28181.bean.RegionTree;
import org.apache.ibatis.annotations.*;
@@ -104,4 +105,14 @@ public interface RegionMapper {
" </script>")
List<CommonGBChannel> queryByPlatform(@Param("platformId") Integer platformId);
@Update(" <script>" +
" update wvp_common_region w1 " +
" inner join (select * from wvp_common_region ) w2 on w1.parent_device_id = w2.device_id " +
" set w1.parent_id = w2.id" +
" where w1.id in " +
" <foreach collection='regionListForAdd' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
" </script>")
void updateParentId(List<Region> regionListForAdd);
}