傅行帆 5 år sedan
förälder
incheckning
036a74b14f

+ 21
- 0
src/main/java/com/huiju/estateagents/controller/TaHousingResourcesController.java Visa fil

@@ -8,6 +8,7 @@ import com.huiju.estateagents.common.CommConstant;
8 8
 import com.huiju.estateagents.entity.*;
9 9
 import com.huiju.estateagents.po.TaHousingResourcesPO;
10 10
 import com.huiju.estateagents.service.*;
11
+import org.apache.commons.lang3.StringUtils;
11 12
 import org.slf4j.Logger;
12 13
 import org.slf4j.LoggerFactory;
13 14
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
15 16
 import org.springframework.web.multipart.MultipartFile;
16 17
 
17 18
 import javax.servlet.http.HttpServletRequest;
19
+import java.util.ArrayList;
18 20
 import java.util.List;
19 21
 import java.util.stream.Collectors;
20 22
 
@@ -47,6 +49,12 @@ public class TaHousingResourcesController extends BaseController {
47 49
     @Autowired
48 50
     private ITaRaiseHouseService taRaiseHouseService;
49 51
 
52
+    @Autowired
53
+    public ITaBuildingApartmentService taBuildingApartmentService;
54
+
55
+    @Autowired
56
+    public ITaBuildingImgService taBuildingImgService;
57
+
50 58
     /**
51 59
      * 分页查询列表
52 60
      *
@@ -272,6 +280,19 @@ public class TaHousingResourcesController extends BaseController {
272 280
                         }
273 281
                     }
274 282
                 });
283
+
284
+                //塞入户型信息
285
+                if (!StringUtils.isEmpty(e.getApartmentId())) {
286
+                    TaBuildingApartment buildingApartment = taBuildingApartmentService.getById(e.getApartmentId());
287
+                    e.setApartmentName(buildingApartment.getApartmentName());
288
+                    e.setInsideArea(buildingApartment.getInsideArea());
289
+                    e.setBuildingArea(buildingApartment.getBuildingArea());
290
+                    //塞入户型图信息
291
+                    List<String> apartMentIds = new ArrayList<>();
292
+                    apartMentIds.add(e.getApartmentId());
293
+                    List<TaBuildingImg> apartMentList = taBuildingImgService.getAparemnetList(apartMentIds);
294
+                    e.setApartmentImgList(apartMentList);
295
+                }
275 296
             });
276 297
 
277 298
             responseBean.addSuccess(taHousingResourcesPOList);

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/WxPayServiceImpl.java Visa fil

@@ -408,8 +408,8 @@ public class WxPayServiceImpl implements IWxPayService {
408 408
         }
409 409
         //判断此房源有没有被锁定
410 410
         TaHousingResources taHousingResources = getHousingResourcesById(taRaiseHouseList.get(0).getHouseId());
411
-        if (CommConstant.HOUSE_LOCKING_STATUS_LOCKED.equals(taHousingResources.getHouseLockingStatus())){
412
-            throw new Exception("房源已被锁定暂时无法认筹。");
411
+        if (CommConstant.HOUSE_LOCKING_STATUS_LOCKED.equals(taHousingResources.getHouseLockingStatus()) && !taOrder.getPersonId().equals(taHousingResources.getHouseLockingPerson())){
412
+            throw new Exception("房源已被锁定暂时无法认筹。");
413 413
         }
414 414
         //锁定此房源并且更改认筹单的锁定状态
415 415
         changeLockingStatus(taRaiseRecord,taRaiseHouseList.get(0),taHousingResources);