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

    <!--分页查询-->
    <select id="listPage" resultType="com.zcloud.modules.kangzai.entity.BusReservoirBasicEntity">
        SELECT
        t.*
        FROM bus_reservoir_basic t
        <where>
            <if test="params.reservoirBasicId != null and params.reservoirBasicId != ''">
                AND t.reservoir_basic_id = #{params.reservoirBasicId}
            </if>
            <if test="params.reservoirName != null and params.reservoirName != ''">
                AND t.reservoir_name like '%${params.reservoirName}%'
            </if>
            <if test="params.reservoirType != null and params.reservoirType != ''">
                AND t.reservoir_type = #{params.reservoirType}
            </if>
            <if test="params.reservoirLevel != null and params.reservoirLevel != ''">
                AND t.reservoir_level = #{params.reservoirLevel}
            </if>
            <if test="params.maxCapacity != null and params.maxCapacity != ''">
                AND t.max_capacity = #{params.maxCapacity}
            </if>
            <if test="params.currentCapacity != null and params.currentCapacity != ''">
                AND t.current_capacity = #{params.currentCapacity}
            </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>
