weiximei 6 years ago
parent
commit
bd04e82a35

+ 10
- 10
whole-estate/src/main/java/com/example/wholeestate/controller/BuildingController.java View File

@@ -234,16 +234,16 @@ public class BuildingController extends BaseController {
234 234
         return responseBean;
235 235
     }
236 236
 
237
-//    @ApiOperation(value = "户型列表", notes = "户型列表")
238
-////    @ApiImplicitParams({
239
-////            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "id", value = "核销id"),
240
-////    })
241
-////    @RequestMapping(value = "/buildingApartment/{id}", method = RequestMethod.GET)
242
-////    public ResponseBean buildingApartmentSelectId(@PathVariable(value = "id") String id,
243
-////                                     @RequestParam("pageSize")Integer pageSize){
244
-////        ResponseBean  responseBean = iBuildingService.buildingApartmentSelectId(id);
245
-////        return responseBean;
246
-////    }
237
+//   @ApiOperation(value = "户型列表", notes = "户型列表")
238
+//    @ApiImplicitParams({
239
+//            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "id", value = "核销id"),
240
+//    })
241
+//    @RequestMapping(value = "/buildingApartment/{id}", method = RequestMethod.GET)
242
+//    public ResponseBean buildingApartmentSelectId(@PathVariable(value = "id") String id,
243
+//                                     @RequestParam("pageSize")Integer pageSize){
244
+//        ResponseBean  responseBean = iBuildingService.buildingApartmentSelectId(id);
245
+//       return responseBean;
246
+//   }
247 247
 
248 248
 
249 249
     @ApiOperation(value = "微信小程序楼盘列表", notes = "微信小程序楼盘列表")

+ 14
- 4
whole-estate/src/main/java/com/example/wholeestate/controller/CustomerController.java View File

@@ -52,11 +52,21 @@ public class CustomerController extends BaseController {
52 52
 
53 53
     @ApiOperation(value = "会员列表", notes = "会员列表")
54 54
     @ApiImplicitParams({
55
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "pageNum:分页第几页,pageSize:每页长度,phone:手机号,name:姓名,beginDate:开始时间,endDate:结束时间")
55
+            @ApiImplicitParam(paramType = "Query",dataType = "Integer",name = "pageNum",value = "pageNum:分页第几页" ),
56
+            @ApiImplicitParam(paramType = "Query",dataType = "Integer",name = "pageSize",value = "pageSize:每页长度"),
57
+            @ApiImplicitParam(paramType = "Query",dataType = "String",name = "phone",value = "phone:别名"),
58
+            @ApiImplicitParam(paramType = "Query",dataType = "String",name = "name",value = "name:名字"),
59
+            @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "beginDate",value = "beginDate:开始时间"),
60
+            @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "endDate",value = "endDate:结束")
56 61
     })
57
-    @RequestMapping(value = "/customerList", method = RequestMethod.POST)
58
-    public ResponseBean buildingList(@RequestBody String parameter, HttpSession session){
59
-        ResponseBean  responseBean = iCustomerService.customerList(parameter);
62
+    @RequestMapping(value = "/customerList", method = RequestMethod.GET)
63
+    public ResponseBean buildingList(@RequestParam(value = "pageNum", required = false)Integer pageNum,
64
+                                     @RequestParam(value = "pageSize", required = false)Integer pageSize,
65
+                                     @RequestParam(value = "name", required = false)String name,
66
+                                     @RequestParam(value = "phone", required = false)String phone,
67
+                                     @RequestParam(value = "beginDate", required = false)Date beginDate,
68
+                                     @RequestParam(value = "endDate", required = false)Date endDate){
69
+        ResponseBean  responseBean = iCustomerService.customerList(pageNum,pageSize,phone,beginDate,endDate,name);
60 70
         return responseBean;
61 71
     }
62 72
 

+ 3
- 3
whole-estate/src/main/java/com/example/wholeestate/service/ICustomerService.java View File

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.example.wholeestate.common.resp.ResponseBean;
5 5
 import com.example.wholeestate.model.Customer;
6 6
 
7
+import java.util.Date;
8
+
7 9
 /**
8 10
  * <p>
9 11
  *  服务类
@@ -16,11 +18,9 @@ public interface ICustomerService extends IService<Customer> {
16 18
 
17 19
     /**
18 20
      * 会员列表
19
-     * @param parameter
20 21
      * @return
21 22
      */
22
-    ResponseBean customerList(String parameter);
23
-
23
+    ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name);
24 24
     /**
25 25
      * 会员详情
26 26
      * @param id

+ 1
- 8
whole-estate/src/main/java/com/example/wholeestate/service/impl/CustomerServiceImpl.java View File

@@ -38,15 +38,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
38 38
     private IdGen idGen = IdGen.get();
39 39
 
40 40
     @Override
41
-    public ResponseBean customerList(String parameter) {
41
+    public ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name) {
42 42
         ResponseBean response= new ResponseBean();
43
-        JSONObject object= JSONObject.parseObject(parameter);
44
-        Date beginDate = object.getDate("beginDate");
45
-        Date endDate = object.getDate("endDate");
46
-        String phone = object.getString("phone");
47
-        String name = object.getString("name");
48
-        Integer pageNum = object.getInteger("pageNum");
49
-        Integer pageSize = object.getInteger("pageSize");
50 43
 
51 44
         Page<Customer> page = new Page<>();
52 45
         page.setSize(pageSize == null ? 10 : pageSize);