作者 crossoverJie

:bug: Fixing a bug.登录状态判断

... ... @@ -122,15 +122,13 @@ public class RouteRequestImpl implements RouteRequest {
String json = response.body().string();
CIMServerResVO cimServerResVO = JSON.parseObject(json, CIMServerResVO.class);
//重复登录
if (cimServerResVO.getCode().equals(StatusEnum.REPEAT_LOGIN.getCode())){
//重复失败
if (!cimServerResVO.getCode().equals(StatusEnum.SUCCESS.getCode())){
LOGGER.error(appConfiguration.getUserName() + ":" + StatusEnum.REPEAT_LOGIN.getMessage());
System.exit(-1);
}
if (!cimServerResVO.getCode().equals(StatusEnum.SUCCESS.getCode())){
throw new RuntimeException("route server exception code=" + cimServerResVO.getCode()) ;
}
return cimServerResVO.getDataBody();
}
... ...
spring.application.name=netty-heartbeat-client
spring.application.name=cim-client
# web port
server.port=8082
... ... @@ -37,8 +37,8 @@ cim.server.online.user.url=http://45.78.28.220:8083/onlineUser
#cim.server.online.user=http://localhost:8083/onlineUser
# 客户端唯一ID
cim.user.id=1545574841528
cim.user.userName=zhangsan
cim.user.id=1545574871141
cim.user.userName=crossoverJie
# 回调线程队列大小
cim.callback.thread.queue.size = 2
... ...
... ... @@ -25,7 +25,7 @@ public enum StatusEnum {
OFF_LINE("7000", "你选择的账号不在线,请重新选择!"),
/** 登录信息不匹配 */
ACCOUNT_NOT_MATCH("9000", "登录信息不匹配!"),
ACCOUNT_NOT_MATCH("9100", "登录信息不匹配!"),
/** 请求限流 */
REQUEST_LIMIT("6000", "请求限流"),
... ...