顾绍勇 пре 5 година
родитељ
комит
1f5280c75e

+ 10
- 0
src/main/java/com/huiju/estateagents/po/TaPreselectionRecordPO.java Прегледај датотеку

@@ -83,4 +83,14 @@ public class TaPreselectionRecordPO extends TaPreselectionRecord {
83 83
      * 最后修改人
84 84
      */
85 85
     private String updateName;
86
+
87
+    /**
88
+     * 房源状态
89
+     */
90
+    private String housingStatus;
91
+
92
+    /**
93
+     * 销售批次装填
94
+     */
95
+    private String saleBatchStatus;
86 96
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Прегледај датотеку

@@ -79,8 +79,8 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
79 79
                     buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
80 80
                     taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
81 81
                     po.setBuildingImgList(taBuildingImgList);
82
-                    resultList.add(po);
83 82
                 }
83
+                resultList.add(po);
84 84
             }
85 85
             iPage.setRecords(resultList);
86 86
         }

+ 31
- 29
src/main/resources/mapper/TaHousingResourcesMapper.xml Прегледај датотеку

@@ -17,6 +17,7 @@
17 17
             t.room_name,
18 18
             t.price,
19 19
             t.heat,
20
+            t.real_heat,
20 21
             t.apartment_id,
21 22
             t.`status`,
22 23
             t.org_id,
@@ -56,48 +57,49 @@
56 57
 
57 58
     <update id="updateForAddHeat" parameterType="java.lang.String">
58 59
         UPDATE ta_housing_resources t
59
-        SET t.heat = t.heat + 1
60
+        SET t.real_heat = t.real_heat + 1
60 61
         WHERE
61 62
             t.house_id = #{houseId}
62
-            AND t.heat >= 0
63
+            AND t.real_heat >= 0
63 64
     </update>
64 65
 
65 66
     <update id="updateForSubtractHeat" parameterType="java.lang.String">
66 67
         UPDATE ta_housing_resources t
67
-        SET t.heat = t.heat - 1
68
+        SET t.real_heat = t.real_heat - 1
68 69
         WHERE
69 70
             t.house_id = #{houseId}
70
-            AND t.heat > 0
71
+            AND t.real_heat > 0
71 72
     </update>
72 73
 
73 74
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
74 75
         SELECT
75
-        t.house_id,
76
-        t.building_id,
77
-        t.block_id,
78
-        t.block_name,
79
-        t.sales_batch_id,
80
-        t.unit_id,
81
-        t.unit_name,
82
-        t.floor_id,
83
-        t.floor_name,
84
-        t.room_id,
85
-        t.room_name,
86
-        t.price,
87
-        t.heat,
88
-        t.apartment_id,
89
-        t.`status`,
90
-        t.org_id,
91
-        t2.apartment_name,
92
-        t2.inside_area,
93
-        t2.building_area,
94
-        t3.preselection_start_time,
95
-        t3.preselection_end_time,
96
-        t3.`status` saleBatchStatus
76
+            t.house_id,
77
+            t.building_id,
78
+            t.block_id,
79
+            t.block_name,
80
+            t.sales_batch_id,
81
+            t.unit_id,
82
+            t.unit_name,
83
+            t.floor_id,
84
+            t.floor_name,
85
+            t.room_id,
86
+            t.room_name,
87
+            t.price,
88
+            t.heat,
89
+            t.real_heat,
90
+            t.apartment_id,
91
+            t.`status`,
92
+            t.org_id,
93
+            t2.apartment_name,
94
+            t2.inside_area,
95
+            t2.building_area,
96
+            t3.preselection_start_time,
97
+            t3.preselection_end_time,
98
+            t3.`status` saleBatchStatus
97 99
         FROM
98
-        ta_housing_resources t,
99
-        ta_building_apartment t2,
100
-        ta_sales_batch t3
100
+            ta_housing_resources t,
101
+            ta_building_apartment t2,
102
+            ta_sales_batch t3
101 103
         WHERE
102 104
         t.house_id = #{houseId}
103 105
         AND t.apartment_id = t2.apartment_id

+ 12
- 3
src/main/resources/mapper/TaPreselectionRecordMapper.xml Прегледај датотеку

@@ -5,18 +5,26 @@
5 5
     <select id="listPreselectionRecord" resultType="com.huiju.estateagents.po.TaPreselectionRecordPO">
6 6
         SELECT
7 7
             t3.*,
8
-            t4.building_name
8
+            t4.building_name,
9
+            t5.`status` saleBatchStatus
9 10
         FROM
10 11
             (
11 12
         SELECT
12
-            t.*,
13
+            t.preselection_record_id,
14
+            t.person_id,
15
+            t.org_id,
16
+            t.house_id,
17
+            t.`status`,
18
+            t.create_date,
13 19
             t2.block_name,
14 20
             t2.unit_name,
15 21
             t2.floor_name,
16 22
             t2.room_name,
17 23
             t2.price,
18 24
             t2.apartment_id,
19
-            t2.building_id buildingId
25
+            t2.building_id buildingId,
26
+            t2.`status` housingStatus,
27
+            t2.sales_batch_id saleBatchId
20 28
         FROM
21 29
             ta_preselection_record t,
22 30
             ta_housing_resources t2
@@ -27,6 +35,7 @@
27 35
             t.create_date DESC
28 36
             ) t3
29 37
             LEFT JOIN ta_building t4 ON t3.buildingId = t4.building_id
38
+            LEFT JOIN ta_sales_batch t5 ON t3.saleBatchId = t5.sales_batch_id
30 39
     </select>
31 40
 
32 41
     <select id="getRecordByPersonIdAndHouseId" resultType="com.huiju.estateagents.entity.TaPreselectionRecord">