package com.dsh.course.controller; import com.dsh.guns.core.base.controller.BaseController; import com.dsh.guns.modular.system.model.User; import com.dsh.guns.modular.system.service.IUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 控制器 * * @author fengshuonan * @Date 2020-06-13 10:50:42 */ @RestController @RequestMapping("/userClient") public class SysUserController extends BaseController { @Autowired private IUserService userService; /** * 详情 */ @PostMapping(value = "/querySysUserById") public User detail(Integer userId) { try { return userService.getById(userId); }catch (Exception e){ e.printStackTrace(); return null; } } }