瀏覽代碼

* 取消预选不发送订阅消息

顾绍勇 5 年之前
父節點
當前提交
d8a3b0c160
共有 1 個檔案被更改,包括 4 行新增15 行删除
  1. 4
    15
      src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java

+ 4
- 15
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java 查看文件

@@ -177,31 +177,23 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
177 177
         logger.info("taPreselectionRecordCancel 接收参数:personId:{},houseId:{}", personId, houseId);
178 178
 
179 179
         ResponseBean responseBean = new ResponseBean<>();
180
-        String tip;
181
-        String checkType = "取消预选";
182 180
 
183 181
         // 校验是否已经取消
184 182
         TaPreselectionRecord preselectionRecord = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
185 183
         if (preselectionRecord == null) {
186
-            tip = "未预选过此房源,或已取消预选此房源";
187
-            sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
188
-            responseBean.addError(tip);
184
+            responseBean.addError("未预选过此房源,或已取消预选此房源");
189 185
             return responseBean;
190 186
         }
191 187
 
192 188
         TaHousingResourcesPO resourcesPO = taHousingResourcesMapper.getHousingDetailById(houseId, "0");
193 189
         if (resourcesPO == null || 1 != resourcesPO.getStatus()) {
194
-            tip = "当前房源已临时取消发布,请稍后再试或联系置业顾问了解详情。";
195
-            sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
196
-            responseBean.addError(tip);
190
+            responseBean.addError("当前房源已临时取消发布,请稍后再试或联系置业顾问了解详情。");
197 191
             return responseBean;
198 192
         }
199 193
 
200 194
         // 校验当前批次状态是否为已发布
201 195
         if (resourcesPO.getSaleBatchStatus() != 1) {
202
-            tip = "当前销售批次已临时取消发布,请稍后再试或联系置业顾问了解详情。";
203
-            sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
204
-            responseBean.addError(tip);
196
+            responseBean.addError("当前销售批次已临时取消发布,请稍后再试或联系置业顾问了解详情。");
205 197
             return responseBean;
206 198
         }
207 199
 
@@ -216,12 +208,9 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
216 208
         Boolean result = taHousingResourcesMapper.updateForSubtractHeat(houseId);
217 209
         if (result) {
218 210
             responseBean.addSuccess(result);
219
-            sendSubscribeMsg(houseId, personId, checkType, "成功", "无", true);
220 211
             return responseBean;
221 212
         }
222
-        tip = "未知原因失败,请联系置业顾问。";
223
-        sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
224
-        responseBean.addError(tip);
213
+        responseBean.addError("未知原因失败,请联系置业顾问。");
225 214
         return responseBean;
226 215
     }
227 216