Quellcode durchsuchen

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

张延森 vor 5 Jahren
Ursprung
Commit
173dfa716e

+ 6
- 6
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java Datei anzeigen

@@ -765,6 +765,12 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
765 765
             if (taHousingResources.getSalesBatchId() != taHousingResourcesChecked.getSalesBatchId()){
766 766
                 throw new Exception("非同一批次房源");
767 767
             }
768
+            if (taHousingResourcesChecked.getStatus() != CommConstant.STATUS_NORMAL) {
769
+                throw new Exception("其中有房源已被取消发布");
770
+            }
771
+            if (taRaise.getHouseLockingType().equals(CommConstant.HOUSE_LOCKING_TYPE_AUTO) && CommConstant.HOUSE_LOCKING_STATUS_LOCKED.equals(taHousingResourcesChecked.getHouseLockingStatus())){
772
+                throw new Exception("房源已被其他客户锁定");
773
+            }
768 774
             if (taRaise.getNeedPreselection()) {
769 775
                 //查看是否有当前房源的预选记录
770 776
                 QueryWrapper<TaPreselectionRecord> preselectionRecordQueryWrapper = new QueryWrapper<>();
@@ -789,12 +795,6 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
789 795
 //            }
790 796
 
791 797
         }
792
-        if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {
793
-            throw new Exception("房源已被取消发布");
794
-        }
795
-        if (taRaise.getHouseLockingType().equals(CommConstant.HOUSE_LOCKING_TYPE_AUTO) && CommConstant.HOUSE_LOCKING_STATUS_LOCKED.equals(taHousingResources.getHouseLockingStatus())){
796
-            throw new Exception("房源已被其他客户锁定");
797
-        }
798 798
         //销售批次信息
799 799
         TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(taHousingResources.getSalesBatchId());
800 800
         //销售批次校验

+ 5
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Datei anzeigen

@@ -114,9 +114,11 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
114 114
             TaHousingResources housingResources = taHousingResourcesService.getOne(housingQueryWrapper);
115 115
             //户型图name
116 116
             TaBuildingApartment buildingApartment = taBuildingApartmentService.getById(housingResources.getApartmentId());
117
-            housingResources.setApartmentName(buildingApartment.getApartmentName());
118
-            housingResources.setBuildingArea(buildingApartment.getBuildingArea());
119
-            housingResources.setInsideArea(buildingApartment.getInsideArea());
117
+            if (null != buildingApartment){
118
+                housingResources.setApartmentName(buildingApartment.getApartmentName());
119
+                housingResources.setBuildingArea(buildingApartment.getBuildingArea());
120
+                housingResources.setInsideArea(buildingApartment.getInsideArea());
121
+            }
120 122
             record.setHousingInfo(housingResources);
121 123
         });
122 124
 

+ 0
- 2
src/main/java/com/huiju/estateagents/service/impl/WxPayServiceImpl.java Datei anzeigen

@@ -253,7 +253,6 @@ public class WxPayServiceImpl implements IWxPayService {
253 253
             QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
254 254
             taRaiseHouseQueryWrapper.eq("org_id",taOrder.getOrgId());
255 255
             taRaiseHouseQueryWrapper.eq("raise_record_id",taRaiseRecord.getRaiseRecordId());
256
-            taRaiseHouseQueryWrapper.eq("person_id",taOrder.getPersonId());
257 256
             TaRaiseHouse taRaiseHouse = taRaiseHouseMapper.selectOne(taRaiseHouseQueryWrapper);
258 257
 
259 258
             //获取房源
@@ -401,7 +400,6 @@ public class WxPayServiceImpl implements IWxPayService {
401 400
         QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
402 401
         taRaiseHouseQueryWrapper.eq("org_id",taOrder.getOrgId());
403 402
         taRaiseHouseQueryWrapper.eq("raise_record_id",taRaiseRecord.getRaiseRecordId());
404
-        taRaiseHouseQueryWrapper.eq("person_id",taOrder.getPersonId());
405 403
         List<TaRaiseHouse> taRaiseHouseList = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
406 404
         if (taRaiseHouseList.size() != 1){
407 405
             throw new Exception("自动锁房只能认筹一个房源。");

+ 1
- 1
src/main/resources/mapper/TaHousingResourcesMapper.xml Datei anzeigen

@@ -342,7 +342,7 @@
342 342
             t.*,
343 343
             t2.raise_house_id,
344 344
             t3.person_id lockingPersonId,
345
-            t3.name lockingPersonName
345
+            ifnull(t3.name, t3.nickname ) lockingPersonName
346 346
         FROM
347 347
             ta_housing_resources t
348 348
             LEFT JOIN ta_raise_house t2 ON t.house_id = t2.house_id