back_recharge
parent
34bcd18e8d
commit
c28ba0913e
|
@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
|
|||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
|
|||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
@ -16,6 +17,8 @@ dependencies {
|
|||
}
|
||||
|
||||
jar {
|
||||
baseName = 'hotfix'
|
||||
version = '1.0.0'
|
||||
manifest{
|
||||
attributes 'Manifest-Version':'1.0'
|
||||
attributes 'Premain-Class':'com.ljsd.jieling.hotfix.JavaAgent'
|
||||
|
|
|
@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
|
|||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
|
|
@ -36,4 +36,21 @@ jar {
|
|||
manifest {
|
||||
attributes 'Main-Class': 'com.ljsd.jieling.ServerlogicApplication'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//依赖编译,然后打包JAR
|
||||
task taskJar(type:Jar, dependsOn: compileJava) {
|
||||
from 'build/classes/main'
|
||||
destinationDir = file('build/libs')
|
||||
}
|
||||
|
||||
//删除lib中的jar
|
||||
task clearJars(type:Delete){
|
||||
delete 'lib'
|
||||
}
|
||||
|
||||
task copyJars(type: Copy, dependsOn:clearJars) {
|
||||
from configurations.runtime
|
||||
into 'lib' // 目标位置
|
||||
}
|
|
@ -256,6 +256,13 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
private int checkAndRefresh(ISession session, PacketNetData packetNetData) {
|
||||
int myToken = 0;
|
||||
if (packetNetData.getMsgId()== MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE){
|
||||
|
||||
if (OnlineUserManager.checkUidOnline(session.getUid())){
|
||||
ISession iSession = OnlineUserManager.getSessionByUid(session.getUid());
|
||||
MessageUtil.sendErrorCode(session, ErrorCode.reloginCode);
|
||||
OnlineUserManager.userOffline(iSession.getUid());
|
||||
iSession.close();
|
||||
}
|
||||
OnlineUserManager.userOnline(session.getUid(),session);
|
||||
|
||||
//TODO 更新token
|
||||
|
@ -266,12 +273,6 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
|
||||
}
|
||||
|
||||
if (OnlineUserManager.checkUidOnline(session.getUid())){
|
||||
ISession iSession = OnlineUserManager.getSessionByUid(session.getUid());
|
||||
MessageUtil.sendErrorCode(session, ErrorCode.reloginCode);
|
||||
iSession.close();
|
||||
}
|
||||
|
||||
// if (myToken != packetNetData.getToken()){
|
||||
// return 1;
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue