| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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="platform.modules.build.dao.WaterFeeDao">
-
- <select id="findDueWaterFee" resultType="platform.modules.build.entity.WaterFee"
- parameterType="platform.modules.build.DTO.ElectricWaterDto">
- SELECT * FROM y_water_fee t
- WHERE
- t.build_id = #{build_id}
- and t.del_flag=0 and (t.status=0 or t.status is null)
- <if test="company_id!=null">
- and t.company_id=#{company_id}
- </if>
- order by t.create_time limit #{count}
- </select>
-
-
- <select id="getBeforeReadByCompanyId" resultType="platform.modules.build.entity.WaterFee">
- SELECT * FROM y_water_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0
- order by create_time desc limit 1
- </select>
- <select id="getLastPeriod" resultType="Integer">
- SELECT t.current_period FROM y_water_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0
- order by t.current_period desc limit 1
- </select>
- <select id="getByCompanyIdAndRecordId" resultType="platform.modules.build.entity.WaterFee">
- SELECT t.* FROM y_water_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0 and t.record_id=#{record_id}
- </select>
- </mapper>
|