管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-09 5844344ae1650cf6212ce89cce49b1ceed9cf0cd
src/main/java/com/lf/server/controller/all/SignController.java
@@ -3,11 +3,13 @@
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;
@@ -46,6 +48,9 @@
    @Autowired
    PropertiesConfig propertiesConfig;
    @Autowired
    private ScheduleService scheduleService;
    @SysLog()
    @ApiOperation(value = "跳转首页")
@@ -139,7 +144,7 @@
                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);
@@ -147,7 +152,10 @@
            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);
        }