| | |
| | | @ResponseBody |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "添加用户", tags = {"后台-用户管理"}) |
| | | public ResultUtil addHost( Host host){ |
| | | public ResultUtil addHost(@RequestBody Host host){ |
| | | System.out.println("===================添加房东=="); |
| | | AppUser appUser = new AppUser(); |
| | | BeanUtils.copyProperties(host,appUser); |
| | |
| | | @ApiOperation(value = "编辑前获取用户信息", tags = {"后台-用户管理"}) |
| | | public Host preupdate(Integer id){ |
| | | AppUser appUser = appUserService.selectById(id); |
| | | if (appUser.getWatchApp1()!=null){ |
| | | appUser.setWatchApp(appUser.getWatchApp1()); |
| | | } |
| | | if (appUser.getWechatQrCode1()!=null){ |
| | | appUser.setWechatQRCode(appUser.getWechatQrCode1()); |
| | | } |
| | | Host host = new Host(); |
| | | BeanUtils.copyProperties(appUser,host); |
| | | return host; |
| | |
| | | @ResponseBody |
| | | @PutMapping("/update") |
| | | @ApiOperation(value = "编辑用户信息", tags = {"后台-用户管理"}) |
| | | public ResultUtil update(Host host){ |
| | | public ResultUtil update(@RequestBody Host host){ |
| | | AppUser appUser =new AppUser(); |
| | | |
| | | BeanUtils.copyProperties(host,appUser); |
| | | appUser.setWechatQrCode1(host.getWechatQRCode()); |
| | | appUser.setWatchApp1(host.getWatchApp()); |
| | | appUserService.updateById(appUser); |
| | | return ResultUtil.success("编辑成功"); |
| | | } |
| | |
| | | @ResponseBody |
| | | @PutMapping("/forzen") |
| | | @ApiOperation(value = "更改状态1=正常,2=冻结,3=删除", tags = {"后台-用户管理"}) |
| | | public ResultUtil frozen(Integer id,Integer status){ |
| | | AppUser appUser = appUserService.selectById(id); |
| | | public ResultUtil frozen(String ids,Integer status){ |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | | |
| | | |
| | | AppUser appUser = appUserService.selectById(Integer.valueOf(s)); |
| | | appUser.setStatus(status); |
| | | appUserService.updateById(appUser); |
| | | } |
| | | String res = ""; |
| | | switch (status) { |
| | | case 1: |
| | |
| | | @ApiImplicitParam(name = "userType", value = "用户类型(1=普通,2=房东)",dataType = "int",required = false), |
| | | @ApiImplicitParam(name = "status", value = "状态(1=正常,2=冻结,3=删除)",dataType = "int",required = false), |
| | | @ApiImplicitParam(name = "phone", value = "电话",required = false), |
| | | @ApiImplicitParam(name = "pageNo", required = false), |
| | | @ApiImplicitParam(name = "pageNum", required = false), |
| | | @ApiImplicitParam(name = "pageSize",required = false), |
| | | |
| | | }) |