mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-26 04:39:26 +08:00
代码格式化
This commit is contained in:
@@ -1,36 +1,40 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.constant;
|
||||
|
||||
/**
|
||||
* @Author 杭州白书科技有限公司
|
||||
*
|
||||
* @create 2023/2/21 14:57
|
||||
*/
|
||||
public class BPermissionConstant {
|
||||
|
||||
public final static String TYPE_ACTION = "action";
|
||||
public final static String TYPE_DATA = "data";
|
||||
public static final String TYPE_ACTION = "action";
|
||||
public static final String TYPE_DATA = "data";
|
||||
|
||||
public final static String ADMIN_USER_INDEX = "admin-user-index";
|
||||
public final static String ADMIN_USER_CUD = "admin-user-cud";
|
||||
public static final String ADMIN_USER_INDEX = "admin-user-index";
|
||||
public static final String ADMIN_USER_CUD = "admin-user-cud";
|
||||
|
||||
public final static String ADMIN_ROLE = "admin-role";
|
||||
public static final String ADMIN_ROLE = "admin-role";
|
||||
|
||||
public final static String DEPARTMENT_CUD = "department-cud";
|
||||
public static final String DEPARTMENT_CUD = "department-cud";
|
||||
|
||||
public final static String RESOURCE_CATEGORY = "resource-category";
|
||||
public static final String RESOURCE_CATEGORY = "resource-category";
|
||||
|
||||
public final static String USER_INDEX = "user-index";
|
||||
public final static String USER_STORE = "user-store";
|
||||
public final static String USER_UPDATE = "user-update";
|
||||
public final static String USER_DESTROY = "user-destroy";
|
||||
public static final String USER_INDEX = "user-index";
|
||||
public static final String USER_STORE = "user-store";
|
||||
public static final String USER_UPDATE = "user-update";
|
||||
public static final String USER_DESTROY = "user-destroy";
|
||||
|
||||
public final static String COURSE = "course";
|
||||
public final static String COURSE_USER = "course-user";
|
||||
public static final String COURSE = "course";
|
||||
public static final String COURSE_USER = "course-user";
|
||||
|
||||
public final static String RESOURCE_DESTROY = "resource-destroy";
|
||||
|
||||
public final static String DATA_USER_NAME = "data-user-name";
|
||||
public final static String DATA_USER_EMAIL = "data-user-email";
|
||||
public final static String DATA_USER_ID_CARD = "data-user-id-card";
|
||||
public final static String DATA_ADMIN_EMAIL = "data-admin-email";
|
||||
public static final String RESOURCE_DESTROY = "resource-destroy";
|
||||
|
||||
public static final String DATA_USER_NAME = "data-user-name";
|
||||
public static final String DATA_USER_EMAIL = "data-user-email";
|
||||
public static final String DATA_USER_ID_CARD = "data-user-id-card";
|
||||
public static final String DATA_ADMIN_EMAIL = "data-admin-email";
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.constant;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -5,71 +9,86 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class BackendConstant {
|
||||
public final static String SUPER_ADMIN_ROLE = "super-role";
|
||||
public static final String SUPER_ADMIN_ROLE = "super-role";
|
||||
|
||||
public final static List<String> UN_AUTH_URI_WHITELIST = new ArrayList<>() {{
|
||||
add("/backend/v1/system/image-captcha");
|
||||
add("/backend/v1/auth/login");
|
||||
}};
|
||||
public static final List<String> UN_AUTH_URI_WHITELIST =
|
||||
new ArrayList<>() {
|
||||
{
|
||||
add("/backend/v1/system/image-captcha");
|
||||
add("/backend/v1/auth/login");
|
||||
}
|
||||
};
|
||||
|
||||
public final static String RESOURCE_TYPE_VIDEO = "VIDEO";
|
||||
public final static String RESOURCE_TYPE_IMAGE = "IMAGE";
|
||||
public final static String RESOURCE_TYPE_PDF = "PDF";
|
||||
public final static String RESOURCE_TYPE_WORD = "WORD";
|
||||
public final static String RESOURCE_TYPE_PPT = "PPT";
|
||||
public static final String RESOURCE_TYPE_VIDEO = "VIDEO";
|
||||
public static final String RESOURCE_TYPE_IMAGE = "IMAGE";
|
||||
public static final String RESOURCE_TYPE_PDF = "PDF";
|
||||
public static final String RESOURCE_TYPE_WORD = "WORD";
|
||||
public static final String RESOURCE_TYPE_PPT = "PPT";
|
||||
|
||||
public final static HashMap<String, String> RESOURCE_EXT_2_CONTENT_TYPE = new HashMap<>() {{
|
||||
put("png", "image/png");
|
||||
put("jpg", "image/jpg");
|
||||
put("jpeg", "image/jpeg");
|
||||
put("gif", "image/gif");
|
||||
put("pdf", "application/pdf");
|
||||
put("mp4", "video/mp4");
|
||||
put("doc", "application/msword");
|
||||
put("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
put("ppt", "application/vnd.ms-powerpoint");
|
||||
put("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
||||
}};
|
||||
public final static HashMap<String, String> RESOURCE_EXT_2_TYPE = new HashMap<>() {{
|
||||
put("png", RESOURCE_TYPE_IMAGE);
|
||||
put("jpg", RESOURCE_TYPE_IMAGE);
|
||||
put("jpeg", RESOURCE_TYPE_IMAGE);
|
||||
put("gif", RESOURCE_TYPE_IMAGE);
|
||||
put("pdf", RESOURCE_TYPE_PDF);
|
||||
put("mp4", RESOURCE_TYPE_VIDEO);
|
||||
put("doc", RESOURCE_TYPE_WORD);
|
||||
put("docx", RESOURCE_TYPE_WORD);
|
||||
put("ppt", RESOURCE_TYPE_PPT);
|
||||
put("pptx", RESOURCE_TYPE_PPT);
|
||||
}};
|
||||
public final static HashMap<String, String> RESOURCE_TYPE_2_DIR = new HashMap<>() {{
|
||||
put(RESOURCE_TYPE_VIDEO, UPLOAD_VIDEO_DIR);
|
||||
put(RESOURCE_TYPE_IMAGE, UPLOAD_IMAGE_DIR);
|
||||
put(RESOURCE_TYPE_PDF, UPLOAD_PDF_DIR);
|
||||
put(RESOURCE_TYPE_WORD, UPLOAD_WORD_DIR);
|
||||
put(RESOURCE_TYPE_PPT, UPLOAD_PPT_DIR);
|
||||
}};
|
||||
public static final HashMap<String, String> RESOURCE_EXT_2_CONTENT_TYPE =
|
||||
new HashMap<>() {
|
||||
{
|
||||
put("png", "image/png");
|
||||
put("jpg", "image/jpg");
|
||||
put("jpeg", "image/jpeg");
|
||||
put("gif", "image/gif");
|
||||
put("pdf", "application/pdf");
|
||||
put("mp4", "video/mp4");
|
||||
put("doc", "application/msword");
|
||||
put(
|
||||
"docx",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
put("ppt", "application/vnd.ms-powerpoint");
|
||||
put(
|
||||
"pptx",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
||||
}
|
||||
};
|
||||
public static final HashMap<String, String> RESOURCE_EXT_2_TYPE =
|
||||
new HashMap<>() {
|
||||
{
|
||||
put("png", RESOURCE_TYPE_IMAGE);
|
||||
put("jpg", RESOURCE_TYPE_IMAGE);
|
||||
put("jpeg", RESOURCE_TYPE_IMAGE);
|
||||
put("gif", RESOURCE_TYPE_IMAGE);
|
||||
put("pdf", RESOURCE_TYPE_PDF);
|
||||
put("mp4", RESOURCE_TYPE_VIDEO);
|
||||
put("doc", RESOURCE_TYPE_WORD);
|
||||
put("docx", RESOURCE_TYPE_WORD);
|
||||
put("ppt", RESOURCE_TYPE_PPT);
|
||||
put("pptx", RESOURCE_TYPE_PPT);
|
||||
}
|
||||
};
|
||||
public static final HashMap<String, String> RESOURCE_TYPE_2_DIR =
|
||||
new HashMap<>() {
|
||||
{
|
||||
put(RESOURCE_TYPE_VIDEO, UPLOAD_VIDEO_DIR);
|
||||
put(RESOURCE_TYPE_IMAGE, UPLOAD_IMAGE_DIR);
|
||||
put(RESOURCE_TYPE_PDF, UPLOAD_PDF_DIR);
|
||||
put(RESOURCE_TYPE_WORD, UPLOAD_WORD_DIR);
|
||||
put(RESOURCE_TYPE_PPT, UPLOAD_PPT_DIR);
|
||||
}
|
||||
};
|
||||
|
||||
public final static String STORAGE_DRIVER_MINIO = "minio";
|
||||
public static final String STORAGE_DRIVER_MINIO = "minio";
|
||||
|
||||
public final static String[] COURSE_HOUR_TYPE_WHITELIST = {"VIDEO"};
|
||||
public final static String[] COURSE_HOUR_TYPE_WHITELIST_TEXT = {"视频"};
|
||||
public static final String[] COURSE_HOUR_TYPE_WHITELIST = {"VIDEO"};
|
||||
public static final String[] COURSE_HOUR_TYPE_WHITELIST_TEXT = {"视频"};
|
||||
|
||||
public final static String UPLOAD_IMAGE_DIR = "images/";
|
||||
public final static String UPLOAD_VIDEO_DIR = "videos/";
|
||||
public final static String UPLOAD_PDF_DIR = "pdf/";
|
||||
public final static String UPLOAD_WORD_DIR = "word/";
|
||||
public final static String UPLOAD_PPT_DIR = "word/";
|
||||
public static final String UPLOAD_IMAGE_DIR = "images/";
|
||||
public static final String UPLOAD_VIDEO_DIR = "videos/";
|
||||
public static final String UPLOAD_PDF_DIR = "pdf/";
|
||||
public static final String UPLOAD_WORD_DIR = "word/";
|
||||
public static final String UPLOAD_PPT_DIR = "word/";
|
||||
|
||||
public final static String PRIVACY_FIELD_TYPE_EMAIL = "email";
|
||||
public final static String PRIVACY_FIELD_TYPE_PHONE = "phone";
|
||||
public final static String PRIVACY_FIELD_TYPE_NAME = "name";
|
||||
public final static String PRIVACY_FIELD_TYPE_ID_CARD = "IDCard";
|
||||
|
||||
public final static String APP_CONFIG_FIELD_TYPE_IMAGE = "image";
|
||||
public final static String APP_CONFIG_FIELD_TYPE_INPUT = "input";
|
||||
public final static String APP_CONFIG_FIELD_TYPE_TEXT = "text";
|
||||
public final static String APP_CONFIG_FIELD_TYPE_SELECT = "select";
|
||||
public final static String APP_CONFIG_FIELD_TYPE_SWITCH = "switch";
|
||||
public static final String PRIVACY_FIELD_TYPE_EMAIL = "email";
|
||||
public static final String PRIVACY_FIELD_TYPE_PHONE = "phone";
|
||||
public static final String PRIVACY_FIELD_TYPE_NAME = "name";
|
||||
public static final String PRIVACY_FIELD_TYPE_ID_CARD = "IDCard";
|
||||
|
||||
public static final String APP_CONFIG_FIELD_TYPE_IMAGE = "image";
|
||||
public static final String APP_CONFIG_FIELD_TYPE_INPUT = "input";
|
||||
public static final String APP_CONFIG_FIELD_TYPE_TEXT = "text";
|
||||
public static final String APP_CONFIG_FIELD_TYPE_SELECT = "select";
|
||||
public static final String APP_CONFIG_FIELD_TYPE_SWITCH = "switch";
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.constant;
|
||||
|
||||
/**
|
||||
* @Author 杭州白书科技有限公司
|
||||
*
|
||||
* @create 2023/2/17 15:42
|
||||
*/
|
||||
public class BackendLogConstant {
|
||||
|
||||
public final static String OPT_LOGIN = "LOGIN";
|
||||
|
||||
public final static String MODULE_LOGIN = "LOGIN";
|
||||
public static final String OPT_LOGIN = "LOGIN";
|
||||
|
||||
public static final String MODULE_LOGIN = "LOGIN";
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.constant;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -5,21 +9,23 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 杭州白书科技有限公司
|
||||
*
|
||||
* @create 2023/3/13 14:07
|
||||
*/
|
||||
public class FrontendConstant {
|
||||
|
||||
public final static List<String> UN_AUTH_URI_WHITELIST = new ArrayList<>() {{
|
||||
add("/api/v1/system/config");
|
||||
add("/api/v1/system/image-captcha");
|
||||
add("/api/v1/auth/login/password");
|
||||
}};
|
||||
public static final List<String> UN_AUTH_URI_WHITELIST =
|
||||
new ArrayList<>() {
|
||||
{
|
||||
add("/api/v1/system/config");
|
||||
add("/api/v1/system/image-captcha");
|
||||
add("/api/v1/auth/login/password");
|
||||
}
|
||||
};
|
||||
|
||||
public static final String USER_UPLOAD_IMAGE_TYPE_AVATAR = "avatar";
|
||||
|
||||
public final static String USER_UPLOAD_IMAGE_TYPE_AVATAR = "avatar";
|
||||
|
||||
public final static String USER_UPLOAD_IMAGE_SCENE_AVATAR = "avatar";
|
||||
|
||||
public final static String DIR_AVATAR = "user/avatar/";
|
||||
public static final String USER_UPLOAD_IMAGE_SCENE_AVATAR = "avatar";
|
||||
|
||||
public static final String DIR_AVATAR = "user/avatar/";
|
||||
}
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/**
|
||||
* This file is part of the PlayEdu.
|
||||
* (c) 杭州白书科技有限公司
|
||||
*/
|
||||
package xyz.playedu.api.constant;
|
||||
|
||||
public class SystemConstant {
|
||||
|
||||
public final static String VERSION = "v1.0-beta1";
|
||||
public static final String VERSION = "v1.0-beta1";
|
||||
|
||||
public final static String ENV_PROD = "prod";
|
||||
public static final String ENV_PROD = "prod";
|
||||
|
||||
public final static String REDIS_PREFIX = "playedu:";
|
||||
public static final String REDIS_PREFIX = "playedu:";
|
||||
|
||||
public final static String JWT_PRV_ADMIN_USER = "dc14511e97e7eb725fb2976bc939b375";//AdminUser的md5加密
|
||||
public final static String JWT_PRV_USER = "8f9bfe9d1345237cb3b2b205864da075";//User的md5加密
|
||||
public static final String JWT_PRV_ADMIN_USER =
|
||||
"dc14511e97e7eb725fb2976bc939b375"; // AdminUser的md5加密
|
||||
public static final String JWT_PRV_USER = "8f9bfe9d1345237cb3b2b205864da075"; // User的md5加密
|
||||
|
||||
public final static String INTERNAL_IP = "127.0.0.1";
|
||||
|
||||
public final static String INTERNAL_IP_AREA = "内网";
|
||||
public static final String INTERNAL_IP = "127.0.0.1";
|
||||
|
||||
public static final String INTERNAL_IP_AREA = "内网";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user