|
@@ -123,7 +123,6 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
123
|
123
|
}
|
124
|
124
|
//判断销售批次是否是发布状态和房源是否正常状态
|
125
|
125
|
checkHouseStatus(taRaiseRecord,orgId, personId, taRaise);
|
126
|
|
- //判断我是否认筹过这些房源
|
127
|
126
|
|
128
|
127
|
//插入认筹单
|
129
|
128
|
saveRaiseRecord(taRaiseRecord, orgId, personId, taRaise);
|
|
@@ -138,7 +137,23 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
|
138
|
137
|
if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)){
|
139
|
138
|
throw new Exception("此销售批次已经取消发布!");
|
140
|
139
|
}
|
141
|
|
- //
|
|
140
|
+ //判断房源是否已经删除
|
|
141
|
+ List<Integer> houseList = taRaiseRecord.getHouseList();
|
|
142
|
+ for (Integer houseId : houseList) {
|
|
143
|
+ TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(houseId);
|
|
144
|
+ if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL){
|
|
145
|
+ throw new Exception("存在已经删除的房源!");
|
|
146
|
+ }
|
|
147
|
+ //判断我是否认筹过这些房源
|
|
148
|
+ QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
|
|
149
|
+ taRaiseHouseQueryWrapper.eq("org_id",orgId);
|
|
150
|
+ taRaiseHouseQueryWrapper.eq("house_id",houseId);
|
|
151
|
+ taRaiseHouseQueryWrapper.eq("person_id",personId);
|
|
152
|
+ List<TaRaiseHouse> taRaiseHouses = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
|
|
153
|
+ if (taRaiseHouses.size() > 0){
|
|
154
|
+ throw new Exception("存在已经认筹过的房源!");
|
|
155
|
+ }
|
|
156
|
+ }
|
142
|
157
|
}
|
143
|
158
|
|
144
|
159
|
@Override
|