瀏覽代碼

* 代码优化

顾绍勇 5 年之前
父節點
當前提交
795fdace34

+ 1
- 1
src/main/java/com/huiju/estateagents/po/TaHousingResourcesPO.java 查看文件

29
     private Double buildingArea;
29
     private Double buildingArea;
30
 
30
 
31
     /**
31
     /**
32
-     * 是否预选已经预选,1 是 0
32
+     * 是否已经预选该房源,true 是 false
33
      */
33
      */
34
     @TableField(exist = false)
34
     @TableField(exist = false)
35
     private Boolean isPreselect;
35
     private Boolean isPreselect;

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java 查看文件

120
         }
120
         }
121
 
121
 
122
         // 校验预选操作时间是否在规定范围内
122
         // 校验预选操作时间是否在规定范围内
123
-        if (DateUtils.checkTimeRange(resourcesPO.getPreselectionStartTime(), resourcesPO.getPreselectionEndTime(), null)) {
123
+        if (!DateUtils.checkTimeRange(resourcesPO.getPreselectionStartTime(), resourcesPO.getPreselectionEndTime(), null)) {
124
             responseBean.addError("当前时间不在预选时间范围内,请联系置业顾问了解详情。");
124
             responseBean.addError("当前时间不在预选时间范围内,请联系置业顾问了解详情。");
125
             return responseBean;
125
             return responseBean;
126
         }
126
         }

+ 23
- 23
src/main/resources/mapper/TaHousingResourcesMapper.xml 查看文件

4
 
4
 
5
     <select id="listHousingResources" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
5
     <select id="listHousingResources" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
6
         SELECT
6
         SELECT
7
-        t.house_id,
8
-        t.building_id,
9
-        t.block_id,
10
-        t.block_name,
11
-        t.sales_batch_id,
12
-        t.unit_id,
13
-        t.unit_name,
14
-        t.floor_id,
15
-        t.floor_name,
16
-        t.room_id,
17
-        t.room_name,
18
-        t.price,
19
-        t.heat,
20
-        t.apartment_id,
21
-        t.`status`,
22
-        t.org_id,
23
-        t2.inside_area,
24
-        t2.building_area
7
+            t.house_id,
8
+            t.building_id,
9
+            t.block_id,
10
+            t.block_name,
11
+            t.sales_batch_id,
12
+            t.unit_id,
13
+            t.unit_name,
14
+            t.floor_id,
15
+            t.floor_name,
16
+            t.room_id,
17
+            t.room_name,
18
+            t.price,
19
+            t.heat,
20
+            t.apartment_id,
21
+            t.`status`,
22
+            t.org_id,
23
+            t2.inside_area,
24
+            t2.building_area,
25
+            t2.apartment_name
25
         FROM
26
         FROM
26
-        ta_housing_resources t,
27
-        ta_building_apartment t2
27
+            ta_housing_resources t,
28
+            ta_building_apartment t2
28
         WHERE
29
         WHERE
29
-        t.sales_batch_id = #{salesBatchId}
30
+            t.sales_batch_id = #{salesBatchId}
30
         <if test="startPrice != null and startPrice != '' and endPrice != null and endPrice != ''">
31
         <if test="startPrice != null and startPrice != '' and endPrice != null and endPrice != ''">
31
             AND ( t.price BETWEEN #{startPrice} AND #{endPrice} )
32
             AND ( t.price BETWEEN #{startPrice} AND #{endPrice} )
32
         </if>
33
         </if>
36
         AND t.apartment_id = t2.apartment_id
37
         AND t.apartment_id = t2.apartment_id
37
         AND t.`status` = 1
38
         AND t.`status` = 1
38
         AND t2.`status` = 1
39
         AND t2.`status` = 1
39
-        ORDER BY
40
-        t.create_date DESC
40
+        ORDER BY t.create_date DESC
41
     </select>
41
     </select>
42
 
42
 
43
     <select id="listBuildApartmentBySalesBatchId" resultType="com.huiju.estateagents.entity.TaBuildingApartment">
43
     <select id="listBuildApartmentBySalesBatchId" resultType="com.huiju.estateagents.entity.TaBuildingApartment">