|
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.XmlUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.pj.current.config.MyConfig;
|
|
|
import com.pj.current.netty.command.constants.CommandType;
|
|
|
import com.pj.current.netty.command.handler.IHandler;
|
|
|
import com.pj.current.netty.dto.OKMsg;
|
|
@@ -25,6 +26,8 @@ public class TerminalOptionHandler implements IHandler {
|
|
|
|
|
|
@Resource
|
|
|
private TbTerminalService tbTerminalService;
|
|
|
+ @Resource
|
|
|
+ private MyConfig myConfig;
|
|
|
|
|
|
@Override
|
|
|
public CommandType commandType() {
|
|
@@ -41,6 +44,9 @@ public class TerminalOptionHandler implements IHandler {
|
|
|
TbTerminal tbTerminal = tbTerminalService.findBySN(sn);
|
|
|
tbTerminal.setPersonNum(userCount).setIpAddress(ip).setLastOnLine(DateUtil.now());
|
|
|
tbTerminalService.updateById(tbTerminal);
|
|
|
+ if (myConfig.getLimitUserCount()<=userCount) {
|
|
|
+
|
|
|
+ }
|
|
|
ctx.write(OKMsg.ok());
|
|
|
ctx.flush();
|
|
|
}
|