Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

# Conflicts:
#	src/main/java/com/huiju/estateagents/controller/TaHousingResourcesController.java
傅行帆 5 years ago
parent
commit
2332825373

+ 3
- 3
src/main/java/com/huiju/estateagents/controller/TaHousingResourcesController.java View File

228
         Integer orgId = getOrgId(request);
228
         Integer orgId = getOrgId(request);
229
         String personId = getPersonId(request);
229
         String personId = getPersonId(request);
230
 
230
 
231
-        logger.info("TaHouseingResourcesController.listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
232
-                orgId, salesBatchId, startPrice, endPrice, apartmentId);
231
+        logger.info("TaHouseingResourcesController.listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{},source:{}",
232
+                orgId, salesBatchId, startPrice, endPrice, apartmentId, source);
233
 
233
 
234
         try {
234
         try {
235
             //获取所有楼房的预选热度和认筹热度
235
             //获取所有楼房的预选热度和认筹热度
488
      * @return
488
      * @return
489
      */
489
      */
490
     @RequestMapping(value = "/admin/house/updateLockingStatus", method = RequestMethod.PUT)
490
     @RequestMapping(value = "/admin/house/updateLockingStatus", method = RequestMethod.PUT)
491
-    public ResponseBean updateLockingStatus(Integer houseId, String type, Integer raiseHouseId, String personId,Integer raiseRecordId,
491
+    public ResponseBean updateLockingStatus(Integer houseId, String type, Integer raiseHouseId, String personId, Integer raiseRecordId,
492
                                             HttpServletRequest request) {
492
                                             HttpServletRequest request) {
493
         ResponseBean responseBean = new ResponseBean();
493
         ResponseBean responseBean = new ResponseBean();
494
         try {
494
         try {

+ 6
- 0
src/main/java/com/huiju/estateagents/po/TaHousingResourcesPO.java View File

107
      */
107
      */
108
     @TableField(exist = false)
108
     @TableField(exist = false)
109
     private Integer raiseRecordId;
109
     private Integer raiseRecordId;
110
+
111
+    /**
112
+     * 是否展示房源价格
113
+     */
114
+    @TableField(exist = false)
115
+    private Boolean displayHousePrice;
110
 }
116
 }

+ 6
- 0
src/main/java/com/huiju/estateagents/po/TaPreselectionRecordPO.java View File

110
      */
110
      */
111
     @TableField(exist = false)
111
     @TableField(exist = false)
112
     private TaHousingResources housingInfo;
112
     private TaHousingResources housingInfo;
113
+
114
+    /**
115
+     * 是否展示房源价格
116
+     */
117
+    @TableField(exist = false)
118
+    private Boolean displayHousePrice;
113
 }
119
 }

+ 10
- 31
src/main/resources/mapper/TaHousingResourcesMapper.xml View File

8
         FROM
8
         FROM
9
         (
9
         (
10
         SELECT
10
         SELECT
11
-        t.house_id,
11
+        t.*,
12
         (
12
         (
13
         CASE
13
         CASE
14
         WHEN ( SELECT num_char_extract ( t.term_name, 2 ) + 0 ) = 0 THEN
14
         WHEN ( SELECT num_char_extract ( t.term_name, 2 ) + 0 ) = 0 THEN
27
         ( SELECT num_char_extract ( t.unit_name, 2 ) ) ELSE ( SELECT num_char_extract ( t.unit_name, 2 ) + 0 )
27
         ( SELECT num_char_extract ( t.unit_name, 2 ) ) ELSE ( SELECT num_char_extract ( t.unit_name, 2 ) + 0 )
28
         END
28
         END
29
         ) unitNamePre,
29
         ) unitNamePre,
30
-        t.building_id,
31
-        t.block_id,
32
-        t.block_name,
33
-        t.sales_batch_id,
34
-        t.unit_id,
35
-        t.unit_name,
36
-        t.floor_id,
37
-        t.floor_name,
38
-        t.room_id,
39
-        t.room_name,
40
-        t.price,
41
-        t.heat,
42
-        t.real_heat,
43
-        t.apartment_id,
44
-        t.`status`,
45
-        t.org_id,
46
         t2.inside_area,
30
         t2.inside_area,
47
         t2.building_area,
31
         t2.building_area,
48
-        t2.apartment_name,
49
-        t3.term_id,
50
-        t.term_name,
51
-        t.raise_heat,
52
-        t.raise_real_heat,
53
-        t.house_locking_status
32
+        t2.apartment_name
54
         FROM
33
         FROM
55
         ta_housing_resources t
34
         ta_housing_resources t
56
         LEFT JOIN ta_building_apartment t2 ON t.apartment_id = t2.apartment_id
35
         LEFT JOIN ta_building_apartment t2 ON t.apartment_id = t2.apartment_id
57
-        LEFT JOIN ta_building_block t3 ON t.block_id = t3.block_id
58
         LEFT JOIN ta_sales_batch t4 ON t.sales_batch_id = t4.sales_batch_id
36
         LEFT JOIN ta_sales_batch t4 ON t.sales_batch_id = t4.sales_batch_id
59
         <if test="source == 'raiseChoose'">
37
         <if test="source == 'raiseChoose'">
60
             LEFT JOIN ta_raise_house t5 ON t.house_id = t5.house_id
38
             LEFT JOIN ta_raise_house t5 ON t.house_id = t5.house_id
61
             LEFT JOIN ta_raise_record t6 ON t6.raise_record_id = t5.raise_record_id
39
             LEFT JOIN ta_raise_record t6 ON t6.raise_record_id = t5.raise_record_id
40
+            LEFT JOIN ta_raise t7 ON t.sales_batch_id = t7.sales_batch_id
62
         </if>
41
         </if>
63
         WHERE
42
         WHERE
64
-        t.sales_batch_id = #{salesBatchId}
65
-        AND t.org_id = #{orgId}
66
-        AND t.`status` > 0
67
-        AND t4.`status` = 1
43
+            t.sales_batch_id = #{salesBatchId}
44
+            AND t.org_id = #{orgId}
45
+            AND t.`status` > 0
46
+            AND t4.`status` = 1
68
         <if test = "source == 'raiseChoose'">
47
         <if test = "source == 'raiseChoose'">
69
             AND ( t6.`status` != 0 OR t6.`status` IS NULL )
48
             AND ( t6.`status` != 0 OR t6.`status` IS NULL )
49
+            AND (t.house_locking_status  != 'locked' OR t.house_locking_status IS NULL)
50
+            AND t7.raise_start_time &lt;= now( ) AND t7.raise_end_time &gt;= now()
70
             <if test="personId != null and personId != ''">
51
             <if test="personId != null and personId != ''">
71
-                AND t6.person_id != #{personId}
52
+                AND (t6.person_id != #{personId} OR t6.person_id IS NULL)
72
             </if>
53
             </if>
73
-            AND (t.house_locking_status  != 'locked'
74
-            OR t.house_locking_status IS NULL)
75
         </if>
54
         </if>
76
         <choose>
55
         <choose>
77
             <when test=" endPrice != null and startPrice == null">
56
             <when test=" endPrice != null and startPrice == null">

+ 2
- 1
src/main/resources/mapper/TaPreselectionRecordMapper.xml View File

14
             t2.apartment_id,
14
             t2.apartment_id,
15
             t2.building_id buildingId,
15
             t2.building_id buildingId,
16
             t2.`status` housingStatus,
16
             t2.`status` housingStatus,
17
-            t3.`status` saleBatchStatus
17
+            t3.`status` saleBatchStatus,
18
+            t3.display_house_price
18
         FROM
19
         FROM
19
             ta_preselection_record t
20
             ta_preselection_record t
20
         LEFT JOIN ta_housing_resources t2 ON t.house_id = t2.house_id
21
         LEFT JOIN ta_housing_resources t2 ON t.house_id = t2.house_id