mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-13 21:06:48 +08:00
feat: 课程列表SQL版
完善了所有查询条件,并完善导出接口
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
package com.xboe.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程创建来源
|
||||||
|
* boe_course.create_from
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum CourseCreateFromEnum {
|
||||||
|
|
||||||
|
ADMIN("admin", "管理端"),
|
||||||
|
|
||||||
|
TEACHER("teacher", "教师端")
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
private final String label;
|
||||||
|
|
||||||
|
CourseCreateFromEnum(String code, String label) {
|
||||||
|
this.code = code;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CourseCreateFromEnum getByCode(String code) {
|
||||||
|
return Arrays.stream(values()).filter(item -> item.code.equals(code)).findFirst().orElse(ADMIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.xboe.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum CourseStatusEnum {
|
||||||
|
|
||||||
|
STATUS_NONE(1, "-"),
|
||||||
|
STATUS_SUBMIT(2, "审核中"),
|
||||||
|
STATUS_AUDIT_NOPASS(3, "审核驳回"),
|
||||||
|
STATUS_AUDIT_FINISH(5, "审核通过")
|
||||||
|
;
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
|
||||||
|
private final String label;
|
||||||
|
|
||||||
|
CourseStatusEnum(int code, String label) {
|
||||||
|
this.code = code;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CourseStatusEnum getByCode(int code) {
|
||||||
|
return Arrays.stream(values()).filter(item -> item.code == code).findFirst().orElse(STATUS_NONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user