| | |
| | | package com.lf.server.controller.all; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.config.PropertiesConfig; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.sys.LoginEntity; |
| | | import com.lf.server.entity.sys.TokenEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.*; |
| | | import com.lf.server.service.all.ScheduleService; |
| | | import com.lf.server.service.sys.LoginService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import com.lf.server.service.sys.UserService; |
| | |
| | | |
| | | @Autowired |
| | | PropertiesConfig propertiesConfig; |
| | | |
| | | @Autowired |
| | | private ScheduleService scheduleService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "跳转首页") |
| | |
| | | return fail("创建登录日志失败", null); |
| | | } |
| | | |
| | | TokenEntity te = tokenService.getNewToken(ue.getId(), req); |
| | | TokenEntity te = tokenService.getNewToken(ue, req); |
| | | rows = tokenService.insertToken(te); |
| | | if (rows == 0) { |
| | | return fail("创建令牌失败", null); |
| | |
| | | |
| | | tokenService.saveToken(ue, te, req, res); |
| | | |
| | | return success(te); |
| | | int onlineUser = scheduleService.countOnlineUsers(); |
| | | String msg = onlineUser >= SettingData.MAX_USER_LOGIN ? "警告:系统已经到达用户访问量的上限!" : ""; |
| | | |
| | | return success(msg, te); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |