add: 登录

This commit is contained in:
jsh
2025-10-12 16:13:04 +08:00
parent 23ff4c814d
commit 68474c0c80
11 changed files with 188 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
package com.dota.nexus.entity;
public record LoginDTO(String username, String password) {
}

View File

@@ -27,8 +27,12 @@ public class R {
return new R(200, "ok", data);
}
public static R error(String msg){
return new R(500, msg);
}
public static R error(){
return new R(500, "服务端发生未知错误");
return error("服务端发生未知错误");
}
public static R unauthorized() {

View File

@@ -0,0 +1,14 @@
package com.dota.nexus.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class User extends Entity{
private String name;
private String password;
private String nickname;
}