傅行帆 5 年 前
コミット
f2964f1ec7

+ 12
- 0
src/main/java/com/huiju/estateagents/po/TaHousingResourcesPO.java ファイルの表示

@@ -92,4 +92,16 @@ public class TaHousingResourcesPO extends TaHousingResources {
92 92
      */
93 93
     @TableField(exist = false)
94 94
     private String raiseHouseId;
95
+
96
+    /**
97
+     * 是否展示预选按钮
98
+     */
99
+    @TableField(exist = false)
100
+    private Boolean preselectionBtn;
101
+
102
+    /**
103
+     * 是否展示认筹按钮
104
+     */
105
+    @TableField(exist = false)
106
+    private Boolean raiseBtn;
95 107
 }

+ 30
- 0
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java ファイルの表示

@@ -93,6 +93,11 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
93 93
     @Autowired
94 94
     private TaRaiseHouseServiceImpl taRaiseHouseService;
95 95
 
96
+    @Autowired
97
+    private TaPreselectionMapper taPreselectionMapper;
98
+
99
+    @Autowired
100
+    private TaRaiseMapper taRaiseMapper;
96 101
 
97 102
     /**
98 103
      * 分页获取房源列表
@@ -228,6 +233,31 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
228 233
         }
229 234
 
230 235
         resourcesPO.setBuildingImgList(buildingImgPOList);
236
+
237
+        //是否展示预选按钮
238
+        Integer salesBatchId = resourcesPO.getSalesBatchId();
239
+        Integer orgId = resourcesPO.getOrgId();
240
+        resourcesPO.setPreselectionBtn(true);
241
+        resourcesPO.setRaiseBtn(true);
242
+        QueryWrapper<TaPreselection> taPreselectionQueryWrapper = new QueryWrapper<>();
243
+        taPreselectionQueryWrapper.eq("sales_batch_id",salesBatchId);
244
+        taPreselectionQueryWrapper.eq("org_id",orgId);
245
+        taPreselectionQueryWrapper.eq("status",CommConstant.STATUS_NORMAL);
246
+        TaPreselection taPreselection = taPreselectionMapper.selectOne(taPreselectionQueryWrapper);
247
+        if (null == taPreselection){
248
+            resourcesPO.setPreselectionBtn(false);
249
+        }
250
+
251
+        //是否展示认筹按钮
252
+        QueryWrapper<TaRaise> taRaiseQueryWrapper = new QueryWrapper<>();
253
+        taRaiseQueryWrapper.eq("sales_batch_id",salesBatchId);
254
+        taRaiseQueryWrapper.eq("org_id",orgId);
255
+        taRaiseQueryWrapper.eq("status",CommConstant.STATUS_NORMAL);
256
+        TaRaise taRaise = taRaiseMapper.selectOne(taRaiseQueryWrapper);
257
+        if (null == taRaise){
258
+            resourcesPO.setRaiseBtn(false);
259
+        }
260
+
231 261
         return resourcesPO;
232 262
     }
233 263