| | |
| | | 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") |
| | | @ApiOperation(value = "验证密码") |
| | | public boolean validatePassword(@RequestParam String userName, @RequestParam String password){ |
| | | return userService.validatePassword(userName,password); |
| | | } |
| | | @GetMapping("getSaltPassword") |
| | | @ApiOperation(value = "获取加密密码") |
| | | public String getSaltPassword(@RequestParam String password,@RequestParam String salt){ |
| | | return DigestsUtil.sha1(password,salt); |
| | | } |
| | | |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "编辑用户") |