本次实现类变量的定义
Result
package com.example.pojo; /** * 统一响应结果封装类 */ public class Result { private Integer code;//1 成功 , 0 失败 private String msg; //提示信息 private Object data; //数据 data public static Result success(Object data) { return new Result(1, "success", data); } public static Result success() { return new Result(1, "success", null); } public static Result error(String msg) { return new Result(0, msg, null); } public Result() { } public Result(Integer code, String msg, Object data) { this.code = code; this.msg = msg; this.data = data; } @Override public String toString() { return "Result{" + "code=" + code + ", msg='" + msg + '\'' + ", data=" + data + '}'; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } }
student
package com.example.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class student { private String stuId; private String stuName; private String grade; private String sex; private String college; private String professionals; private String phone; private String position; private int state; }
Teacher
package com.example.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class Teacher { private String teacherID; private String name; private String college; private String professionals; private String role; }
Test
package com.example.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Data @AllArgsConstructor @NoArgsConstructor public class Test { private String cardId; private LocalDateTime cardDate; private String courseName; private String courseTeacher; private String courseID; private String courseNature; private int credit; private String courseClass; private String courseMajor; private String courseCollege; private String testWay; private LocalDateTime testDate; private int testCount; private String testMethod; private String testGrade; private String testEvaluation; private String testAnalysis; private String professional; private String professionalConclusion; private String Reasonable; private String ReasonableConclusion; private int auditStatus; }
User
package com.example.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor public class User { private String username; private String password; private List<String> position; }
标签:String,11.15,private,import,lombok,data,public From: https://www.cnblogs.com/zzqq1314/p/17830204.html