weiximei 6 年前
父节点
当前提交
37839e94df

+ 9
- 10
whole-estate/src/main/java/com/example/wholeestate/controller/BuildingController.java 查看文件

234
         return responseBean;
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 = "户型列表根据楼盘ID查询", notes = "户型列表根据楼盘ID查询")
238
+    @ApiImplicitParams({
239
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "id", value = "核销id"),
240
+    })
241
+    @RequestMapping(value = "/buildingApartment/buildingId/{id}", method = RequestMethod.GET)
242
+    public ResponseBean buildingApartmentBuildingId(@PathVariable(value = "id") String id){
243
+        ResponseBean  responseBean = iBuildingService.buildingApartmentBuildingId(id);
244
+       return responseBean;
245
+   }
247
 
246
 
248
 
247
 
249
     @ApiOperation(value = "微信小程序楼盘列表", notes = "微信小程序楼盘列表")
248
     @ApiOperation(value = "微信小程序楼盘列表", notes = "微信小程序楼盘列表")

+ 4
- 2
whole-estate/src/main/java/com/example/wholeestate/controller/CustomerController.java 查看文件

57
             @ApiImplicitParam(paramType = "Query",dataType = "String",name = "phone",value = "phone:别名"),
57
             @ApiImplicitParam(paramType = "Query",dataType = "String",name = "phone",value = "phone:别名"),
58
             @ApiImplicitParam(paramType = "Query",dataType = "String",name = "name",value = "name:名字"),
58
             @ApiImplicitParam(paramType = "Query",dataType = "String",name = "name",value = "name:名字"),
59
             @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "beginDate",value = "beginDate:开始时间"),
59
             @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "beginDate",value = "beginDate:开始时间"),
60
-            @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "endDate",value = "endDate:结束")
60
+            @ApiImplicitParam(paramType = "Query",dataType = "Date",name = "endDate",value = "endDate:结束"),
61
+            @ApiImplicitParam(paramType = "Query",dataType = "String",name = "cardNo",value = "cardNo:身份证")
61
     })
62
     })
62
     @RequestMapping(value = "/customerList", method = RequestMethod.GET)
63
     @RequestMapping(value = "/customerList", method = RequestMethod.GET)
63
     public ResponseBean buildingList(@RequestParam(value = "pageNum", required = false)Integer pageNum,
64
     public ResponseBean buildingList(@RequestParam(value = "pageNum", required = false)Integer pageNum,
64
                                      @RequestParam(value = "pageSize", required = false)Integer pageSize,
65
                                      @RequestParam(value = "pageSize", required = false)Integer pageSize,
65
                                      @RequestParam(value = "name", required = false)String name,
66
                                      @RequestParam(value = "name", required = false)String name,
66
                                      @RequestParam(value = "phone", required = false)String phone,
67
                                      @RequestParam(value = "phone", required = false)String phone,
68
+                                     @RequestParam(value = "cardNo", required = false)String cardNo,
67
                                      @RequestParam(value = "beginDate", required = false)Date beginDate,
69
                                      @RequestParam(value = "beginDate", required = false)Date beginDate,
68
                                      @RequestParam(value = "endDate", required = false)Date endDate){
70
                                      @RequestParam(value = "endDate", required = false)Date endDate){
69
-        ResponseBean  responseBean = iCustomerService.customerList(pageNum,pageSize,phone,beginDate,endDate,name);
71
+        ResponseBean  responseBean = iCustomerService.customerList(pageNum,pageSize,phone,beginDate,endDate,name,cardNo);
70
         return responseBean;
72
         return responseBean;
71
     }
73
     }
72
 
74
 

+ 1
- 1
whole-estate/src/main/java/com/example/wholeestate/dao/CustomerMapper.java 查看文件

23
      * @param page
23
      * @param page
24
      * @return
24
      * @return
25
      */
25
      */
26
-    IPage<Customer> customerList(Page<Customer> page, @Param("Name") String name, @Param("phone")String phone, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
26
+    IPage<Customer> customerList(Page<Customer> page, @Param("Name") String name, @Param("phone")String phone, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate,@Param("cardNo") String cardNo);
27
 }
27
 }

+ 7
- 0
whole-estate/src/main/java/com/example/wholeestate/service/IBuildingService.java 查看文件

97
     ResponseBean getWxBuildingList();
97
     ResponseBean getWxBuildingList();
98
 
98
 
99
     ResponseBean getWxBuildingById(String buildingId);
99
     ResponseBean getWxBuildingById(String buildingId);
100
+
101
+    /**
102
+     * 户型列表根据楼盘ID查询
103
+     * @param id
104
+     * @return
105
+     */
106
+    ResponseBean buildingApartmentBuildingId(String id);
100
 }
107
 }

+ 1
- 1
whole-estate/src/main/java/com/example/wholeestate/service/ICustomerService.java 查看文件

20
      * 会员列表
20
      * 会员列表
21
      * @return
21
      * @return
22
      */
22
      */
23
-    ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name);
23
+    ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name,String cardNo);
24
     /**
24
     /**
25
      * 会员详情
25
      * 会员详情
26
      * @param id
26
      * @param id

+ 10
- 0
whole-estate/src/main/java/com/example/wholeestate/service/impl/BuildingServiceImpl.java 查看文件

435
 
435
 
436
         return responseBean;
436
         return responseBean;
437
     }
437
     }
438
+
439
+    @Override
440
+    public ResponseBean buildingApartmentBuildingId(String id) {
441
+        ResponseBean responseBean= new ResponseBean();
442
+        QueryWrapper<BuildingApartment> buildingApartmentQueryWrapper = new QueryWrapper<>();
443
+        buildingApartmentQueryWrapper.eq("building_id", id);
444
+         List<BuildingApartment> buildingApartment= buildingApartmentMapper.selectList(buildingApartmentQueryWrapper);
445
+         responseBean.addSuccess(buildingApartment);
446
+         return responseBean;
447
+    }
438
 }
448
 }

+ 2
- 2
whole-estate/src/main/java/com/example/wholeestate/service/impl/CustomerServiceImpl.java 查看文件

38
     private IdGen idGen = IdGen.get();
38
     private IdGen idGen = IdGen.get();
39
 
39
 
40
     @Override
40
     @Override
41
-    public ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name) {
41
+    public ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name , String cardNo) {
42
         ResponseBean response= new ResponseBean();
42
         ResponseBean response= new ResponseBean();
43
 
43
 
44
         Page<Customer> page = new Page<>();
44
         Page<Customer> page = new Page<>();
45
         page.setSize(pageSize == null ? 10 : pageSize);
45
         page.setSize(pageSize == null ? 10 : pageSize);
46
         page.setCurrent(pageNum == null ? 1 : pageNum);
46
         page.setCurrent(pageNum == null ? 1 : pageNum);
47
-        IPage<Customer> customer= customerMapper.customerList(page,name,phone,beginDate,endDate);
47
+        IPage<Customer> customer= customerMapper.customerList(page,name,phone,beginDate,endDate,cardNo);
48
         List<Customer> customerList=customer.getRecords();
48
         List<Customer> customerList=customer.getRecords();
49
 
49
 
50
         HashMap hashMap= new HashMap<>();
50
         HashMap hashMap= new HashMap<>();

+ 5
- 0
whole-estate/src/main/resources/mapper/CustomerMapper.xml 查看文件

5
         select * from ta_customer
5
         select * from ta_customer
6
             <where>
6
             <where>
7
                 status > -1
7
                 status > -1
8
+
9
+                <if test="cardNo != null and cardNo != ''">
10
+                    and  ta_customer.id_num like concat('%',#{cardNo,jdbcType=VARCHAR},'%')
11
+                </if>
12
+
8
                 <if test="Name != null and Name != ''">
13
                 <if test="Name != null and Name != ''">
9
                     and  (ta_customer.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_customer.customer_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
14
                     and  (ta_customer.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_customer.customer_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
10
                 </if>
15
                 </if>