定义第三方接口信息
This commit is contained in:
@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.provider.ChannelProvider;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import com.genersoft.iot.vmp.web.custom.bean.CameraChannel;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -603,4 +604,10 @@ public interface CommonGBChannelMapper {
|
||||
"</foreach> " +
|
||||
"</script>")
|
||||
void updateGps(List<CommonGBChannel> commonGBChannels);
|
||||
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryListForSy")
|
||||
List<CameraChannel> queryListForSy(@Param("query") String query, @Param("sortName") String sortName, @Param("order") String order,
|
||||
@Param("groupDeviceId") String groupDeviceId, @Param("online") Boolean online, @Param("containMobileDevice") Boolean containMobileDevice);
|
||||
|
||||
}
|
||||
|
||||
@@ -292,4 +292,7 @@ public interface GroupMapper {
|
||||
|
||||
@Select("SELECT * from wvp_common_group WHERE alias = #{alias} ")
|
||||
Group queryGroupByAlias(@Param("alias") String alias);
|
||||
|
||||
@Select("SELECT * from wvp_common_group WHERE alias = #{alias} and business_group = #{businessGroup}")
|
||||
Group queryGroupByAliasAndBusinessGroup(@Param("alias") String alias, @Param("deviceId") String businessGroup);
|
||||
}
|
||||
|
||||
@@ -484,4 +484,31 @@ public class ChannelProvider {
|
||||
sqlBuild.append(" AND wdc.channel_type = 0 ");
|
||||
return sqlBuild.toString();
|
||||
}
|
||||
|
||||
public String queryListForSy(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(BASE_SQL);
|
||||
sqlBuild.append(" where channel_type = 0 ");
|
||||
if (params.get("query") != null) {
|
||||
sqlBuild.append(" AND (coalesce(gb_device_id, device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||
" OR coalesce(gb_name, name) LIKE concat('%',#{query},'%') escape '/' )")
|
||||
;
|
||||
}
|
||||
if (params.get("online") != null && (Boolean)params.get("online")) {
|
||||
sqlBuild.append(" AND coalesce(gb_status, status) = 'ON'");
|
||||
}
|
||||
if (params.get("online") != null && !(Boolean)params.get("online")) {
|
||||
sqlBuild.append(" AND coalesce(gb_status, status) = 'OFF'");
|
||||
}
|
||||
if (params.get("containMobileDevice") != null && !(Boolean)params.get("containMobileDevice")) {
|
||||
sqlBuild.append(" AND gb_ptz_type != 99");
|
||||
}
|
||||
if (params.get("groupDeviceId") != null) {
|
||||
sqlBuild.append(" AND coalesce(gb_parent_id, parent_id) = #{groupDeviceId}");
|
||||
}else {
|
||||
sqlBuild.append(" AND coalesce(gb_parent_id, parent_id) is null");
|
||||
}
|
||||
|
||||
return sqlBuild.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ public interface IGroupService {
|
||||
PageInfo<Group> queryList(Integer page, Integer count, String query);
|
||||
|
||||
Group queryGroupByAlias(String groupAlias);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user