beetlsql3-dev
malx 2 years ago
parent 6932a9074b
commit 22a2cce490

@ -494,3 +494,6 @@ alter table question_log_summary comment '学生-题目日志-分析汇总';
ALTER TABLE teacher_open_course_question_setting ADD COLUMN teacher_open_course_merge_course_info_id bigint(20) COMMENT '关联的章节ID仅章节练习有值'; ALTER TABLE teacher_open_course_question_setting ADD COLUMN teacher_open_course_merge_course_info_id bigint(20) COMMENT '关联的章节ID仅章节练习有值';
ALTER TABLE teacher_open_course_merge_resources_info ADD COLUMN resources_info_status int(2) COMMENT '资源状态 0 删除 1上架 2下架'; ALTER TABLE teacher_open_course_merge_resources_info ADD COLUMN resources_info_status int(2) COMMENT '资源状态 0 删除 1上架 2下架';
ALTER TABLE student ADD COLUMN student_gender int(2) COMMENT '性别 -1 未知 1男 2女';
ALTER TABLE teacher ADD COLUMN teacher_gender int(2) COMMENT '性别 -1 未知 1男 2女';

@ -5,6 +5,7 @@ import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.annotation.DictDeep; import com.ibeetl.admin.core.annotation.DictDeep;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.enums.MenuEnums; import com.ibeetl.admin.core.enums.MenuEnums;
import com.ibeetl.jlw.enums.GenderEnum;
import org.beetl.sql.annotation.entity.AutoID; import org.beetl.sql.annotation.entity.AutoID;
import org.beetl.sql.annotation.entity.InsertIgnore; import org.beetl.sql.annotation.entity.InsertIgnore;
import org.beetl.sql.annotation.entity.UpdateIgnore; import org.beetl.sql.annotation.entity.UpdateIgnore;
@ -49,7 +50,11 @@ public class Student extends BaseEntity implements AbstractToken {
//学生邮箱 //学生邮箱
private String studentEmail ; private String studentEmail ;
//性别
private GenderEnum studentGender ;
//状态(1正常 2删除) //状态(1正常 2删除)
private Integer studentStatus ; private Integer studentStatus ;
@ -268,4 +273,12 @@ public class Student extends BaseEntity implements AbstractToken {
public MenuEnums getIdentity() { public MenuEnums getIdentity() {
return MenuEnums.JT_S_03; return MenuEnums.JT_S_03;
} }
public GenderEnum getStudentGender() {
return studentGender;
}
public void setStudentGender(GenderEnum studentGender) {
this.studentGender = studentGender;
}
} }

@ -4,6 +4,7 @@ import cn.jlw.validate.ValidateConfig;
import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.enums.MenuEnums; import com.ibeetl.admin.core.enums.MenuEnums;
import com.ibeetl.jlw.enums.GenderEnum;
import org.beetl.sql.annotation.entity.AutoID; import org.beetl.sql.annotation.entity.AutoID;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
@ -58,7 +59,11 @@ public class Teacher extends BaseEntity implements AbstractToken {
//教师邮箱 //教师邮箱
private String teacherEmail ; private String teacherEmail ;
//性别
private GenderEnum teacherGender ;
//状态(1正常 2删除) //状态(1正常 2删除)
private Integer teacherStatus ; private Integer teacherStatus ;
@ -270,4 +275,12 @@ public class Teacher extends BaseEntity implements AbstractToken {
public void setUniversityFacultyId(Long universityFacultyId) { public void setUniversityFacultyId(Long universityFacultyId) {
this.universityFacultyId = universityFacultyId; this.universityFacultyId = universityFacultyId;
} }
public GenderEnum getTeacherGender() {
return teacherGender;
}
public void setTeacherGender(GenderEnum teacherGender) {
this.teacherGender = teacherGender;
}
} }

@ -0,0 +1,25 @@
package com.ibeetl.jlw.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.beetl.sql.annotation.entity.EnumMapping;
import org.beetl.sql.annotation.entity.EnumValue;
/**
*
*
* @author mlx
*/
@Getter
@EnumMapping("name")
@AllArgsConstructor
public enum GenderEnum {
MAN(1, "男"),
WOMAN(2, "女"),
UN_KNOW(-1, "未知");
@EnumValue
private Integer code;
private String text;
}

@ -3,10 +3,14 @@ package com.ibeetl.jlw.web.query;
import com.ibeetl.admin.core.annotation.Query; import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.web.query.PageParam; import com.ibeetl.admin.core.web.query.PageParam;
import com.ibeetl.jlw.entity.Student; import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.enums.GenderEnum;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
import static com.ibeetl.jlw.enums.GenderEnum.UN_KNOW;
/** /**
*Student *Student
*/ */
@ -23,6 +27,9 @@ public class StudentQuery extends PageParam {
private String studentMobile; private String studentMobile;
@Query(name = "学生邮箱", display = false) @Query(name = "学生邮箱", display = false)
private String studentEmail; private String studentEmail;
@Query(name = "学生性别", display = false)
private GenderEnum studentGender;
@Query(name = "学生头像", display = false) @Query(name = "学生头像", display = false)
private String headImg; private String headImg;
@Query(name = "状态(1正常 2删除)", display = false) @Query(name = "状态(1正常 2删除)", display = false)
@ -192,6 +199,14 @@ public class StudentQuery extends PageParam {
this.studentSnOrName = studentSnOrName; this.studentSnOrName = studentSnOrName;
} }
public GenderEnum getStudentGender() {
return studentGender;
}
public void setStudentGender(GenderEnum studentGender) {
this.studentGender = studentGender;
}
public static class StudentTemp{ //临时学生类 public static class StudentTemp{ //临时学生类
private Long studentsId; private Long studentsId;
@ -307,6 +322,7 @@ public class StudentQuery extends PageParam {
pojo.setStudentSn(this.getStudentSn()); pojo.setStudentSn(this.getStudentSn());
pojo.setStudentMobile(this.getStudentMobile()); pojo.setStudentMobile(this.getStudentMobile());
pojo.setStudentEmail(this.getStudentEmail()); pojo.setStudentEmail(this.getStudentEmail());
pojo.setStudentGender(defaultIfNull(this.getStudentGender(), UN_KNOW));
pojo.setStudentStatus(this.getStudentStatus()); pojo.setStudentStatus(this.getStudentStatus());
pojo.setStudentPassword(this.getStudentPassword()); pojo.setStudentPassword(this.getStudentPassword());
pojo.setAddTime(this.getAddTime()); pojo.setAddTime(this.getAddTime());
@ -314,6 +330,7 @@ public class StudentQuery extends PageParam {
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setHeadImg(this.getHeadImg()); pojo.setHeadImg(this.getHeadImg());
pojo.setStudentWeixinInfo(this.getStudentWeixinInfo()); pojo.setStudentWeixinInfo(this.getStudentWeixinInfo());
pojo.setStudentWeixinInfo(this.getStudentWeixinInfo());
return pojo; return pojo;
} }

@ -3,6 +3,7 @@ package com.ibeetl.jlw.web.query;
import com.ibeetl.admin.core.annotation.Query; import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.web.query.PageParam; import com.ibeetl.admin.core.web.query.PageParam;
import com.ibeetl.jlw.entity.Teacher; import com.ibeetl.jlw.entity.Teacher;
import com.ibeetl.jlw.enums.GenderEnum;
import java.util.Date; import java.util.Date;
@ -31,6 +32,8 @@ public class TeacherQuery extends PageParam {
private String teacherMobile; private String teacherMobile;
@Query(name = "教师邮箱", display = false) @Query(name = "教师邮箱", display = false)
private String teacherEmail; private String teacherEmail;
@Query(name = "性别", display = false)
private GenderEnum teacherGender ;
@Query(name = "状态(1正常 2删除)", display = false) @Query(name = "状态(1正常 2删除)", display = false)
private Integer teacherStatus; private Integer teacherStatus;
@Query(name = "教师密码", display = false) @Query(name = "教师密码", display = false)
@ -168,6 +171,7 @@ public class TeacherQuery extends PageParam {
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setUniversityFacultyId(this.getUniversityFacultyId()); pojo.setUniversityFacultyId(this.getUniversityFacultyId());
pojo.setUniversitySystemId(this.getUniversitySystemId()); pojo.setUniversitySystemId(this.getUniversitySystemId());
pojo.setTeacherGender(this.getTeacherGender());
return pojo; return pojo;
} }
@ -242,4 +246,12 @@ public class TeacherQuery extends PageParam {
public void setUniversitySystemId(Long universitySystemId) { public void setUniversitySystemId(Long universitySystemId) {
this.universitySystemId = universitySystemId; this.universitySystemId = universitySystemId;
} }
public GenderEnum getTeacherGender() {
return teacherGender;
}
public void setTeacherGender(GenderEnum teacherGender) {
this.teacherGender = teacherGender;
}
} }

@ -201,6 +201,9 @@ queryByConditionQuery
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentStatuses)){ @if(!isEmpty(studentStatuses)){
and find_in_set(t.student_status,#studentStatuses#) and find_in_set(t.student_status,#studentStatuses#)
@} @}
@ -315,6 +318,9 @@ queryByCondition2Student
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentStatuses)){ @if(!isEmpty(studentStatuses)){
and find_in_set(t.student_status,#studentStatuses#) and find_in_set(t.student_status,#studentStatuses#)
@} @}
@ -559,6 +565,9 @@ getExcelValues2Competition
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentPassword)){ @if(!isEmpty(studentPassword)){
and t.student_password =#studentPassword# and t.student_password =#studentPassword#
@} @}
@ -687,6 +696,9 @@ getExcelValues2Competition
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentPassword)){ @if(!isEmpty(studentPassword)){
and t.student_password =#studentPassword# and t.student_password =#studentPassword#
@} @}
@ -780,6 +792,9 @@ getStudentValues
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentPassword)){ @if(!isEmpty(studentPassword)){
and t.student_password =#studentPassword# and t.student_password =#studentPassword#
@} @}
@ -839,6 +854,9 @@ getValuesByQuery
@if(!isEmpty(studentStatus)){ @if(!isEmpty(studentStatus)){
and t.student_status =#studentStatus# and t.student_status =#studentStatus#
@} @}
@if(!isEmpty(studentGender)){
and t.student_gender =#studentGender#
@}
@if(!isEmpty(studentStatuses)){ @if(!isEmpty(studentStatuses)){
and find_in_set(t.student_status,#studentStatuses#) and find_in_set(t.student_status,#studentStatuses#)
@} @}

Loading…
Cancel
Save