<?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.BusRiverDao">

    <!--分页查询-->
    <select id="listPage" resultType="com.zcloud.modules.kangzai.entity.BusRiverEntity">
        SELECT
        t.*
        FROM bus_river t
        <where>
            <if test="params.riverId != null and params.riverId != ''">
                AND t.river_id = #{params.riverId}
            </if>
            <if test="params.riverName != null and params.riverName != ''">
                AND t.river_name like '%${params.riverName}%'
            </if>
            <if test="params.totalLength != null and params.totalLength != ''">
                AND t.total_length = #{params.totalLength}
            </if>
            <if test="params.basinArea != null and params.basinArea != ''">
                AND t.basin_area = #{params.basinArea}
            </if>
            <if test="params.cityAreaPercentage != null and params.cityAreaPercentage != ''">
                AND t.city_area_percentage = #{params.cityAreaPercentage}
            </if>
            <if test="params.inCityRiverLength != null and params.inCityRiverLength != ''">
                AND t.in_city_river_length = #{params.inCityRiverLength}
            </if>
            <if test="params.inCityBasinArea != null and params.inCityBasinArea != ''">
                AND t.in_city_basin_area = #{params.inCityBasinArea}
            </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>
