瀏覽代碼

新需求筛选

傅行帆 5 年之前
父節點
當前提交
a099f95078

+ 11
- 5
src/main/java/com/huiju/estateagents/controller/TaPreselectionRecordController.java 查看文件

@@ -194,14 +194,20 @@ public class TaPreselectionRecordController extends BaseController {
194 194
      * @author gushaoyong
195 195
      */
196 196
     @RequestMapping(value = "/wx/listPreselectionRecord", method = RequestMethod.GET)
197
-    public ResponseBean listPreselectionRecord(@RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
198
-                                               @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
199
-                                               @RequestParam("personId") String personId,
200
-                                               HttpServletRequest request) {
197
+    public ResponseBean listPreselectionRecord(
198
+                                                @RequestParam(value = "buildingId", required = false) String buildingId,
199
+                                                @RequestParam(value = "salesBtchId", required = false) Integer salesBtchId,
200
+                                                @RequestParam(value = "apartmentId", required = false) String apartmentId,
201
+                                                @RequestParam(value = "houseLockingStatus", required = false) String houseLockingStatus,
202
+                                                @RequestParam(value = "customerLocked", required = false) String customerLocked,
203
+                                                @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
204
+                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
205
+                                                @RequestParam("personId") String personId,
206
+                                                HttpServletRequest request) {
201 207
         ResponseBean responseBean = new ResponseBean();
202 208
         Integer orgId = getOrgId(request);
203 209
         try {
204
-            responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNumber, pageSize, orgId, personId));
210
+            responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNumber, pageSize, orgId, personId,buildingId,salesBtchId,apartmentId,houseLockingStatus,customerLocked));
205 211
         } catch (Exception e) {
206 212
             logger.error("listPreselectionRecord -=- {}", e);
207 213
             responseBean.addError(e.getMessage());

+ 2
- 1
src/main/java/com/huiju/estateagents/mapper/TaPreselectionRecordMapper.java 查看文件

@@ -33,7 +33,8 @@ public interface TaPreselectionRecordMapper extends BaseMapper<TaPreselectionRec
33 33
      */
34 34
     IPage<TaPreselectionRecordPO> listPreselectionRecord(IPage<TaPreselectionRecordPO> iPage,
35 35
                                                          @Param("orgId") Integer orgId,
36
-                                                         @Param("personId") String personId);
36
+                                                         @Param("personId") String personId,@Param("buildingId") String buildingId,@Param("salesBtchId") Integer salesBtchId,
37
+                                                         @Param("apartmentId") String apartmentId,@Param("houseLockingStatus") String houseLockingStatus,@Param("customerLocked") String customerLocked);
37 38
 
38 39
     /**
39 40
      * 根据房源ID和用户ID获取预选记录

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaPreselectionRecordService.java 查看文件

@@ -28,7 +28,7 @@ public interface ITaPreselectionRecordService extends IService<TaPreselectionRec
28 28
      * @param personId
29 29
      * @return
30 30
      */
31
-    IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId);
31
+    IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId,String buildingId,Integer salesBtchId,String apartmentId,String houseLockingStatus,String customerLocked);
32 32
 
33 33
     /**
34 34
      * 添加预选记录预选

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java 查看文件

@@ -66,11 +66,11 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
66 66
     private TaPersonServiceImpl taPersonService;
67 67
 
68 68
     @Override
69
-    public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId) {
69
+    public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId,String buildingId,Integer salesBtchId,String apartmentId,String houseLockingStatus,String customerLocked) {
70 70
         logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},orgId:{},personId:{}", pageNum, pageSize, orgId, personId);
71 71
 
72 72
         IPage<TaPreselectionRecordPO> iPage = new Page<>(pageNum, pageSize);
73
-        iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId);
73
+        iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId,buildingId,salesBtchId,apartmentId,houseLockingStatus,customerLocked);
74 74
 
75 75
         List<TaPreselectionRecordPO> poList = iPage.getRecords();
76 76
         if (CollectionUtils.isEmpty(poList)) {

+ 22
- 0
src/main/resources/mapper/TaPreselectionRecordMapper.xml 查看文件

@@ -33,9 +33,31 @@
33 33
             t.person_id = #{personId}
34 34
             AND t.org_id = #{orgId}
35 35
             AND t.house_id = t2.house_id
36
+            <if test="buildingId != null and buildingId != ''">
37
+                t.building_id = #{buildingId}
38
+            </if>
39
+            <if test="salesBtchId != null and salesBtchId != ''">
40
+                t2.sales_batch_id = #{salesBtchId}
41
+            </if>
42
+            <if test="apartmentId != null and apartmentId != ''">
43
+                t2.apartment_id = #{apartmentId}
44
+            </if>
45
+            <if test="houseLockingStatus = 'locked'">
46
+                t2.house_locking_status = 'locked'
47
+            </if>
48
+            <if test="houseLockingStatus = 'unlocked'">
49
+                t2.house_locking_status != 'locked'
50
+            </if>
36 51
             ) t3
37 52
             LEFT JOIN ta_building t4 ON t3.buildingId = t4.building_id
38 53
             LEFT JOIN ta_sales_batch t5 ON t3.saleBatchId = t5.sales_batch_id
54
+            left join ta_raise_house t6 on t3.house_id = t6.house_id
55
+            <if test="customerLocked = 'mine'">
56
+                t6.person_id = #{personId}
57
+            </if>
58
+            <if test="customerLocked = 'other'">
59
+                t6.person_id != #{personId}
60
+            </if>
39 61
          ORDER BY
40 62
             t3.create_date DESC
41 63
     </select>