| | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/user") |
| | | @Api(tags = "用户信息") |
| | | public class SysUserController extends BaseController |
| | | { |
| | | @Autowired |
| | |
| | | /** |
| | | * 获取用户列表 |
| | | */ |
| | | |
| | | @ApiOperationSupport(includeParameters={"user.userId"}) |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysUser user) |
| | |
| | | /** |
| | | * 新增用户 |
| | | */ |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:user:add')") |
| | | @Log(title = "用户管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:user:edit')") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:user:query')") |
| | | @GetMapping("/authRole/{userId}") |
| | | @ApiOperation("根据用户编号获取授权角色") |
| | | public AjaxResult authRole(@PathVariable("userId") String userId) |
| | | { |
| | | AjaxResult ajax = AjaxResult.success(); |