危化品全生命周期管理后端
kongzy
2024-08-22 0c73654f55844e34772732914af8cc1e247aab63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.gkhy.hazmat.admin.controller.app;
 
import com.gkhy.hazmat.common.api.CommonResult;
import com.gkhy.hazmat.common.domain.entity.SysUser;
import com.gkhy.hazmat.system.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * <p>
 * APP用户前端控制器
 * </p>
 *
 * @author kzy
 * @since 2024-06-06 13:53:17
 */
@Api(tags = "APP用户前端控制器")
@RestController
@RequestMapping("/app/user")
public class AppUserController {
    @Autowired
    private SysUserService userService;
 
    @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common')")
    @ApiOperation(value = "重置密码")
    @PutMapping(value = "/resetPwd")
    public CommonResult restPwd(@RequestBody SysUser user){
        userService.resetUserPwd(user);
        return CommonResult.success();
    }
}