优化通道管理/行政区划页面逻辑
This commit is contained in:
@@ -257,8 +257,7 @@ public interface CommonGBChannelMapper {
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryList")
|
||||
List<CommonGBChannel> queryList(@Param("query") String query, @Param("online") Boolean online,
|
||||
@Param("hasCivilCode") Boolean hasCivilCode,
|
||||
@Param("hasGroup") Boolean hasGroup);
|
||||
@Param("civilCode") String civilCode, @Param("groupDeviceId") String groupDeviceId);
|
||||
|
||||
@Select("<script>" +
|
||||
" select " +
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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.*;
|
||||
|
||||
@@ -132,17 +132,11 @@ public class ChannelProvider {
|
||||
if (params.get("online") != null && !(Boolean)params.get("online")) {
|
||||
sqlBuild.append(" AND coalesce(gb_status, status) = 'OFF'");
|
||||
}
|
||||
if (params.get("hasCivilCode") != null && (Boolean)params.get("hasCivilCode")) {
|
||||
sqlBuild.append(" AND coalesce(gb_civil_code, civil_code) is not null");
|
||||
if (params.get("civilCode") != null) {
|
||||
sqlBuild.append(" AND coalesce(gb_civil_code, civil_code) = #{civilCode}");
|
||||
}
|
||||
if (params.get("hasCivilCode") != null && !(Boolean)params.get("hasCivilCode")) {
|
||||
sqlBuild.append(" AND coalesce(gb_civil_code, civil_code) is null");
|
||||
}
|
||||
if (params.get("hasGroup") != null && (Boolean)params.get("hasGroup")) {
|
||||
sqlBuild.append(" AND coalesce(gb_parent_id, parent_id) is not null");
|
||||
}
|
||||
if (params.get("hasGroup") != null && !(Boolean)params.get("hasGroup")) {
|
||||
sqlBuild.append(" AND coalesce(gb_parent_id, parent_id) is null");
|
||||
if (params.get("groupDeviceId") != null) {
|
||||
sqlBuild.append(" AND coalesce(gb_parent_id, parent_id) = #{groupDeviceId}");
|
||||
}
|
||||
return sqlBuild.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user