Преглед на файлове

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

傅行帆 преди 5 години
родител
ревизия
4d6fd7c946

+ 8
- 1
src/main/java/com/huiju/estateagents/mapper/TaHousingResourcesMapper.java Целия файл

@@ -82,6 +82,13 @@ public interface TaHousingResourcesMapper extends BaseMapper<TaHousingResources>
82 82
      */
83 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 93
      * 根据房源ID获取房源详情
87 94
      *
@@ -133,7 +140,7 @@ public interface TaHousingResourcesMapper extends BaseMapper<TaHousingResources>
133 140
                                  @Param("orgId") Integer orgId);
134 141
 
135 142
     /**
136
-     * 批量更新房源认筹基础认读
143
+     * 批量更新房源认筹基础热度
137 144
      *
138 145
      * @param housingResourcesList
139 146
      * @param heat

+ 2
- 0
src/main/java/com/huiju/estateagents/service/ITaPreselectionRecordService.java Целия файл

@@ -59,4 +59,6 @@ public interface ITaPreselectionRecordService extends IService<TaPreselectionRec
59 59
      */
60 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 Целия файл

@@ -240,11 +240,21 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
240 240
     public ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId) {
241 241
         ResponseBean responseBean = new ResponseBean();
242 242
 
243
+        // 更新房源表热度信息
244
+        for (TaPreselectionRecord tp : preselectionRecordList) {
245
+            taHousingResourcesMapper.updateForSubtractHeat(tp.getHouseId());
246
+        }
247
+
243 248
         taPreselectionRecordMapper.batchDeletePreselectRecord(preselectionRecordList, orgId, userId);
244 249
         responseBean.addSuccess("success");
245 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 Целия файл

@@ -230,6 +230,14 @@
230 230
             AND t.real_heat > 0
231 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 241
     <select id="getHousingDetailById" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
234 242
         SELECT
235 243
         t.house_id,
@@ -257,6 +265,7 @@
257 265
         t3.preselection_start_time,
258 266
         t3.preselection_end_time,
259 267
         t3.`status` saleBatchStatus,
268
+        t3.display_house_price,
260 269
         t4.building_name buildingName
261 270
         FROM
262 271
         ta_housing_resources t

+ 1
- 1
src/main/resources/mapper/TaPreselectionRecordMapper.xml Целия файл

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