| 1234567891011121314151617181920212223242526272829303132333435 |
- <?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.ElectricFeeDao">
-
- <select id="findDueElectricFee" resultType="platform.modules.build.entity.ElectricFee"
- parameterType="platform.modules.build.DTO.ElectricWaterDto">
- SELECT * FROM y_electric_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="getLastPeriod" resultType="Integer">
- SELECT t.current_period FROM y_electric_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0
- order by t.current_period desc limit 1
- </select>
- <select id="getBeforeReadByCompanyId" resultType="platform.modules.build.entity.ElectricFee">
- SELECT * FROM y_electric_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0
- order by create_time desc limit 1
- </select>
- <select id="getByCompanyIdAndRecordId" resultType="platform.modules.build.entity.ElectricFee">
- SELECT t.* FROM y_electric_fee t WHERE t.company_id = #{company_id}
- and t.del_flag=0 and t.record_id=#{record_id}
- </select>
- </mapper>
|