feat():规则引擎功能完成
parent
b6f33d8a00
commit
9fad001ad6
|
@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
/**
|
||||
* 认证授权中心
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
|
|
|
@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
/**
|
||||
* token 控制
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@RestController
|
||||
public class TokenController {
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.auth.form;
|
|||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class LoginBody {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.auth.form;
|
|||
/**
|
||||
* 用户注册对象
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class RegisterBody extends LoginBody {
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
|
|||
/**
|
||||
* 登录校验方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Component
|
||||
public class SysLoginService {
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
|
|||
/**
|
||||
* 登录密码方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Component
|
||||
public class SysPasswordService {
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
|
|||
/**
|
||||
* 记录日志方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Component
|
||||
public class SysRecordLogService {
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
|||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 缓存常量信息
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class CacheConstants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 通用常量信息
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class Constants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 代码生成通用常量
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class GenConstants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 返回状态码
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class HttpStatus {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 任务调度通用常量
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ScheduleConstants {
|
||||
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 权限相关通用常量
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class SecurityConstants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 服务名称
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ServiceNameConstants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* Token的Key常量
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class TokenConstants {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.constant;
|
|||
/**
|
||||
* 用户常量信息
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class UserConstants {
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
||||
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class SecurityContextHolder {
|
||||
private static final TransmittableThreadLocal<Map<String, Object>> THREAD_LOCAL = new TransmittableThreadLocal<>();
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.io.Serializable;
|
|||
/**
|
||||
* 响应信息主体
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.enums;
|
|||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public enum UserStatus {
|
||||
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 验证码错误异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class CaptchaException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 检查异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class CheckedException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 演示模式异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class DemoModeException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 全局异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class GlobalException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 内部认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class InnerAuthException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 权限异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class PreAuthorizeException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 业务异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public final class ServiceException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception;
|
|||
/**
|
||||
* 工具类异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class UtilException extends RuntimeException {
|
||||
private static final long serialVersionUID = 8247610319171014183L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.auth;
|
|||
/**
|
||||
* 未能通过的登录认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class NotLoginException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
/**
|
||||
* 未能通过的权限认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class NotPermissionException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
/**
|
||||
* 未能通过的角色认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class NotRoleException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.base;
|
|||
/**
|
||||
* 基础异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class BaseException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.muyu.common.core.exception.base.BaseException;
|
|||
/**
|
||||
* 文件信息异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileException extends BaseException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.file;
|
|||
/**
|
||||
* 文件名称超长限制异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileNameLengthLimitExceededException extends FileException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.file;
|
|||
/**
|
||||
* 文件名大小限制异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileSizeLimitExceededException extends FileException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.io.PrintWriter;
|
|||
/**
|
||||
* 文件上传异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileUploadException extends Exception {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Arrays;
|
|||
/**
|
||||
* 文件上传 误异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class InvalidExtensionException extends FileUploadException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.job;
|
|||
/**
|
||||
* 计划策略异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class TaskException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.user;
|
|||
/**
|
||||
* 验证码失效异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class CaptchaExpireException extends UserException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.muyu.common.core.exception.base.BaseException;
|
|||
/**
|
||||
* 用户信息异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class UserException extends BaseException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.exception.user;
|
|||
/**
|
||||
* 用户密码不正确或不符合规范异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class UserPasswordNotMatchException extends UserException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.nio.charset.StandardCharsets;
|
|||
/**
|
||||
* 字符集工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class CharsetKit {
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Set;
|
|||
/**
|
||||
* 类型转换器
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class Convert {
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
/**
|
||||
* 字符串格式化
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class StrFormatter {
|
||||
public static final String EMPTY_JSON = "{}";
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Date;
|
|||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
public static String YYYY = "yyyy";
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.io.StringWriter;
|
|||
/**
|
||||
* 错误信息处理类。
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ExceptionUtil {
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.Map;
|
|||
/**
|
||||
* Jwt工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class JwtUtils {
|
||||
public static String secret = TokenConstants.SECRET;
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.muyu.common.core.web.page.TableSupport;
|
|||
/**
|
||||
* 分页工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class PageUtils extends PageHelper {
|
||||
/**
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 客户端工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ServletUtils {
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
|||
/**
|
||||
* spring工具类 方便在非spring管理环境中获取bean
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Component
|
||||
public final class SpringUtils implements BeanFactoryPostProcessor {
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 字符串工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||
/**
|
||||
* Bean 工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class BeanUtils extends org.springframework.beans.BeanUtils {
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
/**
|
||||
* bean对象属性验证
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class BeanValidators {
|
||||
public static void validateWithException (Validator validator, Object object, Class<?>... groups)
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 文件类型工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileTypeUtils {
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.nio.charset.StandardCharsets;
|
|||
/**
|
||||
* 文件处理工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FileUtils {
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Arrays;
|
|||
/**
|
||||
* 图片处理工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ImageUtils {
|
||||
private static final Logger log = LoggerFactory.getLogger(ImageUtils.class);
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.utils.file;
|
|||
/**
|
||||
* 媒体类型工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class MimeTypeUtils {
|
||||
public static final String IMAGE_PNG = "image/png";
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
/**
|
||||
* 转义和反转义工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class EscapeUtil {
|
||||
public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||
/**
|
||||
* HTML过滤器,用于去除XSS漏洞隐患。
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public final class HTMLFilter {
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.net.UnknownHostException;
|
|||
/**
|
||||
* 获取IP方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class IpUtils {
|
||||
public final static String REGX_0_255 = "(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)";
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
|||
/**
|
||||
* Excel数据格式处理适配器
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public interface ExcelHandlerAdapter {
|
||||
/**
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* Excel相关处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class ExcelUtil<T> {
|
||||
public static final String FORMULA_REGEX_STR = "=|-|\\+|@";
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Date;
|
|||
/**
|
||||
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class ReflectUtils {
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.utils.sign;
|
|||
/**
|
||||
* Base64工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public final class Base64 {
|
||||
static private final int BASELENGTH = 128;
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
/**
|
||||
* sql操作工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class SqlUtil {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.core.utils.uuid;
|
|||
/**
|
||||
* ID生成器工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class IdUtils {
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* @author muyu 序列生成类
|
||||
* @author hufangming 序列生成类
|
||||
*/
|
||||
public class Seq {
|
||||
// 通用序列类型
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.concurrent.ThreadLocalRandom;
|
|||
/**
|
||||
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||
private static final long serialVersionUID = -1185015143654744140L;
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
/**
|
||||
* web层通用数据处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class BaseController {
|
||||
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.Map;
|
|||
/**
|
||||
* Entity基类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||
/**
|
||||
* Tree基类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
/**
|
||||
* 分页数据
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class PageDomain {
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||
/**
|
||||
* 表格分页数据对象
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
|
||||
@Data
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.common.core.utils.ServletUtils;
|
|||
/**
|
||||
* 表格数据处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class TableSupport {
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* 自定义xss校验注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.regex.Pattern;
|
|||
/**
|
||||
* 自定义xss校验注解实现
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class XssValidator implements ConstraintValidator<Xss, String> {
|
||||
private static final String HTML_PATTERN = "<(\\S*?)[^>]*>.*?|<.*? />";
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.lang.annotation.*;
|
|||
/**
|
||||
* 数据权限过滤注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
/**
|
||||
* 数据过滤处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.lang.annotation.*;
|
|||
/**
|
||||
* 主库数据源
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.lang.annotation.*;
|
|||
/**
|
||||
* 从库数据源
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.*;
|
|||
/**
|
||||
* 自定义操作日志记录注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 操作日志记录处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.log.enums;
|
|||
/**
|
||||
* 操作状态
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public enum BusinessStatus {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.log.enums;
|
|||
/**
|
||||
* 业务操作类型
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public enum BusinessType {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.log.enums;
|
|||
/**
|
||||
* 操作人类别
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public enum OperatorType {
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
|
|||
/**
|
||||
* 排除JSON敏感属性
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter {
|
||||
public PropertyPreExcludeFilter () {
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
|
|||
/**
|
||||
* 异步调用日志服务
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Service
|
||||
public class AsyncLogService {
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.nio.charset.Charset;
|
|||
/**
|
||||
* Redis使用FastJson序列化
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
|
||||
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|||
/**
|
||||
* redis配置
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.concurrent.TimeUnit;
|
|||
/**
|
||||
* spring redis 工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
**/
|
||||
@SuppressWarnings(value = {"unchecked", "rawtypes"})
|
||||
@Component
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.*;
|
|||
* 自定义feign注解
|
||||
* 添加basePackages路径
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.lang.annotation.*;
|
|||
/**
|
||||
* 内部认证注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.common.security.annotation;
|
|||
/**
|
||||
* 权限注解的验证模式
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public enum Logical {
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* 登录认证:只有登录之后才能进入该方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* 权限认证:必须具有指定权限才能进入该方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* 角色认证:必须具有指定角色标识才能进入该方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
|||
/**
|
||||
* 内部服务调用验证处理
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.lang.reflect.Method;
|
|||
/**
|
||||
* 基于 Spring Aop 的注解鉴权
|
||||
*
|
||||
* @author kong
|
||||
* @author hufangming
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.Set;
|
|||
/**
|
||||
* Token 权限验证,逻辑实现类
|
||||
*
|
||||
* @author muyu
|
||||
* @author hufangming
|
||||
*/
|
||||
public class AuthLogic {
|
||||
/**
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue