临时提交

This commit is contained in:
648540858
2024-07-24 17:54:19 +08:00
parent 6bd0cdd37b
commit 5a812e7f08
12 changed files with 355 additions and 200 deletions

View File

@@ -140,7 +140,7 @@ public interface CommonGBChannelMapper {
", gb_download_speed = #{gbDownloadSpeed}" +
", gb_svc_space_support_mod = #{gbSvcSpaceSupportMod}" +
", gb_svc_time_support_mode = #{gbSvcTimeSupportMode}" +
"WHERE id = #{gbId}"+
" WHERE id = #{gbId}"+
" </script>"})
int update(CommonGBChannel commonGBChannel);

View File

@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.Region;
import org.apache.ibatis.annotations.*;
import java.util.List;
import java.util.Set;
@Mapper
public interface RegionMapper {
@@ -30,8 +31,45 @@ public interface RegionMapper {
List<Region> query(@Param("query") String query, @Param("parentId") String parentId);
@Select("SELECT * from wvp_common_region WHERE parent_device_id = #{parentId} ORDER BY id ")
List<Region> getChildren(String parentId);
List<Region> getChildren(@Param("parentId") String parentId);
@Select("SELECT * from wvp_common_region WHERE id = #{id} ")
Region queryOne(int id);
Region queryOne(@Param("id") int id);
@Select(" select coalesce(dc.gb_civil_code, dc.civil_code) as civil_code " +
" from wvp_device_channel dc " +
" where coalesce(dc.gb_civil_code, dc.civil_code) not in " +
" (select device_id from wvp_common_region)")
List<String> getUninitializedCivilCode();
@Select(" <script>" +
" SELECT device_id from wvp_common_region " +
" where device_id in " +
" <foreach collection='codes' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
" </script>")
List<String> queryInList(Set<String> codes);
@Insert(" <script>" +
" INSERT INTO wvp_common_region (" +
" device_id," +
" name, " +
" parent_device_id," +
" create_time," +
" update_time) " +
" VALUES " +
" <foreach collection='regionList' index='index' item='item' separator=','> " +
" (#{item.deviceId}, #{item.name}, #{item.parentDeviceId},#{item.createTime},#{item.updateTime})" +
" </foreach> " +
" </script>")
int batchAdd(List<Region> regionList);
@Select(" <script>" +
" SELECT * from wvp_common_region " +
" where " +
" <if test='parentId != null'> parent_device_id = #{parentId} </if> " +
" <if test='parentId == null'> parent_device_id is null </if> " +
" <if test='query != null'> AND (device_id LIKE concat('%',#{query},'%') OR name LIKE concat('%',#{query},'%'))</if> " +
" </script>")
List<Region> queryForTree(@Param("query") String query, @Param("parentId") String parentId);
}