|
@@ -114,7 +114,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
114
|
114
|
TaPreselectionRecord record = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
|
115
|
115
|
if (record != null) {
|
116
|
116
|
tip = "已预选过此房源,请到选房记录中查看。";
|
117
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
117
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
118
|
118
|
responseBean.addError(tip);
|
119
|
119
|
return responseBean;
|
120
|
120
|
}
|
|
@@ -122,7 +122,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
122
|
122
|
TaHousingResourcesPO resourcesPO = taHousingResourcesMapper.getHousingDetailById(taPreselectionRecord.getHouseId(), "0");
|
123
|
123
|
if (resourcesPO == null) {
|
124
|
124
|
tip = "未知原因失败,请联系置业顾问。";
|
125
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
125
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
126
|
126
|
responseBean.addError(tip);
|
127
|
127
|
return responseBean;
|
128
|
128
|
}
|
|
@@ -130,7 +130,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
130
|
130
|
// 校验当前批次状态是否为已发布
|
131
|
131
|
if (resourcesPO.getSaleBatchStatus() != 1) {
|
132
|
132
|
tip = "当前销售批次已临时取消发布,请稍后再试或联系置业顾问了解详情。";
|
133
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
133
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
134
|
134
|
responseBean.addError(tip);
|
135
|
135
|
return responseBean;
|
136
|
136
|
}
|
|
@@ -138,7 +138,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
138
|
138
|
// 校验当前房源状态是否为已发布
|
139
|
139
|
if (1 != resourcesPO.getStatus()) {
|
140
|
140
|
tip = "当前房源已临时取消发布,请稍后再试或联系置业顾问了解详情。";
|
141
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
141
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
142
|
142
|
responseBean.addError(tip);
|
143
|
143
|
return responseBean;
|
144
|
144
|
}
|
|
@@ -146,7 +146,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
146
|
146
|
// 校验预选操作时间是否在规定范围内
|
147
|
147
|
if (!DateUtils.checkTimeRange(resourcesPO.getPreselectionStartTime(), resourcesPO.getPreselectionEndTime(), null)) {
|
148
|
148
|
tip = "当前时间不在预选时间范围内,请联系置业顾问了解详情。";
|
149
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
149
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
150
|
150
|
responseBean.addError(tip);
|
151
|
151
|
return responseBean;
|
152
|
152
|
}
|
|
@@ -160,12 +160,12 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
160
|
160
|
// 更新房源表热度
|
161
|
161
|
Boolean result = taHousingResourcesMapper.updateForAddHeat(taPreselectionRecord.getHouseId());
|
162
|
162
|
if (result) {
|
163
|
|
- sendSubscribeMsg(houseId, personId, checkType, "成功", "");
|
|
163
|
+ sendSubscribeMsg(houseId, personId, checkType, "成功", "无", true);
|
164
|
164
|
responseBean.addSuccess(taPreselectionRecord);
|
165
|
165
|
return responseBean;
|
166
|
166
|
}
|
167
|
167
|
tip = "未知原因失败,请联系置业顾问。";
|
168
|
|
- sendSubscribeMsg(houseId, personId, checkType, "失败", tip);
|
|
168
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
169
|
169
|
responseBean.addError(tip);
|
170
|
170
|
return responseBean;
|
171
|
171
|
}
|
|
@@ -183,7 +183,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
183
|
183
|
TaPreselectionRecord preselectionRecord = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
|
184
|
184
|
if (preselectionRecord == null) {
|
185
|
185
|
tip = "未预选过此房源,或已取消预选此房源";
|
186
|
|
- sendSubscribeMsg(houseId,personId,checkType,"失败",tip);
|
|
186
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
187
|
187
|
responseBean.addError(tip);
|
188
|
188
|
return responseBean;
|
189
|
189
|
}
|
|
@@ -191,7 +191,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
191
|
191
|
TaHousingResourcesPO resourcesPO = taHousingResourcesMapper.getHousingDetailById(houseId, "0");
|
192
|
192
|
if (resourcesPO == null || 1 != resourcesPO.getStatus()) {
|
193
|
193
|
tip = "当前房源已临时取消发布,请稍后再试或联系置业顾问了解详情。";
|
194
|
|
- sendSubscribeMsg(houseId,personId,checkType,"失败",tip);
|
|
194
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
195
|
195
|
responseBean.addError(tip);
|
196
|
196
|
return responseBean;
|
197
|
197
|
}
|
|
@@ -199,7 +199,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
199
|
199
|
// 校验当前批次状态是否为已发布
|
200
|
200
|
if (resourcesPO.getSaleBatchStatus() != 1) {
|
201
|
201
|
tip = "当前销售批次已临时取消发布,请稍后再试或联系置业顾问了解详情。";
|
202
|
|
- sendSubscribeMsg(houseId,personId,checkType,"失败",tip);
|
|
202
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
203
|
203
|
responseBean.addError(tip);
|
204
|
204
|
return responseBean;
|
205
|
205
|
}
|
|
@@ -215,10 +215,11 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
215
|
215
|
Boolean result = taHousingResourcesMapper.updateForSubtractHeat(houseId);
|
216
|
216
|
if (result) {
|
217
|
217
|
responseBean.addSuccess(result);
|
|
218
|
+ sendSubscribeMsg(houseId, personId, checkType, "成功", "无", true);
|
218
|
219
|
return responseBean;
|
219
|
220
|
}
|
220
|
221
|
tip = "未知原因失败,请联系置业顾问。";
|
221
|
|
- sendSubscribeMsg(houseId,personId,checkType,"失败",tip);
|
|
222
|
+ sendSubscribeMsg(houseId, personId, checkType, "失败", tip, false);
|
222
|
223
|
responseBean.addError(tip);
|
223
|
224
|
return responseBean;
|
224
|
225
|
}
|
|
@@ -240,8 +241,9 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
240
|
241
|
* @param checkType 审核类型
|
241
|
242
|
* @param result 审核结果
|
242
|
243
|
* @param failReason 失败原因
|
|
244
|
+ * @param isSuccess 是否成功 true是(只有成功才发送短信)
|
243
|
245
|
*/
|
244
|
|
- public void sendSubscribeMsg(String houseId, String personId, String checkType, String result, String failReason) {
|
|
246
|
+ public void sendSubscribeMsg(String houseId, String personId, String checkType, String result, String failReason, Boolean isSuccess) {
|
245
|
247
|
logger.info("sendSubscribeMsg 接收参数:houseId:{},checkType:{},result:{},failReason:{}",
|
246
|
248
|
houseId, checkType, result, failReason);
|
247
|
249
|
|
|
@@ -263,9 +265,9 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
263
|
265
|
}
|
264
|
266
|
|
265
|
267
|
String link = "";
|
266
|
|
- String remark = "";
|
267
|
|
- String progranName = po.getBuildingName() + po.getTermName() + po.getBlockName() + po.getUnitName() + po.getFloorName() + po.getRoomName();
|
268
|
|
- miniAppService.sendCheckMessage(toUser, link, checkType, result, progranName, failReason, remark, LocalDateTime.now());
|
|
268
|
+ String progranName = (po.getBuildingName() + po.getTermName() + po.getBlockName() + po.getUnitName() + po.getFloorName() + po.getRoomName()).replace("null", "");
|
|
269
|
+ String remark = progranName;
|
|
270
|
+ miniAppService.sendCheckMessage(toUser, link, checkType, result, progranName, failReason, remark, LocalDateTime.now(), isSuccess);
|
269
|
271
|
logger.info("sendSubscribeMsg 结束");
|
270
|
272
|
});
|
271
|
273
|
}
|