whyczh
2021-05-12 2b37b4ce8e0d3d156468ff873de1ecaf15c25a27
src/main/java/com/whyc/controller/UserController.java
@@ -14,6 +14,7 @@
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;
@@ -57,7 +58,7 @@
    @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){
@@ -88,9 +89,16 @@
    }
    @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 = "编辑用户")