补充节点信息字段

This commit is contained in:
柏码の讲师 2023-12-11 15:31:28 +08:00
parent 5bf37d63fc
commit c40a66802a
2 changed files with 3 additions and 1 deletions

View File

@ -15,5 +15,7 @@ public class Client {
Integer id;
String name;
String token;
String location;
String node;
Date registerTime;
}

View File

@ -54,7 +54,7 @@ public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> impleme
public boolean verifyAndRegister(String token) {
if (this.registerToken.equals(token)) {
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)) {
registerToken = this.generateNewToken();
this.addClientCache(client);