顾绍勇 5 лет назад
Родитель
Сommit
1f5280c75e

+ 10
- 0
src/main/java/com/huiju/estateagents/po/TaPreselectionRecordPO.java Просмотреть файл

83
      * 最后修改人
83
      * 最后修改人
84
      */
84
      */
85
     private String updateName;
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
                     buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
79
                     buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
80
                     taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
80
                     taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
81
                     po.setBuildingImgList(taBuildingImgList);
81
                     po.setBuildingImgList(taBuildingImgList);
82
-                    resultList.add(po);
83
                 }
82
                 }
83
+                resultList.add(po);
84
             }
84
             }
85
             iPage.setRecords(resultList);
85
             iPage.setRecords(resultList);
86
         }
86
         }

+ 31
- 29
src/main/resources/mapper/TaHousingResourcesMapper.xml Просмотреть файл

17
             t.room_name,
17
             t.room_name,
18
             t.price,
18
             t.price,
19
             t.heat,
19
             t.heat,
20
+            t.real_heat,
20
             t.apartment_id,
21
             t.apartment_id,
21
             t.`status`,
22
             t.`status`,
22
             t.org_id,
23
             t.org_id,
56
 
57
 
57
     <update id="updateForAddHeat" parameterType="java.lang.String">
58
     <update id="updateForAddHeat" parameterType="java.lang.String">
58
         UPDATE ta_housing_resources t
59
         UPDATE ta_housing_resources t
59
-        SET t.heat = t.heat + 1
60
+        SET t.real_heat = t.real_heat + 1
60
         WHERE
61
         WHERE
61
             t.house_id = #{houseId}
62
             t.house_id = #{houseId}
62
-            AND t.heat >= 0
63
+            AND t.real_heat >= 0
63
     </update>
64
     </update>
64
 
65
 
65
     <update id="updateForSubtractHeat" parameterType="java.lang.String">
66
     <update id="updateForSubtractHeat" parameterType="java.lang.String">
66
         UPDATE ta_housing_resources t
67
         UPDATE ta_housing_resources t
67
-        SET t.heat = t.heat - 1
68
+        SET t.real_heat = t.real_heat - 1
68
         WHERE
69
         WHERE
69
             t.house_id = #{houseId}
70
             t.house_id = #{houseId}
70
-            AND t.heat > 0
71
+            AND t.real_heat > 0
71
     </update>
72
     </update>
72
 
73
 
73
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
74
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
74
         SELECT
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
         FROM
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
         WHERE
103
         WHERE
102
         t.house_id = #{houseId}
104
         t.house_id = #{houseId}
103
         AND t.apartment_id = t2.apartment_id
105
         AND t.apartment_id = t2.apartment_id

+ 12
- 3
src/main/resources/mapper/TaPreselectionRecordMapper.xml Просмотреть файл

5
     <select id="listPreselectionRecord" resultType="com.huiju.estateagents.po.TaPreselectionRecordPO">
5
     <select id="listPreselectionRecord" resultType="com.huiju.estateagents.po.TaPreselectionRecordPO">
6
         SELECT
6
         SELECT
7
             t3.*,
7
             t3.*,
8
-            t4.building_name
8
+            t4.building_name,
9
+            t5.`status` saleBatchStatus
9
         FROM
10
         FROM
10
             (
11
             (
11
         SELECT
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
             t2.block_name,
19
             t2.block_name,
14
             t2.unit_name,
20
             t2.unit_name,
15
             t2.floor_name,
21
             t2.floor_name,
16
             t2.room_name,
22
             t2.room_name,
17
             t2.price,
23
             t2.price,
18
             t2.apartment_id,
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
         FROM
28
         FROM
21
             ta_preselection_record t,
29
             ta_preselection_record t,
22
             ta_housing_resources t2
30
             ta_housing_resources t2
27
             t.create_date DESC
35
             t.create_date DESC
28
             ) t3
36
             ) t3
29
             LEFT JOIN ta_building t4 ON t3.buildingId = t4.building_id
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
     </select>
39
     </select>
31
 
40
 
32
     <select id="getRecordByPersonIdAndHouseId" resultType="com.huiju.estateagents.entity.TaPreselectionRecord">
41
     <select id="getRecordByPersonIdAndHouseId" resultType="com.huiju.estateagents.entity.TaPreselectionRecord">