Procházet zdrojové kódy

优化 查询房屋字段

java110 před 4 roky
rodič
revize
c79d257ae6

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/RoomDto.java

@@ -56,6 +56,7 @@ public class RoomDto extends PageDto implements Serializable {
     private String link;
     private String roomType;
     private String roomSubType;
+    private String roomSubTypeName;
     private String roomRent;
     private String roomArea;
 
@@ -356,4 +357,12 @@ public class RoomDto extends PageDto implements Serializable {
     public void setRoomArea(String roomArea) {
         this.roomArea = roomArea;
     }
+
+    public String getRoomSubTypeName() {
+        return roomSubTypeName;
+    }
+
+    public void setRoomSubTypeName(String roomSubTypeName) {
+        this.roomSubTypeName = roomSubTypeName;
+    }
 }

+ 36 - 1
java110-bean/src/main/java/com/java110/vo/api/ApiRoomDataVo.java

@@ -32,7 +32,10 @@ public class ApiRoomDataVo implements Serializable {
     private String apartment;
     private String apartmentName;
     private String roomType;
-
+    private String roomSubType;
+    private String roomRent;
+    private String roomArea;
+    private String roomSubTypeName;
     private String ownerId;
     private String ownerName;
     private String idCard;
@@ -217,4 +220,36 @@ public class ApiRoomDataVo implements Serializable {
     public void setRoomType(String roomType) {
         this.roomType = roomType;
     }
+
+    public String getRoomSubType() {
+        return roomSubType;
+    }
+
+    public void setRoomSubType(String roomSubType) {
+        this.roomSubType = roomSubType;
+    }
+
+    public String getRoomRent() {
+        return roomRent;
+    }
+
+    public void setRoomRent(String roomRent) {
+        this.roomRent = roomRent;
+    }
+
+    public String getRoomArea() {
+        return roomArea;
+    }
+
+    public void setRoomArea(String roomArea) {
+        this.roomArea = roomArea;
+    }
+
+    public String getRoomSubTypeName() {
+        return roomSubTypeName;
+    }
+
+    public void setRoomSubTypeName(String roomSubTypeName) {
+        this.roomSubTypeName = roomSubTypeName;
+    }
 }

+ 3 - 3
java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml

@@ -694,13 +694,13 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
         u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,f.floor_area floorArea,u.unit_area unitArea,td.name
-        stateName,t.room_type roomType,t.room_type,t.`community_id` communityId
+        stateName,t.room_type roomType,t.room_type,t.`community_id` communityId,td1.`name` roomSubTypeName
         ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
         FROM building_room t
         inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
-        inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` =
-        '0'
+        inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_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'
+        left join t_dict td1 on t.room_sub_type = td1.status_cd and td1.table_name = 'building_room' and td1.table_columns = 'room_sub_type'
         WHERE 1 =1
         <if test="floorId !=null and floorId != ''">
             AND t.`community_id` = #{communityId}