| | |
| | | import com.whyc.service.JobService; |
| | | import com.whyc.service.LoginService; |
| | | import com.whyc.service.UserService; |
| | | import com.whyc.util.DigestsUtil; |
| | | import com.whyc.util.UserExcelVerify; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @GetMapping |
| | | @ApiOperation(value = "查询用户byId") |
| | | @RequiresPermissions(value = {"user:get"}) |
| | | //@RequiresPermissions(value = {"user:get"}) |
| | | public Response getById(@RequestParam int id){ |
| | | User user = userService.getById(id); |
| | | if (user==null){ |
| | |
| | | } |
| | | |
| | | @GetMapping("validatePassword") |
| | | public boolean validatePassword(@RequestParam String userName, @RequestParam String password){ |
| | | return userService.validatePassword(userName,password); |
| | | @ApiOperation(value = "验证密码") |
| | | public boolean validatePassword(@RequestParam int id, @RequestParam String password){ |
| | | return userService.validatePassword(id,password); |
| | | } |
| | | @GetMapping("getSaltPassword") |
| | | @ApiOperation(value = "获取加密密码") |
| | | public String getSaltPassword(@RequestParam String password,@RequestParam String salt){ |
| | | return DigestsUtil.sha1(password,salt); |
| | | } |
| | | @PutMapping("updatePassword") |
| | | @ApiOperation(value = "修改密码") |
| | | public Response updatePassword(@RequestParam int id,@RequestParam String password){ |
| | | return userService.updatePassword(id,password); |
| | | } |
| | | |
| | | @PutMapping("resetPassword") |
| | | @ApiOperation(value = "重置密码") |
| | | public Response resetPassword(@RequestParam int id){ |
| | | return userService.resetPassword(id); |
| | | } |
| | | |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "编辑用户") |