临时提交
This commit is contained in:
@@ -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 " +
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user