package com.newfiber.modules.sys.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.newfiber.common.utils.PageUtils; import com.newfiber.common.utils.Query; import com.newfiber.common.utils.R; import com.newfiber.modules.sys.entity.SysUserInfo; import com.newfiber.modules.sys.service.SysUserInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperationSupport; import java.util.Map; import javax.annotation.Resource; import javax.validation.Valid; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 系统用户Controller * * @author : xiongk * @since : 2020-12-21 14:40 */ @RestController @Api(value = "系统用户管理", tags = "系统用户管理") @RequestMapping("/sys_user_info") public class SysUserInfoController { @Resource private SysUserInfoService sysUserInfoService; @ApiOperation(value = "详细查询系统用户") @ApiOperationSupport(order = 40) @PostMapping("/detail/{id}") public R detail(@PathVariable("id") @Valid Integer id) { return R.ok().put("data", sysUserInfoService.getById(id)); } @ApiOperation(value = "分页条件查询系统用户") @ApiOperationSupport(order = 50) @PostMapping(value = "/page") public R page(@RequestBody Map<String, Object> params) { IPage<SysUserInfo> result = sysUserInfoService.page(new Query<SysUserInfo>().getPage(params)); return R.ok().put("page", new PageUtils(result)); } @ApiOperation(value = "列表条件查询系统用户") @ApiOperationSupport(order = 60) @PostMapping(value = "/list") public R list(@RequestBody Map<String, Object> params) { return R.ok().put("list", sysUserInfoService.listByMap(params)); } }