Commit 8b4630e1 authored by lixuan's avatar lixuan

Merge branch 'dev-lx' into 'dev'

feat: 房源

See merge request !42
parents 3e3668ae 8db7ee2f
......@@ -17,4 +17,6 @@ public class HouseResourcePageQuery extends PageDomain {
private String houseResourceAttribute;
private String sortWay;
private int wgType;
}
......@@ -105,22 +105,30 @@
</insert>
<select id="selectPage" resultType="com.ruoyi.system.domain.house.vo.HouseResourcePage">
SELECT t1.*, t2.wg_name AS wgName FROM house_resource t1 LEFT JOIN grid_region t2 ON t1.four = t2.id
SELECT
t1.wg_name AS wgName,
t2.*
FROM
grid_region t1
LEFT JOIN house_resource t2 ON t1.wg_code = t2.four
<where>
<if test="query.wgType != null">
and t2.type = #{query.wgType}
</if>
<if test="query.two != null and query.two != ''">
and two like concat('%', #{query.two}, '%')
and t2.two like concat('%', #{query.two}, '%')
</if>
<if test="query.three != null and query.three != ''">
and three like concat('%', #{query.three}, '%')
and t2.three like concat('%', #{query.three}, '%')
</if>
<if test="query.four != null and query.four != ''">
and four like concat('%', #{query.four}, '%')
and t2.four like concat('%', #{query.four}, '%')
</if>
<if test="query.houseResourceAttribute != null and query.houseResourceAttribute != ''">
and house_resource_attribute = #{query.houseResourceAttribute}
and t2.house_resource_attribute = #{query.houseResourceAttribute}
</if>
<if test="query.sortWay != null and query.sortWay != ''">
order by houseArea ${query.sortWay}
order by t2.houseArea ${query.sortWay}
</if>
</where>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment