补充节点信息字段
This commit is contained in:
parent
5bf37d63fc
commit
c40a66802a
@ -15,5 +15,7 @@ public class Client {
|
|||||||
Integer id;
|
Integer id;
|
||||||
String name;
|
String name;
|
||||||
String token;
|
String token;
|
||||||
|
String location;
|
||||||
|
String node;
|
||||||
Date registerTime;
|
Date registerTime;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> impleme
|
|||||||
public boolean verifyAndRegister(String token) {
|
public boolean verifyAndRegister(String token) {
|
||||||
if (this.registerToken.equals(token)) {
|
if (this.registerToken.equals(token)) {
|
||||||
int id = this.randomClientId();
|
int id = this.randomClientId();
|
||||||
Client client = new Client(id, "未命名主机", token, new Date());
|
Client client = new Client(id, "未命名主机", token, "cn", "未命名节点", new Date());
|
||||||
if (this.save(client)) {
|
if (this.save(client)) {
|
||||||
registerToken = this.generateNewToken();
|
registerToken = this.generateNewToken();
|
||||||
this.addClientCache(client);
|
this.addClientCache(client);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user