|
@@ -143,13 +143,13 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
143
|
143
|
// lockedHouseResources(taHousingResources);
|
144
|
144
|
}
|
145
|
145
|
//判断销售批次是否是发布状态和房源是否正常状态
|
146
|
|
- checkHouseStatus(taRaiseRecord,orgId, personId, taRaise);
|
|
146
|
+ checkHouseStatus(taRaiseRecord, orgId, personId, taRaise);
|
147
|
147
|
|
148
|
148
|
//插入认筹单
|
149
|
149
|
saveRaiseRecord(taRaiseRecord, orgId, personId, taRaise);
|
150
|
150
|
|
151
|
151
|
//发送订阅消息
|
152
|
|
- sendRaiseMsg(taRaiseRecord.getRaiseRecordId(),personId,"在线选房认筹通知","已提交认筹","点击详情查看认筹单","房源紧俏,请赶紧缴费",true);
|
|
152
|
+ sendRaiseMsg(taRaiseRecord.getRaiseRecordId(), personId, "在线选房认筹通知", "已提交认筹", "点击详情查看认筹单", "房源紧俏,请赶紧缴费", true);
|
153
|
153
|
|
154
|
154
|
return taRaiseRecord;
|
155
|
155
|
}
|
|
@@ -158,23 +158,23 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
158
|
158
|
private void checkHouseStatus(TaRaiseRecord taRaiseRecord, Integer orgId, String personId, TaRaise taRaise) throws Exception {
|
159
|
159
|
//销售批次是否有效状态
|
160
|
160
|
TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(taRaise.getSalesBatchId());
|
161
|
|
- if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)){
|
|
161
|
+ if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)) {
|
162
|
162
|
throw new Exception("此销售批次已经取消发布!");
|
163
|
163
|
}
|
164
|
164
|
//判断房源是否已经删除
|
165
|
165
|
List<Integer> houseList = taRaiseRecord.getHouseList();
|
166
|
166
|
for (Integer houseId : houseList) {
|
167
|
167
|
TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(houseId);
|
168
|
|
- if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL){
|
|
168
|
+ if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {
|
169
|
169
|
throw new Exception("存在已经删除的房源!");
|
170
|
170
|
}
|
171
|
171
|
//判断我是否认筹过这些房源
|
172
|
172
|
QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
|
173
|
|
- taRaiseHouseQueryWrapper.eq("org_id",orgId);
|
174
|
|
- taRaiseHouseQueryWrapper.eq("house_id",houseId);
|
175
|
|
- taRaiseHouseQueryWrapper.eq("person_id",personId);
|
|
173
|
+ taRaiseHouseQueryWrapper.eq("org_id", orgId);
|
|
174
|
+ taRaiseHouseQueryWrapper.eq("house_id", houseId);
|
|
175
|
+ taRaiseHouseQueryWrapper.eq("person_id", personId);
|
176
|
176
|
List<TaRaiseHouse> taRaiseHouses = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
|
177
|
|
- if (taRaiseHouses.size() > 0){
|
|
177
|
+ if (taRaiseHouses.size() > 0) {
|
178
|
178
|
throw new Exception("存在已经认筹过的房源!");
|
179
|
179
|
}
|
180
|
180
|
}
|
|
@@ -237,7 +237,7 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
237
|
237
|
taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_LOCKED);
|
238
|
238
|
taRaiseHouse.setPersonId(personId);
|
239
|
239
|
taRaiseHouse.setPersonName(taPerson.getName());
|
240
|
|
- }else{
|
|
240
|
+ } else {
|
241
|
241
|
taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_UNLOCKED);
|
242
|
242
|
}
|
243
|
243
|
taRaiseHouse.setOrgId(orgId);
|
|
@@ -247,15 +247,15 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
247
|
247
|
//更新房源的实际热度
|
248
|
248
|
TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(e);
|
249
|
249
|
Integer raiseRealHeat = taHousingResources.getRaiseRealHeat();
|
250
|
|
- if (null == raiseRealHeat){
|
|
250
|
+ if (null == raiseRealHeat) {
|
251
|
251
|
raiseRealHeat = 0;
|
252
|
252
|
}
|
253
|
|
- taHousingResources.setRaiseRealHeat(raiseRealHeat+1);
|
|
253
|
+ taHousingResources.setRaiseRealHeat(raiseRealHeat + 1);
|
254
|
254
|
taHousingResourcesMapper.updateById(taHousingResources);
|
255
|
255
|
});
|
256
|
256
|
|
257
|
257
|
//把idcard字断更新进person表
|
258
|
|
- if (StringUtil.isEmpty(taPerson.getIdcard())){
|
|
258
|
+ if (StringUtil.isEmpty(taPerson.getIdcard())) {
|
259
|
259
|
taPerson.setIdcard(taRaiseRecord.getIdcard());
|
260
|
260
|
taPersonMapper.updateById(taPerson);
|
261
|
261
|
}
|
|
@@ -276,15 +276,15 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
276
|
276
|
/**
|
277
|
277
|
* 发送认筹订阅消息
|
278
|
278
|
*
|
279
|
|
- * @param raiseRecordId 认筹单ID
|
280
|
|
- * @param personId 用户ID
|
281
|
|
- * @param title 审核类型
|
282
|
|
- * @param result 审核结果
|
283
|
|
- * @param remark 失败原因
|
284
|
|
- * @param isSuccess 是否成功 true是(只有成功才发送短信)
|
|
279
|
+ * @param raiseRecordId 认筹单ID
|
|
280
|
+ * @param personId 用户ID
|
|
281
|
+ * @param title 审核类型
|
|
282
|
+ * @param result 审核结果
|
|
283
|
+ * @param remark 失败原因
|
|
284
|
+ * @param isSuccess 是否成功 true是(只有成功才发送短信)
|
285
|
285
|
*/
|
286
|
286
|
@Override
|
287
|
|
- public void sendRaiseMsg(Integer raiseRecordId, String personId, String title, String result, String reason,String remark, Boolean isSuccess) {
|
|
287
|
+ public void sendRaiseMsg(Integer raiseRecordId, String personId, String title, String result, String reason, String remark, Boolean isSuccess) {
|
288
|
288
|
logger.info("sendSubscribeMsg 接收参数:houseId:{},checkType:{},result:{},reason:{}, remark:{}",
|
289
|
289
|
raiseRecordId, title, result, reason, remark);
|
290
|
290
|
|