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

    <!--分页查询-->
    <select id="listPage" resultType="com.zcloud.modules.kangzai.entity.BusRiverStructuresEntity">
        SELECT
        t.*
        FROM bus_river_structures t
        <where>
            <if test="params.riverStructuresId != null and params.riverStructuresId != ''">
                AND t.river_structures_id = #{params.riverStructuresId}
            </if>
            <if test="params.riverId != null and params.riverId != ''">
                AND t.river_id = #{params.riverId}
            </if>
            <if test="params.name != null and params.name != ''">
                AND t.name = #{params.name}
            </if>
            <if test="params.type != null and params.type != ''">
                AND t.type = #{params.type}
            </if>
        </where>
        ORDER BY t.create_time DESC
    </select>
</mapper>
