Parcourir la source

my report user

胡轶钦 il y a 5 ans
Parent
révision
6df885d706

+ 21
- 0
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Voir le fichier

@@ -1,6 +1,9 @@
1 1
 package com.huiju.estateagents.controller;
2 2
 
3 3
 
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 7
 import com.huiju.estateagents.base.ResponseBean;
5 8
 import com.huiju.estateagents.common.CommConstant;
6 9
 import com.huiju.estateagents.common.JWTUtils;
@@ -126,6 +129,24 @@ public class TaRecommendCustomerController extends BaseController {
126 129
         }
127 130
     }
128 131
 
132
+    @GetMapping("/wx/customer/myReport")
133
+    public ResponseBean getCustomerIReport (@RequestParam(value ="personId") String personId,
134
+                                         @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
135
+                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
136
+        try{
137
+            IPage<TaRecommendCustomer>pg = new Page<>(pageNumber,pageSize);
138
+            QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
139
+            queryWrapper.eq("realty_consultant",personId);
140
+            queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
141
+            queryWrapper.orderByDesc("create_date");
142
+            IPage<TaRecommendCustomer>result = taRecommendCustomerService.page(pg,queryWrapper);
143
+            return ResponseBean.success(result);
144
+        }catch (Exception e){
145
+            e.printStackTrace();
146
+            return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
147
+        }
148
+    }
149
+
129 150
     @GetMapping("/admin/customer/recommend")
130 151
     public ResponseBean getCustomerList (@RequestParam(value ="name",required = false) String name,
131 152
                                          @RequestParam(value ="tel",required = false) String tel,

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Voir le fichier

@@ -343,6 +343,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
343 343
         return taRecommendCustomerMapper.getCustomerList(page,building,name,tel,consultName,consultTel,entryType,verifyStatus,sex);
344 344
     }
345 345
 
346
+
346 347
     @Override
347 348
     public IPage<TaRecommendCustomer> getRepCustomerList(int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus,Integer sex){
348 349
         IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);