Parcourir la source

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

傅行帆 il y a 5 ans
Parent
révision
4d6fd7c946

+ 8
- 1
src/main/java/com/huiju/estateagents/mapper/TaHousingResourcesMapper.java Voir le fichier

82
      */
82
      */
83
     Boolean updateForSubtractHeat(@Param("houseId") Integer houseId);
83
     Boolean updateForSubtractHeat(@Param("houseId") Integer houseId);
84
 
84
 
85
+    /**
86
+     * 减少认筹热度值
87
+     * @param houseId
88
+     * @return
89
+     */
90
+    Boolean updateForSubtractRaiseHeat(@Param("houseId") Integer houseId);
91
+
85
     /**
92
     /**
86
      * 根据房源ID获取房源详情
93
      * 根据房源ID获取房源详情
87
      *
94
      *
133
                                  @Param("orgId") Integer orgId);
140
                                  @Param("orgId") Integer orgId);
134
 
141
 
135
     /**
142
     /**
136
-     * 批量更新房源认筹基础认读
143
+     * 批量更新房源认筹基础热度
137
      *
144
      *
138
      * @param housingResourcesList
145
      * @param housingResourcesList
139
      * @param heat
146
      * @param heat

+ 2
- 0
src/main/java/com/huiju/estateagents/service/ITaPreselectionRecordService.java Voir le fichier

59
      */
59
      */
60
     ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId);
60
     ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId);
61
 
61
 
62
+    Boolean updateForSubtractRaiseHeat(Integer houseId);
63
+
62
 }
64
 }

+ 10
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Voir le fichier

240
     public ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId) {
240
     public ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId) {
241
         ResponseBean responseBean = new ResponseBean();
241
         ResponseBean responseBean = new ResponseBean();
242
 
242
 
243
+        // 更新房源表热度信息
244
+        for (TaPreselectionRecord tp : preselectionRecordList) {
245
+            taHousingResourcesMapper.updateForSubtractHeat(tp.getHouseId());
246
+        }
247
+
243
         taPreselectionRecordMapper.batchDeletePreselectRecord(preselectionRecordList, orgId, userId);
248
         taPreselectionRecordMapper.batchDeletePreselectRecord(preselectionRecordList, orgId, userId);
244
         responseBean.addSuccess("success");
249
         responseBean.addSuccess("success");
245
         return responseBean;
250
         return responseBean;
246
     }
251
     }
247
 
252
 
253
+    @Override
254
+    public Boolean updateForSubtractRaiseHeat(Integer houseId) {
255
+        return taHousingResourcesMapper.updateForSubtractRaiseHeat(houseId);
256
+    }
257
+
248
     /**
258
     /**
249
      * 发送订阅消息
259
      * 发送订阅消息
250
      *
260
      *

+ 9
- 0
src/main/resources/mapper/TaHousingResourcesMapper.xml Voir le fichier

230
             AND t.real_heat > 0
230
             AND t.real_heat > 0
231
     </update>
231
     </update>
232
 
232
 
233
+    <update id="updateForSubtractRaiseHeat" parameterType="java.lang.Integer">
234
+        UPDATE ta_housing_resources t
235
+        SET t.raise_real_heat = IFNULL(t.raise_real_heat, 0) - 1
236
+        WHERE
237
+            t.house_id = #{houseId}
238
+            AND t.raise_real_heat > 0
239
+    </update>
240
+
233
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
241
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
234
         SELECT
242
         SELECT
235
         t.house_id,
243
         t.house_id,
257
         t3.preselection_start_time,
265
         t3.preselection_start_time,
258
         t3.preselection_end_time,
266
         t3.preselection_end_time,
259
         t3.`status` saleBatchStatus,
267
         t3.`status` saleBatchStatus,
268
+        t3.display_house_price,
260
         t4.building_name buildingName
269
         t4.building_name buildingName
261
         FROM
270
         FROM
262
         ta_housing_resources t
271
         ta_housing_resources t

+ 1
- 1
src/main/resources/mapper/TaPreselectionRecordMapper.xml Voir le fichier

55
                 AND t6.person_id != #{personId}
55
                 AND t6.person_id != #{personId}
56
             </if>
56
             </if>
57
           GROUP BY
57
           GROUP BY
58
-            t6.house_id
58
+            t6.preselection_record_id
59
          ORDER BY
59
          ORDER BY
60
             t3.create_date DESC
60
             t3.create_date DESC
61
 
61