| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?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.BuildInfoDao">
- <select id="getBuildInfo" resultType="platform.modules.build.entity.BuildInfo">
- select * from y_info where name=#{name} and del_flag=0 limit 0,1
- </select>
- <select id="getBuildCountByStreet" resultType="Integer">
- SELECT count(id) FROM y_info u WHERE u.street_id = #{streetId}
- and u.del_flag=0
- </select>
- <select id="getBuildCountByStreetName" resultType="Integer">
- SELECT count(u.id) FROM y_info u
- left join s_street s on s.id=u.street_id
- WHERE s.name = #{name}
- and u.del_flag=0
- </select>
- <select id="getBuildCountByType" resultType="Integer">
- SELECT count(id) FROM y_info u WHERE u.type = #{type}
- and u.del_flag=0
- </select>
- <select id="countAllBuild" resultType="Integer">
- SELECT count(id) FROM y_info u WHERE is_start=true
- and u.del_flag=0
- </select>
- <select id="getParkListByCondition" resultType="platform.modules.build.entity.BuildInfo">
- select * from y_info
- where del_flag = 0
- <if test="condition.name != null and condition.name != ''">
- and name = #{condition.name}
- </if>
- <if test="condition.area != null and condition.area != ''">
- and area >= #{condition.area}
- </if>
- <if test="condition.restArea != null and condition.restArea != ''">
- and rest_area >= #{condition.restArea}
- </if>
- <if test="condition.restRentArea != null and condition.restRentArea != ''">
- and rest_rent_area >= #{condition.restRentArea}
- </if>
- <if test="condition.transformer != null and condition.transformer != ''">
- and transformer = #{condition.transformer}
- </if>
- </select>
- <select id="findParkList" resultType="platform.modules.build.entity.BuildInfo">
- select
- p.*,
- s.name as streetName
- from y_info p
- left join s_street s on s.id = p.street_id
- where
- p.del_flag = 0 and s.del_flag = 0
- <if test="condition.streetId != null and conition.streetId != ''">
- s.id = #{condition.streetId}
- </if>
- <if test="condition.parkName != null and conition.parkName != ''">
- p.name like concat('%', concat(#{condition.parkName}, '%'))
- </if>
- </select>
- </mapper>
|