首页 > 其他分享 >11.15

11.15

时间:2023-11-13 21:25:58浏览次数:36  
标签:String 11.15 private import lombok data public

本次实现类变量的定义

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

相关文章

  • 训练总结 2018.11.15
    昨天第一次打线上CFdiv2,感觉自己还太嫩了,第一题,从本来读对题意,到读错题意,然后读全题意,但还是读错了,真是,把我弄到上天,比赛结束也没能A,赛后听学长指导,终于明白题意了,A了,自己还......
  • 11.15-11.18周末小结
    目录一、软件开发架构1.C/S架构2.B/S架构二、网络编程简介1.什么是网络编程2.学习网络编程的目的3.网络编程的发展史4.网络编程必备条件四:OSI七层协议模型和TCP/IP四层协议......
  • 【2022.11.15】pytorch的使用相关(四)
    参考资料ShusenTang/Dive-into-DL-PyTorch:本项目将《动手学深度学习》(DiveintoDeepLearning)原书中的MXNet实现改为PyTorch实现。(github.com)python数组冒号取值......
  • 11.15 解题报告
    T1考场用时:\(40\)min期望得分:\(30\)pts实际得分:\(30\)pts这题以前做过。首先显然的一点是小Y行走的路径是一棵树,这题可以分两部分来做,首先对于每一个节点按照节......
  • CF刷题计划?(upd:11.15)
    CF刷题计划?CF1285F太nb了这个题暴力一点的做法是二分后直接莫反,但是不够快考虑枚举一个\(\gcd\),令其为\(d\)然后从大到小枚举数,然后把\(\gcd(\frac{x}{d},\frac{y}{d}......
  • 【2022.11.15】luffy项目部署(9)
    内容概要1redis字符串操作2redishash操作3redis列表操作4redis管道5redis其他操作6django中集成redis7celery介绍内容详细#装了图形化客户......
  • 闲话 22.11.15
    闲话幸亏昨天写了两道题要不然今天没题可写了(明天学考?话说怎么那么多bitmask题啊杂题CF487ECyberland有\(n\)座城市,编号从\(1\)到\(n\),有\(m\)条双向道......
  • 11.15
    今日内容1.软件开发架构2.网络编程简介3.OSI七层协议简介4.物理连接层5.数据链路层6.网络层7.传输层8.网络相关专业名词1.软件开发架构1.C/S架构Client:客户端......
  • 11.14/11.15 Apache和PHP结合 11.16/11.17 Apache默认虚拟主机
    11.14/11.15Apache和PHP结合修改Apache(httpd)主配置文件定义ServerName以消除Apache启动时所产生的警告未修改前[root@linux-5~]#/usr/local/apache2.4/bin/apachect......