临时提交
This commit is contained in:
@@ -368,4 +368,23 @@ public interface CommonGBChannelMapper {
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryByBusinessGroup")
|
||||
List<CommonGBChannel> queryByBusinessGroup(@Param("businessGroup") String businessGroup);
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryByParentId")
|
||||
List<CommonGBChannel> queryByParentId(@Param("parentId") String parentId);
|
||||
|
||||
@Update(value = {" <script>" +
|
||||
" UPDATE wvp_device_channel " +
|
||||
" SET gb_business_group_id = #{businessGroup}" +
|
||||
" WHERE id in "+
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbId}</foreach>" +
|
||||
" </script>"})
|
||||
void updateBusinessGroupByChannelList(@Param("businessGroup") String businessGroup, List<CommonGBChannel> channelList);
|
||||
|
||||
@Update(value = {" <script>" +
|
||||
" UPDATE wvp_device_channel " +
|
||||
" SET gb_parent_id = #{parentId}" +
|
||||
" WHERE id in "+
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbId}</foreach>" +
|
||||
" </script>"})
|
||||
void updateParentIdByChannelList(@Param("parentId") String parentId, List<CommonGBChannel> channelList);
|
||||
}
|
||||
|
||||
@@ -32,8 +32,12 @@ public interface GroupMapper {
|
||||
" </script>"})
|
||||
List<Group> query(@Param("query") String query, @Param("parentId") String parentId, @Param("businessGroup") String businessGroup);
|
||||
|
||||
@Select("SELECT * from wvp_common_group WHERE parent_device_id = #{parentId} AND business_group=#{businessGroup} ORDER BY id ")
|
||||
List<Group> getChildren(@Param("parentId") String parentId , @Param("businessGroup") String businessGroup);
|
||||
@Select(value = {" <script>" +
|
||||
"SELECT * from wvp_common_group WHERE parent_device_id = #{parentId} "+
|
||||
" <if test='platformId != null'> AND platform_id = #{platformId}</if> " +
|
||||
" <if test='platformId == null'> AND platform_id is null</if> " +
|
||||
" </script>"})
|
||||
List<Group> getChildren(@Param("parentId") String parentId , @Param("platformId") Integer platformId);
|
||||
|
||||
@Select("SELECT * from wvp_common_group WHERE id = #{id} ")
|
||||
Group queryOne(@Param("id") int id);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ChannelProvider {
|
||||
" coalesce(gb_block, block) as gb_block,\n" +
|
||||
" coalesce(gb_address, address) as gb_address,\n" +
|
||||
" coalesce(gb_parental, parental) as gb_parental,\n" +
|
||||
" coalesce(gb_parent_id, parent_id) as gb_parent_id,\n" +
|
||||
" gb_parent_id,\n" +
|
||||
" coalesce(gb_safety_way, safety_way) as gb_safety_way,\n" +
|
||||
" coalesce(gb_register_way, register_way) as gb_register_way,\n" +
|
||||
" coalesce(gb_cert_num, cert_num) as gb_cert_num,\n" +
|
||||
@@ -191,6 +191,13 @@ public class ChannelProvider {
|
||||
return sqlBuild.toString() ;
|
||||
}
|
||||
|
||||
public String queryByParentId(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(getBaseSelectSql());
|
||||
sqlBuild.append("where gb_parent_id = #{parentId} ");
|
||||
return sqlBuild.toString() ;
|
||||
}
|
||||
|
||||
public String queryByGroupList(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(getBaseSelectSql());
|
||||
|
||||
Reference in New Issue
Block a user