<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.modules.kangzai.dao.BusGeologicalDisasterDao">

    <!--分页查询-->
    <select id="listPage" resultType="com.zcloud.modules.kangzai.entity.BusGeologicalDisasterEntity">
        SELECT
            t.*
        FROM bus_geological_disaster t
        <where>
            <if test="params.geologicalDisasterId != null and params.geologicalDisasterId != ''">
                    AND t.geological_disaster_id = #{params.geologicalDisasterId}
            </if>
            <if test="params.disasterName != null and params.disasterName != ''">
                    AND t.disaster_name = #{params.disasterName}
            </if>
            <if test="params.province != null and params.province != ''">
                    AND t.province = #{params.province}
            </if>
            <if test="params.city != null and params.city != ''">
                    AND t.city = #{params.city}
            </if>
            <if test="params.county != null and params.county != ''">
                    AND t.county = #{params.county}
            </if>
            <if test="params.village != null and params.village != ''">
                    AND t.village = #{params.village}
            </if>
            <if test="params.street != null and params.street != ''">
                    AND t.street = #{params.street}
            </if>
            <if test="params.areaName != null and params.areaName != ''">
                    AND t.area_name = #{params.areaName}
            </if>
            <if test="params.terrain != null and params.terrain != ''">
                    AND t.terrain = #{params.terrain}
            </if>
            <if test="params.disasterType != null and params.disasterType != ''">
                    AND t.disaster_type = #{params.disasterType}
            </if>
            <if test="params.scaleDescription != null and params.scaleDescription != ''">
                    AND t.scale_description = #{params.scaleDescription}
            </if>
            <if test="params.scale != null and params.scale != ''">
                    AND t.scale = #{params.scale}
            </if>
            <if test="params.stability != null and params.stability != ''">
                    AND t.stability = #{params.stability}
            </if>
            <if test="params.households != null and params.households != ''">
                    AND t.households = #{params.households}
            </if>
            <if test="params.population != null and params.population != ''">
                    AND t.population = #{params.population}
            </if>
            <if test="params.dangerousSituation != null and params.dangerousSituation != ''">
                    AND t.dangerous_situation = #{params.dangerousSituation}
            </if>
            <if test="params.surveySituation != null and params.surveySituation != ''">
                    AND t.survey_situation = #{params.surveySituation}
            </if>
            <if test="params.governanceSituation != null and params.governanceSituation != ''">
                    AND t.governance_situation = #{params.governanceSituation}
            </if>
            <if test="params.relocationSituation != null and params.relocationSituation != ''">
                    AND t.relocation_situation = #{params.relocationSituation}
            </if>
            <if test="params.riskLevel != null and params.riskLevel != ''">
                    AND t.risk_level = #{params.riskLevel}
            </if>
            <if test="params.longitude != null and params.longitude != ''">
                    AND t.longitude = #{params.longitude}
            </if>
            <if test="params.latitude != null and params.latitude != ''">
                    AND t.latitude = #{params.latitude}
            </if>
            <if test="params.creator != null and params.creator != ''">
                    AND t.creator = #{params.creator}
            </if>
            <if test="params.createTime != null and params.createTime != ''">
                    AND t.create_time = #{params.createTime}
            </if>
            <if test="params.operator != null and params.operator != ''">
                    AND t.operator = #{params.operator}
            </if>
            <if test="params.operatTime != null and params.operatTime != ''">
                    AND t.operat_time = #{params.operatTime}
            </if>
            <if test="params.isDelete != null">
                    AND t.is_delete = #{params.isDelete}
            </if>
        </where>
        ORDER BY t.create_time DESC
    </select>
</mapper>
