| | |
| | | @ApiImplicitParam(name = "id", value = "客户id", required = false, dataType = "int",paramType = "query"), |
| | | @ApiImplicitParam(name = "pageNumber", value = "pageNumber", required = true, dataType = "int",paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "int",paramType = "query"), |
| | | @ApiImplicitParam(name = "companyId", value = "卡车公司id", required = true, dataType = "int",paramType = "query"), |
| | | }) |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String name,Integer id,int pageNumber,int pageSize) { |
| | | public Object list(String name,Integer id,int pageNumber,int pageSize,int companyId) { |
| | | Page<TUserVo> tUserVoPage = new Page<>(pageNumber, pageSize); |
| | | return new SuccessTip(tUserVoPage.setRecords(tUserService.getList(tUserVoPage,name,id))); |
| | | return new SuccessTip(tUserVoPage.setRecords(tUserService.getList(tUserVoPage,name,id,companyId))); |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TUserDto tUser) { |
| | | public Object add(@RequestBody TUserDto tUser) { |
| | | try { |
| | | List<TUser> account = tUserService.selectList(new EntityWrapper<TUser>().eq("account", tUser.getAccount())); |
| | | if(account.size()>0){ |
| | |
| | | String encrypt = MD5Util.encrypt(tUser.getPassword()); |
| | | tUser.setPassword(encrypt); |
| | | TUser tUser1 = new TUser(); |
| | | tUser1.setEmail(tUser.getAccount()); |
| | | BeanUtils.copyProperties(tUser,tUser1); |
| | | tUser1.setParentId(0); |
| | | tUser1.setHome(0); |
| | |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tUserId) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if(tUser.getStatus()!=3){ |
| | | return new ErrorTip(502, "删除只能删除冻结的用户!"); |
| | | } |
| | | // if(tUser.getStatus()!=3){ |
| | | // return new ErrorTip(502, "删除只能删除冻结的用户!"); |
| | | // } |
| | | tUser.setRemove(1); |
| | | tUserService.updateById(tUser); |
| | | return SUCCESS_TIP; |
| | |
| | | if(account.size()>0){ |
| | | return new ErrorTip(501, "该账号已经存在!"); |
| | | } |
| | | if(tUser.getPassword()!=null || tUser.getPassword()!=""){ |
| | | if(tUser.getPassword()!=null && tUser.getPassword()!=""){ |
| | | tUser.setPassword(MD5Util.encrypt(tUser.getPassword())); |
| | | } |
| | | TUser user1 = new TUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "发送邮箱",notes="=发送邮箱") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @GetMapping(value = "/ddasd") |
| | | @ResponseBody |
| | | public Object asd() { |
| | | EmailUtil.sendMailGMail("1793218484@qq.com","a"); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |