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; /** *
* APP用户前端控制器 *
* * @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:common')") @ApiOperation(value = "重置密码") @PutMapping(value = "/resetPwd") public CommonResult restPwd(@RequestBody SysUser user){ userService.resetUserPwd(user); return CommonResult.success(); } }