You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
342 lines
7.0 KiB
Java
342 lines
7.0 KiB
Java
package com.ibeetl.jlw.entity;
|
|
|
|
import cn.jlw.validate.ValidateConfig;
|
|
import com.ibeetl.admin.core.annotation.Dict;
|
|
import com.ibeetl.admin.core.annotation.DictDeep;
|
|
import com.ibeetl.admin.core.entity.AbstractToken;
|
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
|
import com.ibeetl.admin.core.enums.MenuEnums;
|
|
import com.ibeetl.jlw.enums.GenderEnum;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import org.beetl.sql.annotation.entity.AutoID;
|
|
import org.beetl.sql.annotation.entity.InsertIgnore;
|
|
import org.beetl.sql.annotation.entity.UpdateIgnore;
|
|
import org.beetl.sql.fetch.annotation.Fetch;
|
|
import org.beetl.sql.fetch.annotation.FetchOne;
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.util.Date;
|
|
|
|
import static cn.hutool.core.date.DateUtil.date;
|
|
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
|
|
|
|
/*
|
|
* 学生管理
|
|
* gen by Spring Boot2 Admin 2021-06-19
|
|
*/
|
|
@Builder
|
|
@AllArgsConstructor
|
|
@Fetch
|
|
public class Student extends BaseEntity implements AbstractToken {
|
|
|
|
//ID
|
|
@NotNull(message = "请选择需要修改的学生", groups =ValidateConfig.UPDATE.class)
|
|
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
|
@AutoID
|
|
|
|
private Long studentId ;
|
|
|
|
//班级ID
|
|
@NotNull(message = "请选择学生所在的班级", groups =ValidateConfig.ADD.class)
|
|
@Dict(type = "school_class.class_name.class_status=1")
|
|
private Long classId ;
|
|
|
|
//学生姓名
|
|
@NotBlank(message = "请填写学生姓名", groups =ValidateConfig.ADD.class)
|
|
private String studentName ;
|
|
|
|
//学生学号
|
|
|
|
private String studentSn ;
|
|
|
|
//学生电话
|
|
|
|
private String studentMobile ;
|
|
|
|
//学生邮箱
|
|
|
|
private String studentEmail ;
|
|
|
|
//性别
|
|
|
|
private GenderEnum studentGender ;
|
|
|
|
//状态(1正常 2删除)
|
|
|
|
private Integer studentStatus ;
|
|
|
|
//学生密码
|
|
|
|
private String studentPassword ;
|
|
|
|
// 微信信息
|
|
private String studentWeixinInfo;
|
|
|
|
// QQ
|
|
private String studentQq;
|
|
|
|
//学生头像
|
|
|
|
private String headImg;
|
|
|
|
//添加时间
|
|
|
|
private Date addTime ;
|
|
|
|
/**
|
|
* 账号来源
|
|
*/
|
|
private String codeFrom;
|
|
|
|
//组织机构ID
|
|
|
|
private Long orgId ;
|
|
|
|
//后台用户ID
|
|
|
|
private Long userId ;
|
|
|
|
@FetchOne("classId")
|
|
@UpdateIgnore
|
|
@InsertIgnore
|
|
@DictDeep
|
|
private SchoolClass schoolClass;
|
|
|
|
private String accountIdByStock;
|
|
|
|
private String accountIdByFuture;
|
|
|
|
public Student(){
|
|
}
|
|
|
|
/**ID
|
|
*@return
|
|
*/
|
|
public Long getStudentId(){
|
|
return studentId;
|
|
}
|
|
/**ID
|
|
*@param studentId
|
|
*/
|
|
public void setStudentId(Long studentId){
|
|
this.studentId = studentId;
|
|
}
|
|
|
|
/**班级ID
|
|
*@return
|
|
*/
|
|
public Long getClassId(){
|
|
return classId;
|
|
}
|
|
/**班级ID
|
|
*@param classId
|
|
*/
|
|
public void setClassId(Long classId){
|
|
this.classId = classId;
|
|
}
|
|
|
|
/**学生姓名
|
|
*@return
|
|
*/
|
|
public String getStudentName(){
|
|
return studentName;
|
|
}
|
|
/**学生姓名
|
|
*@param studentName
|
|
*/
|
|
public void setStudentName(String studentName){
|
|
this.studentName = studentName;
|
|
}
|
|
|
|
/**学生学号
|
|
*@return
|
|
*/
|
|
public String getStudentSn(){
|
|
return studentSn;
|
|
}
|
|
/**学生学号
|
|
*@param studentSn
|
|
*/
|
|
public void setStudentSn(String studentSn){
|
|
this.studentSn = studentSn;
|
|
}
|
|
|
|
/**学生电话
|
|
*@return
|
|
*/
|
|
public String getStudentMobile(){
|
|
return studentMobile;
|
|
}
|
|
/**学生电话
|
|
*@param studentMobile
|
|
*/
|
|
public void setStudentMobile(String studentMobile){
|
|
this.studentMobile = studentMobile;
|
|
}
|
|
|
|
/**学生邮箱
|
|
*@return
|
|
*/
|
|
public String getStudentEmail(){
|
|
return studentEmail;
|
|
}
|
|
/**学生邮箱
|
|
*@param studentEmail
|
|
*/
|
|
public void setStudentEmail(String studentEmail){
|
|
this.studentEmail = studentEmail;
|
|
}
|
|
|
|
/**状态(1正常 2删除)
|
|
*@return
|
|
*/
|
|
public Integer getStudentStatus(){
|
|
return studentStatus;
|
|
}
|
|
/**状态(1正常 2删除)
|
|
*@param studentStatus
|
|
*/
|
|
public void setStudentStatus(Integer studentStatus){
|
|
this.studentStatus = studentStatus;
|
|
}
|
|
|
|
/**学生密码
|
|
*@return
|
|
*/
|
|
public String getStudentPassword(){
|
|
return studentPassword;
|
|
}
|
|
/**学生密码
|
|
*@param studentPassword
|
|
*/
|
|
public void setStudentPassword(String studentPassword){
|
|
this.studentPassword = studentPassword;
|
|
}
|
|
|
|
/**添加时间
|
|
*@return
|
|
*/
|
|
public Date getAddTime(){
|
|
return addTime;
|
|
}
|
|
/**添加时间
|
|
*@param addTime
|
|
*/
|
|
public void setAddTime(Date addTime){
|
|
this.addTime = date(addTime);
|
|
}
|
|
|
|
/**组织机构ID
|
|
*@return
|
|
*/
|
|
public Long getOrgId(){
|
|
return orgId;
|
|
}
|
|
/**组织机构ID
|
|
*@param orgId
|
|
*/
|
|
public void setOrgId(Long orgId){
|
|
this.orgId = orgId;
|
|
}
|
|
|
|
/**后台用户ID
|
|
*@return
|
|
*/
|
|
public Long getUserId(){
|
|
return userId;
|
|
}
|
|
/**后台用户ID
|
|
*@param userId
|
|
*/
|
|
public void setUserId(Long userId){
|
|
this.userId = userId;
|
|
}
|
|
|
|
public String createCode(){
|
|
String code = studentSn;
|
|
//"S_NO"+this.getClassId()+""+(10000L+this.getStudentId());
|
|
return code;
|
|
}
|
|
|
|
public String getHeadImg() {
|
|
return headImg;
|
|
}
|
|
|
|
public void setHeadImg(String headImg) {
|
|
this.headImg = headImg;
|
|
}
|
|
|
|
public String getStudentWeixinInfo() {
|
|
return studentWeixinInfo;
|
|
}
|
|
|
|
public void setStudentWeixinInfo(String studentWeixinInfo) {
|
|
this.studentWeixinInfo = studentWeixinInfo;
|
|
}
|
|
|
|
public SchoolClass getSchoolClass() {
|
|
return schoolClass;
|
|
}
|
|
|
|
public void setSchoolClass(SchoolClass schoolClass) {
|
|
this.schoolClass = schoolClass;
|
|
}
|
|
|
|
@Override
|
|
public Long getId() {
|
|
return defaultIfNull(getUserId(), -1L);
|
|
}
|
|
|
|
@Override
|
|
public Long getRealId() {
|
|
return studentId;
|
|
}
|
|
|
|
@Override
|
|
public MenuEnums getIdentity() {
|
|
return MenuEnums.JT_S_03;
|
|
}
|
|
|
|
public GenderEnum getStudentGender() {
|
|
return studentGender;
|
|
}
|
|
|
|
public void setStudentGender(GenderEnum studentGender) {
|
|
this.studentGender = studentGender;
|
|
}
|
|
|
|
public String getStudentQq() {
|
|
return studentQq;
|
|
}
|
|
|
|
public void setStudentQq(String studentQq) {
|
|
this.studentQq = studentQq;
|
|
}
|
|
|
|
public String getCodeFrom() {
|
|
return codeFrom;
|
|
}
|
|
|
|
public void setCodeFrom(String codeFrom) {
|
|
this.codeFrom = codeFrom;
|
|
}
|
|
|
|
public String getAccountIdByStock() {
|
|
return accountIdByStock;
|
|
}
|
|
|
|
public void setAccountIdByStock(String accountIdByStock) {
|
|
this.accountIdByStock = accountIdByStock;
|
|
}
|
|
|
|
public String getAccountIdByFuture() {
|
|
return accountIdByFuture;
|
|
}
|
|
|
|
public void setAccountIdByFuture(String accountIdByFuture) {
|
|
this.accountIdByFuture = accountIdByFuture;
|
|
}
|
|
}
|