From 781c2e20a4bb844dae3f4eafbf5f0e494b942ea8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 25 五月 2023 18:07:08 +0800
Subject: [PATCH] optimize
---
java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
index 067d7d6..4075e62 100644
--- a/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
@@ -20,11 +20,12 @@
select t.section,t.remark,t.status_cd,t.status_cd statusCd,t.room_sub_type,t.room_sub_type
roomSubType,t.room_area,t.room_area roomArea,t.user_id,t.user_id userId,t.room_id,t.room_id
roomId,t.layer,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area
- builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,t.community_id,t.community_id
+ builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,td.name stateName,t.community_id,t.community_id
communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent,f.floor_num floorNum,bu.unit_num unitNum
from building_room t
left join building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0'
left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
+ left join t_dict td on t.state = td.status_cd and td.table_name = 'building_room' and td.table_columns = 'state'
where 1 =1
<if test="section !=null and section != ''">
and t.section= #{section}
@@ -37,6 +38,12 @@
</if>
<if test="floorId !=null and floorId != ''">
and f.floor_id= #{floorId}
+ </if>
+ <if test="floorNum !=null and floorNum != ''">
+ and f.`floor_num`= #{floorNum}
+ </if>
+ <if test="unitNum !=null and unitNum != ''">
+ and u.unit_num= #{unitNum}
</if>
<if test="floorIds !=null ">
and f.floor_id in
@@ -70,6 +77,9 @@
</if>
<if test="roomNum !=null and roomNum != ''">
and t.room_num= #{roomNum}
+ </if>
+ <if test="roomNumLike !=null and roomNumLike != ''">
+ and t.room_num like concat('%',#{roomNumLike},'%')
</if>
<if test="unitId !=null and unitId != ''">
and t.unit_id= #{unitId}
@@ -168,6 +178,12 @@
<if test="floorId !=null and floorId != ''">
and f.floor_id= #{floorId}
</if>
+ <if test="floorNum !=null and floorNum != ''">
+ and f.`floor_num`= #{floorNum}
+ </if>
+ <if test="unitNum !=null and unitNum != ''">
+ and u.unit_num= #{unitNum}
+ </if>
<if test="floorIds !=null ">
and f.floor_id in
<foreach collection="floorIds" item="item" index="index" open="(" close=")" separator=",">
@@ -207,6 +223,9 @@
<if test="roomNum !=null and roomNum != ''">
and t.room_num= #{roomNum}
</if>
+ <if test="roomNumLike !=null and roomNumLike != ''">
+ and t.room_num like concat('%',#{roomNumLike},'%')
+ </if>
<if test="unitId !=null and unitId != ''">
and t.unit_id= #{unitId}
</if>
--
Gitblit v1.8.0