|
@@ -109,43 +109,71 @@
|
|
|
from t_sell_build sb
|
|
|
left join t_park_data pd on pd.id = sb.belong
|
|
|
<where>
|
|
|
- <if test="productModule != null and productModule != ''">
|
|
|
- and product_module like concat('%', #{productModule}, '%')
|
|
|
- </if>
|
|
|
- <if test="belong != null and belong != ''">
|
|
|
- and belong like concat('%', #{belong}, '%')
|
|
|
+ <if test="parkId != null">
|
|
|
+ and sb.belong = #{parkId}
|
|
|
</if>
|
|
|
<if test="application != null and application != ''">
|
|
|
- and application like concat('%', #{application}, '%')
|
|
|
+ and sb.application like concat('%', #{application}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="spaceMin != null and spaceMin != '' and spaceMax != null and spaceMax != ''">
|
|
|
+ and sb.space >= #{spaceMin} and sb.space <= #{spaceMax}
|
|
|
</if>
|
|
|
</where>
|
|
|
limit #{begin}, #{pageSize}
|
|
|
</select>
|
|
|
- <select id="queryCountByAddr" resultType="java.lang.Integer">
|
|
|
- select count(*) from t_sell_build
|
|
|
+ <select id="queryCountByAddr" resultType="java.lang.Integer" >
|
|
|
+ select count(*)
|
|
|
+ from t_sell_build sb
|
|
|
+ left join t_park_data pd on pd.id = sb.belong
|
|
|
<where>
|
|
|
- <if test="productModule != null and productModule != ''">
|
|
|
- and product_module like concat('%', #{productModule}, '%')
|
|
|
+ <if test="belongs != null and !belongs.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="belongs" item="belong" separator=" or ">
|
|
|
+ sb.belong = #{belong}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
- <if test="belong != null and belong != ''">
|
|
|
- and belong like concat('%', #{belong}, '%')
|
|
|
+ <if test="applications != null and !applications.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="applications" item="app" separator=" or ">
|
|
|
+ sb.application like concat('%', #{app}, '%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
- <if test="application != null and application != ''">
|
|
|
- and application like concat('%', #{application}, '%')
|
|
|
+ <if test="productModules != null and !productModules.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="productModules" item="pro" separator=" or ">
|
|
|
+ sb.product_module like concat('%', #{pro}, '%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
- <select id="queryDataByAddr" resultType="com.example.nngkxxdp.entity.SellBuild">
|
|
|
- select * from t_sell_build
|
|
|
+ <select id="queryDataByAddr" resultType="com.example.nngkxxdp.entity.SellBuild" resultMap="BaseResultMap">
|
|
|
+ select sb.*, sb.addr as landAddr, pd.title, pd.industry, pd.addr as parkAddr
|
|
|
+ from t_sell_build sb
|
|
|
+ left join t_park_data pd on pd.id = sb.belong
|
|
|
<where>
|
|
|
- <if test="productModule != null and productModule != ''">
|
|
|
- and product_module like concat('%', #{productModule}, '%')
|
|
|
+ <if test="belongs != null and !belongs.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="belongs" item="belong" separator=" or ">
|
|
|
+ sb.belong = #{belong}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
- <if test="belong != null and belong != ''">
|
|
|
- and belong like concat('%', #{belong}, '%')
|
|
|
+ <if test="applications != null and !applications.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="applications" item="app" separator=" or ">
|
|
|
+ sb.application like concat('%', #{app}, '%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
- <if test="application != null and application != ''">
|
|
|
- and application like concat('%', #{application}, '%')
|
|
|
+ <if test="productModules != null and !productModules.isEmpty()">
|
|
|
+ and (
|
|
|
+ <foreach collection="productModules" item="pro" separator=" or ">
|
|
|
+ sb.product_module like concat('%', #{pro}, '%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
</where>
|
|
|
limit #{begin}, #{pageSize}
|