| | |
| | | package cn.huge.module.grid.controller; |
| | | |
| | | import cn.huge.base.common.bo.R; |
| | | import cn.huge.module.grid.domain.vo.GridUserVo; |
| | | import cn.huge.module.grid.domain.dto.GridSysRoleDTO; |
| | | import cn.huge.module.grid.domain.vo.*; |
| | | import cn.huge.module.grid.service.GridUserService; |
| | | import cn.huge.module.sys.dto.GridRoleMenuDTO; |
| | | import cn.huge.module.sys.dto.GridUserRoleDTO; |
| | | import cn.huge.module.sys.vo.GridRoleMenuVo; |
| | | import cn.huge.module.sys.vo.GridUserRoleVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | |
| | | /** |
| | | * 根据用户token获取用户信息 |
| | | * @param token |
| | | * @url {ctx}/api/thrid/grid/user/get-userinfo |
| | | * @param gridTokenVo |
| | | * @return |
| | | */ |
| | | @PostMapping("/get-userinfo") |
| | | public R<GridUserVo> getUserInfo(@RequestBody String token) { |
| | | return gridUserService.getUserInfo(token); |
| | | public R<GridUserVo> getUserInfo(@RequestBody GridTokenVo gridTokenVo) { |
| | | return gridUserService.getUserInfo(gridTokenVo); |
| | | } |
| | | |
| | | @PostMapping("/get-user-role") |
| | | public R<List<GridUserRoleDTO>> getUserRoleList(@RequestBody GridUserRoleVo gridUserRoleVo) { |
| | | return gridUserService.getUserRoleList(gridUserRoleVo); |
| | | } |
| | | |
| | | @PostMapping("/get-sys-role") |
| | | public R<GridSysRoleDTO> getSysRoleList(@RequestBody GridOrgVo gridOrgVo) { |
| | | return gridUserService.getSysRoleList(gridOrgVo); |
| | | } |
| | | |
| | | @PostMapping("/get-role-menu") |
| | | public R<List<GridRoleMenuDTO>> getRoleMenu(@RequestBody GridRoleMenuVo gridRoleMenuVo) { |
| | | return gridUserService.getRoleMenu(gridRoleMenuVo); |
| | | } |
| | | |
| | | public R<String> initNewUsers(@RequestBody GridUserRoleVo gridUserRoleVo){ |
| | | return gridUserService.initNewUsers(gridUserRoleVo); |
| | | |
| | | } |
| | | } |