| | |
| | | package com.xcong.farmer.cms.modules.system.Controller; |
| | | |
| | | import com.xcong.farmer.cms.common.response.Result; |
| | | import com.xcong.farmer.cms.modules.system.dto.AdminAddUserDto; |
| | | import com.xcong.farmer.cms.modules.system.dto.AdminUpdateUserDto; |
| | | import com.xcong.farmer.cms.modules.system.dto.AdminUserDto; |
| | | import com.xcong.farmer.cms.modules.system.dto.*; |
| | | import com.xcong.farmer.cms.modules.system.service.IUserService; |
| | | import com.xcong.farmer.cms.modules.system.vo.AdminUserVo; |
| | | import com.xcong.farmer.cms.modules.test.dto.TestUserDto; |
| | |
| | | import javax.validation.Valid; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/user") |
| | | @RequestMapping(value = "/api/user") |
| | | @Slf4j |
| | | @Api(value = "系统用户", tags = "系统用户") |
| | | public class AdminUserController { |
| | |
| | | @ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminUserVo.class)}) |
| | | @PostMapping(value = "/userInPage") |
| | | public Result getUserInPage(@RequestBody @Valid AdminUserDto adminUserDto) { |
| | | log.info("--->{}", SecurityContextHolder.getContext().getAuthentication()); |
| | | return iUserService.getUserInPage(adminUserDto); |
| | | } |
| | | |
| | |
| | | return iUserService.seeUserInfo(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "个人中心", notes = "个人中心") |
| | | @GetMapping(value = "/userInfo") |
| | | public Result userInfo() { |
| | | return iUserService.userInfo(); |
| | | } |
| | | |
| | | @ApiOperation(value = "更新系统用户", notes = "更新系统用户") |
| | | @PostMapping(value = "/updateUser") |
| | | public Result updateUser(@RequestBody @Valid AdminUpdateUserDto adminUpdateUserDto) { |
| | | return iUserService.updateUser(adminUpdateUserDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改密码", notes = "修改密码") |
| | | @PostMapping(value = "/updatePassword") |
| | | public Result updatePassword(@RequestBody @Valid AdminUpdatePasswordDto adminUpdatePasswordDto) { |
| | | return iUserService.updatePassword(adminUpdatePasswordDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "重置密码", notes = "重置密码") |
| | | @GetMapping(value = "/resetPassword/{id}") |
| | | public Result resetPassword(@PathVariable(value = "id") Long id) { |
| | | return iUserService.resetPassword(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看用户的全部菜单", notes = "查看用户的全部菜单") |
| | | @GetMapping(value = "/userMenu") |
| | | public Result userMenu() { |
| | | return iUserService.userMenu(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除系统用户", notes = "删除系统用户") |
| | | @PostMapping(value = "/delObjs") |
| | | public Result delObjs(@RequestBody @Valid AdminDeleteDto adminDeleteDto) { |
| | | return iUserService.delObjs(adminDeleteDto); |
| | | } |
| | | |
| | | } |