|  |  |  | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.IOException; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SysConfigService sysConfigService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "登陆", notes = "登陆") | 
|---|
|  |  |  | @ApiOperation(value = "登陆信息", notes = "登陆信息") | 
|---|
|  |  |  | @RequestMapping(value = "login", method = RequestMethod.POST) | 
|---|
|  |  |  | public ResultMessage login(@RequestBody Map<String, Object> parameters) { | 
|---|
|  |  |  | if (!(parameters.containsKey("account") && parameters.containsKey("password"))) { | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @RequestMapping(value = "getUserInfo", method = RequestMethod.POST) | 
|---|
|  |  |  | public ResultMessage getUserInfo(HttpServletRequest request) { | 
|---|
|  |  |  | String token = request.getHeader("token"); | 
|---|
|  |  |  | Map<String, Object> result = userService.getUserInfo(token); | 
|---|
|  |  |  | public ResultMessage getUserInfo() { | 
|---|
|  |  |  | Map<String, Object> result = userService.getCurrentUserInfo(); | 
|---|
|  |  |  | return ResultMessage.ok(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|