add: 周年纪念日

This commit is contained in:
jsh
2025-10-11 16:18:18 +08:00
parent 8a120a7223
commit ef224aa546
10 changed files with 136 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
package com.dota.nexus.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;
@Data
@EqualsAndHashCode(callSuper = true)
public class Anniversary extends Entity{
private LocalDate date;
private type;
}

View File

@@ -0,0 +1,15 @@
package com.dota.nexus.entity;
import lombok.Getter;
@Getter
public enum AnniversaryEnum {
ANNIVERSARY("周年日"),
COMMEMORATION("纪念日");
private String value;
AnniversaryEnum(String value) {
this.value = value;
}
}

View File

@@ -8,15 +8,34 @@ public class R {
private String msg;
private Object data;
public R(Integer code, String msg){
this.code = code;
this.msg = msg;
}
public R (Integer code, String msg, Object data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public static R ok() {
return ok(null);
}
public static R ok(Object data) {
var r = new R();
r.setCode(200);
r.setMsg("ok");
r.setData(data);
return r;
return new R(200, "ok", data);
}
public static R error(){
return new R(500, "服务端发生未知错误");
}
public static R unauthorized() {
return new R(401, "未授权,客户端没有提供认证信息");
}
public static R forbidden(){
return new R(403, "没有权限");
}
}