java110 лет назад: 3
Родитель
Сommit
9704c0a8a7

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

@@ -55,6 +55,7 @@ public class RoomDto extends PageDto implements Serializable {
     private String userName;
     private String ownerId;
     private String ownerName;
+    private String ownerNameLike;
     private String idCard;
     private String link;
     private String roomType;
@@ -409,4 +410,12 @@ public class RoomDto extends PageDto implements Serializable {
     public void setRoomNumLike(String roomNumLike) {
         this.roomNumLike = roomNumLike;
     }
+
+    public String getOwnerNameLike() {
+        return ownerNameLike;
+    }
+
+    public void setOwnerNameLike(String ownerNameLike) {
+        this.ownerNameLike = ownerNameLike;
+    }
 }

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

@@ -770,7 +770,7 @@
         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,f.`floor_num` floorNum,t.room_type roomType,t.room_type,f.floor_id floorId
-        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
+        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,bo.name ownerName
         FROM
         building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f
         WHERE
@@ -798,6 +798,9 @@
         <if test="name !=null and name != ''">
             and bo.name= #{name}
         </if>
+        <if test="ownerNameLike !=null and ownerNameLike != ''">
+            and bo.name like concat('%',#{ownerNameLike},'%')
+        </if>
         <if test="link !=null and link != ''">
             and bo.link= #{link}
         </if>