瀏覽代碼

优化代码

java110 3 年之前
父節點
當前提交
cf09f67a8a

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

@@ -41,6 +41,8 @@ public class RoomDto extends PageDto implements Serializable {
     private String[] layers;
     private String builtUpArea;
     private String roomNum;
+    private String roomNumLike;
+
     private String unitId;
     private String unitArea;
     private String apartment;
@@ -399,4 +401,12 @@ public class RoomDto extends PageDto implements Serializable {
     public void setFloorIds(String[] floorIds) {
         this.floorIds = floorIds;
     }
+
+    public String getRoomNumLike() {
+        return roomNumLike;
+    }
+
+    public void setRoomNumLike(String roomNumLike) {
+        this.roomNumLike = roomNumLike;
+    }
 }

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

@@ -348,6 +348,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>
@@ -719,6 +722,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>