securityReferences = new ArrayList<>();
- securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
- return securityReferences;
- }
-
- /**
- * 添加摘要信息
- */
- private ApiInfo apiInfo() {
- // 用ApiInfoBuilder进行定制
- return new ApiInfoBuilder()
- // 设置标题
- .title("标题:宏驰云管理系统_接口文档")
- // 描述
- .description("描述:系统接口模块管理")
- // 作者信息
- .contact(new Contact(hchYunConfig.getName(), null, null))
- // 版本
- .version("版本号:" + hchYunConfig.getVersion())
- .build();
- }
-}
diff --git a/hchyun/hchyun-admin/src/main/resources/META-INF/spring-devtools.properties b/hchyun/hchyun-admin/src/main/resources/META-INF/spring-devtools.properties
deleted file mode 100644
index 2b23f85..0000000
--- a/hchyun/hchyun-admin/src/main/resources/META-INF/spring-devtools.properties
+++ /dev/null
@@ -1 +0,0 @@
-restart.include.json=/com.alibaba.fastjson.*.jar
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/application-druid.yml b/hchyun/hchyun-admin/src/main/resources/application-druid.yml
deleted file mode 100644
index 1ab9e7c..0000000
--- a/hchyun/hchyun-admin/src/main/resources/application-druid.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-# 数据源配置
-spring:
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- druid:
- # 主库数据源
- master:
- url: jdbc:mysql://114.215.82.135:3306/hcybase?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
- username: hcybase
- password: hcybase@2020
- # 从库数据源
- slave:
- # 从数据源开关/默认关闭
- enabled: false
- url:
- username:
- password:
- # 初始连接数
- initialSize: 5
- # 最小连接池数量
- minIdle: 10
- # 最大连接池数量
- maxActive: 20
- # 配置获取连接等待超时的时间
- maxWait: 60000
- # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- timeBetweenEvictionRunsMillis: 60000
- # 配置一个连接在池中最小生存的时间,单位是毫秒
- minEvictableIdleTimeMillis: 300000
- # 配置一个连接在池中最大生存的时间,单位是毫秒
- maxEvictableIdleTimeMillis: 900000
- # 配置检测连接是否有效
- validationQuery: SELECT 1 FROM DUAL
- testWhileIdle: true
- testOnBorrow: false
- testOnReturn: false
- webStatFilter:
- enabled: true
- statViewServlet:
- enabled: true
- # 设置白名单,不填则允许所有访问
- allow:
- url-pattern: /druid/*
- # 控制台管理用户名和密码
- login-username:
- login-password:
- filter:
- stat:
- enabled: true
- # 慢SQL记录
- log-slow-sql: true
- slow-sql-millis: 1000
- merge-sql: true
- wall:
- config:
- multi-statement-allow: true
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/application.yml b/hchyun/hchyun-admin/src/main/resources/application.yml
deleted file mode 100644
index ce80e3d..0000000
--- a/hchyun/hchyun-admin/src/main/resources/application.yml
+++ /dev/null
@@ -1,140 +0,0 @@
-# 项目相关配置
-hchyun:
- # 名称
- name: HchYun
- # 版本
- version: 1.0.0
- # 版权年份
- copyrightYear: 2020
- # 实例演示开关
- demoEnabled: true
- # 文件路径 示例( Windows配置D:/hchyun/uploadPath,Linux配置(宝塔) /www/wwwroot/hchyun/uploadPath)
- profile: F:/hchyun/uploadPath
- # 获取ip地址开关
- addressEnabled: false
- # 验证码类型 math 数组计算 char 字符验证
- captchaType: math
-ftp:
- # ftp服务器ip地址
- ftpAddress: 114.215.82.135
- # 端口号
- ftpPort: 21
- # 用户名
- ftpUsername: hcyftp
- # 密码
- ftpPassword: hcyftp@2020
- # 字符集编码
- encoding: UTF-8
- # 资源域名末尾以/结尾
- resources: http://download.hchyun.com
- # 公开目录
- pubfiles: pubfiles
- # 保护目录
- prifiles: prifiles
-
-
-
-# 开发环境配置
-server:
- # 服务器的HTTP端口,默认为8085
- port: 8085
- servlet:
- # 应用的访问路径
- context-path: /dev-api
- tomcat:
- # tomcat的URI编码
- uri-encoding: UTF-8
- # tomcat最大线程数,默认为200
- max-threads: 800
- # Tomcat启动初始化的线程数,默认值25
- min-spare-threads: 30
-
-# 日志配置
-logging:
- level:
- com.hchyun: debug
- org.springframework: warn
-# com.hchyun: error
-# org.springframework: error
-
-# Spring配置
-spring:
- # 资源信息
- messages:
- # 国际化资源文件路径
- basename: i18n/messages
- profiles:
- active: druid
- # 文件上传
- servlet:
- multipart:
- # 单个文件大小
- max-file-size: 10MB
- # 设置总上传的文件大小
- max-request-size: 20MB
- # 服务模块
- devtools:
- restart:
- # 热部署开关
- enabled: true
- # redis 配置
- redis:
- # 地址
- host: 114.215.82.135
- # 端口,默认为6379
- port: 6378
- # 密码
- password: hcy@2020
- # 连接超时时间
- timeout: 10s
- lettuce:
- pool:
- # 连接池中的最小空闲连接
- min-idle: 0
- # 连接池中的最大空闲连接
- max-idle: 8
- # 连接池的最大数据库连接数
- max-active: 8
- # #连接池最大阻塞等待时间(使用负值表示没有限制)
- max-wait: -1ms
-
-# token配置
-token:
- # 令牌自定义标识
- header: Authorization
- # 令牌密钥
- secret: hcy@2020
- # 令牌有效期(默认30分钟)
- expireTime: 30
-
-# MyBatis配置
-mybatis:
- # 搜索指定包别名
- typeAliasesPackage: com.hchyun.**.entity
- # 配置mapper的扫描,找到所有的mapper.xml映射文件
- mapperLocations: classpath*:mapper/**/*Mapper.xml
- # 加载全局的配置文件
- configLocation: classpath:mybatis/mybatis-config.xml
-
-# PageHelper分页插件
-pagehelper:
- helperDialect: mysql
- reasonable: true
- supportMethodsArguments: true
- params: count=countSql
-
-# Swagger配置
-swagger:
- # 是否开启swagger
- enabled: true
- # 请求前缀
- pathMapping: /
-
-# 防止XSS攻击
-xss:
- # 过滤开关
- enabled: true
- # 排除链接(多个用逗号分隔)
- excludes: /system/notice/*
- # 匹配链接
- urlPatterns: /system/*,/monitor/*,/tool/*
diff --git a/hchyun/hchyun-admin/src/main/resources/banner.txt b/hchyun/hchyun-admin/src/main/resources/banner.txt
deleted file mode 100644
index 288be14..0000000
--- a/hchyun/hchyun-admin/src/main/resources/banner.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Application Version: ${hchyun.version}
-Spring Boot Version: ${spring-boot.version}
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/generator.yml b/hchyun/hchyun-admin/src/main/resources/generator.yml
deleted file mode 100644
index 97c45d4..0000000
--- a/hchyun/hchyun-admin/src/main/resources/generator.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-# 代码生成
-gen:
- # 作者
- author: hchyun
- # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
- packageName: com.hchyun.test
- # 自动去除表前缀,默认是false
- autoRemovePre: true
- # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
- tablePrefix: sys_,test_
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/i18n/messages.properties b/hchyun/hchyun-admin/src/main/resources/i18n/messages.properties
deleted file mode 100644
index d63aa1f..0000000
--- a/hchyun/hchyun-admin/src/main/resources/i18n/messages.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#错误消息
-not.null=* 必须填写
-user.jcaptcha.error=验证码错误
-user.jcaptcha.expire=验证码已失效
-user.not.exists=用户不存在/密码错误
-user.password.not.match=用户不存在/密码错误
-user.password.retry.limit.count=密码输入错误{0}次
-user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
-user.password.delete=对不起,您的账号已被删除
-user.blocked=用户已封禁,请联系管理员
-role.blocked=角色已封禁,请联系管理员
-user.logout.success=退出成功
-
-length.not.valid=长度必须在{min}到{max}个字符之间
-
-user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
-user.password.not.valid=* 5-50个字符
-
-user.email.not.valid=邮箱格式错误
-user.mobile.phone.number.not.valid=手机号格式错误
-user.login.success=登录成功
-user.notfound=请重新登录
-user.forcelogout=管理员强制退出,请重新登录
-user.unknown.error=未知错误,请重新登录
-
-##文件上传消息
-upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB!
-upload.filename.exceed.length=上传的文件名最长{0}个字符
-
-##权限
-no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
-no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
-no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
-no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
-no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
-no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
diff --git a/hchyun/hchyun-admin/src/main/resources/logback.xml b/hchyun/hchyun-admin/src/main/resources/logback.xml
deleted file mode 100644
index 5566afa..0000000
--- a/hchyun/hchyun-admin/src/main/resources/logback.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ${log.pattern}
-
-
-
-
-
- ${log.path}/sys-info.log
-
-
-
- ${log.path}/sys-info.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
- INFO
-
- ACCEPT
-
- DENY
-
-
-
-
- ${log.path}/sys-error.log
-
-
-
- ${log.path}/sys-error.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
- ERROR
-
- ACCEPT
-
- DENY
-
-
-
-
-
- ${log.path}/sys-user.log
-
-
- ${log.path}/sys-user.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/logbackpro.xml b/hchyun/hchyun-admin/src/main/resources/logbackpro.xml
deleted file mode 100644
index a777deb..0000000
--- a/hchyun/hchyun-admin/src/main/resources/logbackpro.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ${log.pattern}
-
-
-
-
-
- ${log.path}/sys-info.log
-
-
-
- ${log.path}/sys-info.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
- ERROR
-
- ACCEPT
-
- DENY
-
-
-
-
- ${log.path}/sys-error.log
-
-
-
- ${log.path}/sys-error.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
- ERROR
-
- ACCEPT
-
- DENY
-
-
-
-
-
- ${log.path}/sys-user.log
-
-
- ${log.path}/sys-user.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hchyun/hchyun-admin/src/main/resources/mybatis/mybatis-config.xml b/hchyun/hchyun-admin/src/main/resources/mybatis/mybatis-config.xml
deleted file mode 100644
index a5241ec..0000000
--- a/hchyun/hchyun-admin/src/main/resources/mybatis/mybatis-config.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hchyun/hchyun-common/pom.xml b/hchyun/hchyun-common/pom.xml
deleted file mode 100644
index ad7c9d7..0000000
--- a/hchyun/hchyun-common/pom.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
- hchyun
- com.hchyun
- 1.0.0
-
- 4.0.0
-
- hchyun-common
-
-
- common通用工具
-
-
-
-
-
-
- commons-net
- commons-net
- 3.7
-
-
-
-
- org.springframework
- spring-context-support
-
-
-
-
- org.springframework
- spring-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
-
-
- com.github.pagehelper
- pagehelper-spring-boot-starter
-
-
-
-
- javax.validation
- validation-api
-
-
-
-
- org.apache.commons
- commons-lang3
-
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
-
-
- com.alibaba
- fastjson
-
-
-
-
- commons-io
- commons-io
-
-
-
-
- commons-fileupload
- commons-fileupload
-
-
-
-
- org.apache.poi
- poi-ooxml
-
-
-
-
- org.yaml
- snakeyaml
-
-
-
-
- io.jsonwebtoken
- jjwt
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.apache.commons
- commons-pool2
-
-
-
-
- eu.bitwalker
- UserAgentUtils
-
-
-
-
- javax.servlet
- javax.servlet-api
-
-
-
- io.springfox
- springfox-swagger2
-
-
-
-
- io.swagger
- swagger-annotations
- 1.5.21
-
-
-
- io.swagger
- swagger-models
- 1.5.21
-
-
-
-
- io.springfox
- springfox-swagger-ui
-
-
-
-
-
\ No newline at end of file
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataScope.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataScope.java
deleted file mode 100644
index d9c0869..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataScope.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * 数据权限过滤注解
- *
- * @author hchyun
- */
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface DataScope {
- /**
- * 部门表的别名
- */
- public String deptAlias() default "";
-
- /**
- * 用户表的别名
- */
- public String userAlias() default "";
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataSource.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataSource.java
deleted file mode 100644
index f954375..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/DataSource.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.hchyun.common.enums.DataSourceType;
-
-/**
- * 自定义多数据源切换注解
- *
- * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
- *
- * @author hchyun
- */
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@Inherited
-public @interface DataSource {
- /**
- * 切换数据源名称
- */
- public DataSourceType value() default DataSourceType.MASTER;
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excel.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excel.java
deleted file mode 100644
index f95157e..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excel.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.math.BigDecimal;
-
-/**
- * 自定义导出Excel数据注解
- *
- * @author hchyun
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
-public @interface Excel {
- /**
- * 导出时在excel中排序
- */
-// public int sort() default Integer.MAX_VALUE;
- public int sort() default 1;
-
- /**
- * 导出到Excel中的名字.
- */
- public String name() default "";
-
- /**
- * 日期格式, 如: yyyy-MM-dd
- */
- public String dateFormat() default "";
-
- /**
- * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
- */
- public String dictType() default "";
-
- /**
- * 读取内容转表达式 (如: 0=男,1=女,2=未知)
- */
- public String readConverterExp() default "";
-
- /**
- * 分隔符,读取字符串组内容
- */
- public String separator() default ",";
-
- /**
- * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
- */
- public int scale() default -1;
-
- /**
- * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
- */
- public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
-
- /**
- * 导出类型(0数字 1字符串)
- */
- public ColumnType cellType() default ColumnType.STRING;
-
- /**
- * 导出时在excel中每个列的高度 单位为字符
- */
- public double height() default 14;
-
- /**
- * 导出时在excel中每个列的宽 单位为字符
- */
- public double width() default 16;
-
- /**
- * 文字后缀,如% 90 变成90%
- */
- public String suffix() default "";
-
- /**
- * 当值为空时,字段的默认值
- */
- public String defaultValue() default "";
-
- /**
- * 提示信息
- */
- public String prompt() default "";
-
- /**
- * 设置只能选择不能输入的列内容.
- */
- public String[] combo() default {};
-
- /**
- * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
- */
- public boolean isExport() default true;
-
- /**
- * 另一个类中的属性名称,支持多级获取,以小数点隔开
- */
- public String targetAttr() default "";
-
- /**
- * 是否自动统计数据,在最后追加一行统计数据总和
- */
- public boolean isStatistics() default false;
-
-
- /**
- * 字段类型(0:导出导入;1:仅导出;2:仅导入)
- */
- Type type() default Type.ALL;
-
- public enum Type {
- ALL(0), EXPORT(1), IMPORT(2);
- private final int value;
-
- Type(int value) {
- this.value = value;
- }
-
- public int value() {
- return this.value;
- }
- }
-
- public enum ColumnType {
- NUMERIC(0), STRING(1);
- private final int value;
-
- ColumnType(int value) {
- this.value = value;
- }
-
- public int value() {
- return this.value;
- }
- }
-}
\ No newline at end of file
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excels.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excels.java
deleted file mode 100644
index 71166c8..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Excels.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Excel注解集
- *
- * @author hchyun
- */
-@Target(ElementType.FIELD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Excels {
- Excel[] value();
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Log.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Log.java
deleted file mode 100644
index 6d173ae..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/Log.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.hchyun.common.enums.BusinessType;
-import com.hchyun.common.enums.OperatorType;
-
-/**
- * 自定义操作日志记录注解
- *
- * @author hchyun
- */
-@Target({ElementType.PARAMETER, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface Log {
- /**
- * 模块
- */
- public String title() default "";
-
- /**
- * 功能
- */
- public BusinessType businessType() default BusinessType.OTHER;
-
- /**
- * 操作人类别
- */
- public OperatorType operatorType() default OperatorType.MANAGE;
-
- /**
- * 是否保存请求的参数
- */
- public boolean isSaveRequestData() default true;
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/RepeatSubmit.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/RepeatSubmit.java
deleted file mode 100644
index 2d0cf99..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/annotation/RepeatSubmit.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.hchyun.common.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * 自定义注解防止表单重复提交
- *
- * @author hchyun
- */
-@Inherited
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface RepeatSubmit {
-
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/config/HchYunConfig.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/config/HchYunConfig.java
deleted file mode 100644
index 132c81c..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/config/HchYunConfig.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.hchyun.common.config;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * 读取项目相关配置
- *
- * @author hchyun
- */
-@Component
-@ConfigurationProperties(prefix = "hchyun")
-//@ConfigurationProperties(prefix = "ftp.service")
-public class HchYunConfig {
- /**
- * 项目名称
- */
- private String name;
-
- /**
- * 版本
- */
- private String version;
-
- /**
- * 版权年份
- */
- private String copyrightYear;
-
- /**
- * 实例演示开关
- */
- private boolean demoEnabled;
-
- /**
- * 上传路径
- */
- private static String profile;
-
- /**
- * 获取地址开关
- */
- private static boolean addressEnabled;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getCopyrightYear() {
- return copyrightYear;
- }
-
- public void setCopyrightYear(String copyrightYear) {
- this.copyrightYear = copyrightYear;
- }
-
- public boolean isDemoEnabled() {
- return demoEnabled;
- }
-
- public void setDemoEnabled(boolean demoEnabled) {
- this.demoEnabled = demoEnabled;
- }
-
- public static String getProfile() {
- return profile;
- }
-
- public void setProfile(String profile) {
- HchYunConfig.profile = profile;
- }
-
- public static boolean isAddressEnabled() {
- return addressEnabled;
- }
-
- public void setAddressEnabled(boolean addressEnabled) {
- HchYunConfig.addressEnabled = addressEnabled;
- }
-
-
- /**
- * 获取头像上传路径
- */
- public static String getAvatarPath() {
- return getProfile() + "/avatar";
- }
-
- /**
- * 获取下载路径
- */
- public static String getDownloadPath() {
- return getProfile() + "/download/";
- }
-
- /**
- * 获取上传路径
- */
- public static String getUploadPath() {
- return getProfile() + "/upload";
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/Constants.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/Constants.java
deleted file mode 100644
index 43c1021..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/Constants.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package com.hchyun.common.constant;
-
-/**
- * 通用常量信息
- *
- * @author hchyun
- */
-public class Constants {
- /**
- * UTF-8 字符集
- */
- public static final String UTF8 = "UTF-8";
-
- /**
- * GBK 字符集
- */
- public static final String GBK = "GBK";
-
- /**
- * http请求
- */
- public static final String HTTP = "http://";
-
- /**
- * https请求
- */
- public static final String HTTPS = "https://";
-
- /**
- * 通用成功标识
- */
- public static final String SUCCESS = "0";
-
- /**
- * 通用失败标识
- */
- public static final String FAIL = "1";
-
- /**
- * 登录成功
- */
- public static final String LOGIN_SUCCESS = "Success";
-
- /**
- * 注销
- */
- public static final String LOGOUT = "Logout";
-
- /**
- * 登录失败
- */
- public static final String LOGIN_FAIL = "Error";
-
- /**
- * 验证码 redis key
- */
- public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
-
- /**
- * 登录用户 redis key
- */
- public static final String LOGIN_TOKEN_KEY = "login_tokens:";
-
- /**
- * 防重提交 redis key
- */
- public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
-
- /**
- * 验证码有效期(分钟)
- */
- public static final Integer CAPTCHA_EXPIRATION = 2;
-
- /**
- * 令牌
- */
- public static final String TOKEN = "token";
-
- /**
- * 令牌前缀
- */
- public static final String TOKEN_PREFIX = "Bearer ";
-
- /**
- * 令牌前缀
- */
- public static final String LOGIN_USER_KEY = "login_user_key";
-
- /**
- * 用户ID
- */
- public static final String JWT_USERID = "userid";
-
- /**
- * 用户名称
- */
- public static final String JWT_USERNAME = "sub";
-
- /**
- * 用户头像
- */
- public static final String JWT_AVATAR = "avatar";
-
- /**
- * 创建时间
- */
- public static final String JWT_CREATED = "created";
-
- /**
- * 用户权限
- */
- public static final String JWT_AUTHORITIES = "authorities";
-
- /**
- * 参数管理 cache key
- */
- public static final String SYS_CONFIG_KEY = "sys_config:";
-
- /**
- * 字典管理 cache key
- */
- public static final String SYS_DICT_KEY = "sys_dict:";
-
- /**
- * 资源映射路径 前缀
- */
- public static final String RESOURCE_PREFIX = "/profile";
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/GenConstants.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/GenConstants.java
deleted file mode 100644
index 45f033e..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/GenConstants.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package com.hchyun.common.constant;
-
-/**
- * 代码生成通用常量
- *
- * @author hchyun
- */
-public class GenConstants {
- /**
- * 单表(增删改查)
- */
- public static final String TPL_CRUD = "crud";
-
- /**
- * 树表(增删改查)
- */
- public static final String TPL_TREE = "tree";
-
- /**
- * 主子表(增删改查)
- */
- public static final String TPL_SUB = "sub";
-
- /**
- * 关联查询(增删改查)
- */
- public static final String TPL_ASS = "ass";
-
- /**
- * 树编码字段
- */
- public static final String TREE_CODE = "treeCode";
-
- /**
- * 树父编码字段
- */
- public static final String TREE_PARENT_CODE = "treeParentCode";
-
- /**
- * 树名称字段
- */
- public static final String TREE_NAME = "treeName";
-
- /**
- * 上级菜单ID字段
- */
- public static final String PARENT_MENU_ID = "parentMenuId";
-
- /**
- * 上级菜单名称字段
- */
- public static final String PARENT_MENU_NAME = "parentMenuName";
-
- /**
- * 数据库字符串类型
- */
- public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2", "tinytext", "text",
- "mediumtext", "longtext"};
-
- /**
- * 数据库文本类型
- */
- public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
-
- /**
- * 数据库时间类型
- */
- public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
-
- /**
- * 数据库数字类型
- */
- public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
- "bit", "bigint", "float", "float", "double", "decimal"};
-
- /**
- * 页面不需要编辑字段
- */
- public static final String[] COLUMNNAME_NOT_EDIT = {"id", "create_by", "create_time", "del_flag"};
-
- /**
- * 页面不需要显示的列表字段
- */
- public static final String[] COLUMNNAME_NOT_LIST = {"id", "create_by", "create_time", "del_flag", "update_by",
- "update_time"};
-
- /**
- * 页面不需要查询字段
- */
- public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
- "update_time", "remark"};
-
- /**
- * Entity基类字段
- */
- public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime", "remark"};
-
- /**
- * Tree基类字段
- */
- public static final String[] TREE_ENTITY = {"parentName", "parentId", "orderNum", "ancestors", "children"};
-
- /**
- * 文本框
- */
- public static final String HTML_INPUT = "input";
-
- /**
- * 文本域
- */
- public static final String HTML_TEXTAREA = "textarea";
-
- /**
- * 下拉框
- */
- public static final String HTML_SELECT = "select";
-
- /**
- * 单选框
- */
- public static final String HTML_RADIO = "radio";
-
- /**
- * 复选框
- */
- public static final String HTML_CHECKBOX = "checkbox";
-
- /**
- * 日期控件
- */
- public static final String HTML_DATETIME = "datetime";
-
- /**
- * 图片上传控件
- */
- public static final String HTML_IMAGE_UPLOAD = "imageUpload";
-
- /**
- * 文件上传控件
- */
- public static final String HTML_FILE_UPLOAD = "fileUpload";
-
- /**
- * 富文本控件
- */
- public static final String HTML_EDITOR = "editor";
-
- /**
- * 字符串类型
- */
- public static final String TYPE_STRING = "String";
-
- /**
- * 整型
- */
- public static final String TYPE_INTEGER = "Integer";
-
- /**
- * 长整型
- */
- public static final String TYPE_LONG = "Long";
-
- /**
- * 浮点型
- */
- public static final String TYPE_DOUBLE = "Double";
-
- /**
- * 高精度计算类型
- */
- public static final String TYPE_BIGDECIMAL = "BigDecimal";
-
- /**
- * 时间类型
- */
- public static final String TYPE_DATE = "Date";
-
- /**
- * 模糊查询
- */
- public static final String QUERY_LIKE = "LIKE";
- /**
- * 精确查询
- */
- public static final String QUERY_EQ = "EQ";
-
- /**
- * 需要
- */
- public static final String REQUIRE = "1";
- /**
- * 不需要
- */
- public static final String NO_REQUIRE = "0";
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/HttpStatus.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/HttpStatus.java
deleted file mode 100644
index 16ca8d5..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/HttpStatus.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.hchyun.common.constant;
-
-/**
- * 返回状态码
- *
- * @author hchyun
- */
-public class HttpStatus {
- /**
- * 操作成功
- */
- public static final int SUCCESS = 200;
-
- /**
- * 操作成功
- */
- public static final int NO_DATA = 199;
-
- /**
- * 对象创建成功
- */
- public static final int CREATED = 201;
-
- /**
- * 请求已经被接受
- */
- public static final int ACCEPTED = 202;
-
- /**
- * 操作已经执行成功,但是没有返回数据
- */
- public static final int NO_CONTENT = 204;
-
- /**
- * 资源已被移除
- */
- public static final int MOVED_PERM = 301;
-
- /**
- * 重定向
- */
- public static final int SEE_OTHER = 303;
-
- /**
- * 资源没有被修改
- */
- public static final int NOT_MODIFIED = 304;
-
- /**
- * 参数列表错误(缺少,格式不匹配)
- */
- public static final int BAD_REQUEST = 400;
-
- /**
- * 未授权
- */
- public static final int UNAUTHORIZED = 401;
-
- /**
- * 访问受限,授权过期
- */
- public static final int FORBIDDEN = 403;
-
- /**
- * 资源,服务未找到
- */
- public static final int NOT_FOUND = 404;
-
- /**
- * 不允许的http方法
- */
- public static final int BAD_METHOD = 405;
-
- /**
- * 资源冲突,或者资源被锁
- */
- public static final int CONFLICT = 409;
-
- /**
- * 不支持的数据,媒体类型
- */
- public static final int UNSUPPORTED_TYPE = 415;
-
- /**
- * 系统内部错误
- */
- public static final int ERROR = 500;
-
- /**
- * 接口未实现
- */
- public static final int NOT_IMPLEMENTED = 501;
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ReturnConstants.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ReturnConstants.java
deleted file mode 100644
index 4d856f6..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ReturnConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.hchyun.common.constant;
-
-public class ReturnConstants {
- /**
- * 系统错误
- */
- public static final String SYS_ERROR = "系统错误!";
-
- /**
- * 查询结果为空
- */
- public static final String RESULT_EMPTY = "查询结果为空!";
- /**
- * 数据库异常
- */
- public static final String DB_EX = "数据库异常!";
- /**
- * 操作失败
- */
- public static final String SYS_FAILL = "数据库异常!";
- /**
- * 接口为空
- */
- public static final String INTER_NULL = "该类下接口数据为空,请先添加接口!";
-
- public static final String STATE_ERROR = "状态错错误!";
-
- public static final String OP_ERROR = "操作失败!";
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ScheduleConstants.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ScheduleConstants.java
deleted file mode 100644
index ec71a15..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/ScheduleConstants.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.hchyun.common.constant;
-
-/**
- * 任务调度通用常量
- *
- * @author hchyun
- */
-public class ScheduleConstants {
- public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
-
- /**
- * 执行目标key
- */
- public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
-
- /**
- * 默认
- */
- public static final String MISFIRE_DEFAULT = "0";
-
- /**
- * 立即触发执行
- */
- public static final String MISFIRE_IGNORE_MISFIRES = "1";
-
- /**
- * 触发一次执行
- */
- public static final String MISFIRE_FIRE_AND_PROCEED = "2";
-
- /**
- * 不触发立即执行
- */
- public static final String MISFIRE_DO_NOTHING = "3";
-
- public enum Status {
- /**
- * 正常
- */
- NORMAL("0"),
- /**
- * 暂停
- */
- PAUSE("1");
-
- private String value;
-
- private Status(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/UserConstants.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/UserConstants.java
deleted file mode 100644
index 8a88288..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/constant/UserConstants.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.hchyun.common.constant;
-
-/**
- * 用户常量信息
- *
- * @author hchyun
- */
-public class UserConstants {
- /**
- * 平台内系统用户的唯一标志
- */
- public static final String SYS_USER = "SYS_USER";
-
- /**
- * 正常状态
- */
- public static final String NORMAL = "0";
-
- /**
- * 异常状态
- */
- public static final String EXCEPTION = "1";
-
- /**
- * 用户封禁状态
- */
- public static final String USER_DISABLE = "1";
-
- /**
- * 角色封禁状态
- */
- public static final String ROLE_DISABLE = "1";
-
- /**
- * 部门正常状态
- */
- public static final String DEPT_NORMAL = "0";
-
- /**
- * 部门停用状态
- */
- public static final String DEPT_DISABLE = "1";
-
- /**
- * 字典正常状态
- */
- public static final String DICT_NORMAL = "0";
-
- /**
- * 是否为系统默认(是)
- */
- public static final String YES = "Y";
-
- /**
- * 是否菜单外链(是)
- */
- public static final String YES_FRAME = "0";
-
- /**
- * 是否菜单外链(否)
- */
- public static final String NO_FRAME = "1";
-
- /**
- * 菜单类型(目录)
- */
- public static final String TYPE_DIR = "M";
-
- /**
- * 菜单类型(菜单)
- */
- public static final String TYPE_MENU = "C";
-
- /**
- * 菜单类型(按钮)
- */
- public static final String TYPE_BUTTON = "F";
-
- /**
- * Layout组件标识
- */
- public final static String LAYOUT = "Layout";
-
- /**
- * 校验返回结果码
- */
- public final static String UNIQUE = "0";
- public final static String NOT_UNIQUE = "1";
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/BaseController.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/BaseController.java
deleted file mode 100644
index 7f559cb..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/BaseController.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.hchyun.common.core.controller;
-
-import java.beans.PropertyEditorSupport;
-import java.util.Date;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.hchyun.common.constant.HttpStatus;
-import com.hchyun.common.core.entity.AjaxResult;
-import com.hchyun.common.core.page.PageDomain;
-import com.hchyun.common.core.page.TableDataInfo;
-import com.hchyun.common.core.page.TableSupport;
-import com.hchyun.common.utils.DateUtils;
-import com.hchyun.common.utils.StringUtils;
-import com.hchyun.common.utils.sql.SqlUtil;
-
-/**
- * web层通用数据处理
- *
- * @author hchyun
- */
-public class BaseController {
- protected final Logger log = LoggerFactory.getLogger(BaseController.class);
-
- /**
- * 将前台传递过来的日期格式的字符串,自动转化为Date类型
- */
- @InitBinder
- public void initBinder(WebDataBinder binder) {
- // Date 类型转换
- binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
- @Override
- public void setAsText(String text) {
- setValue(DateUtils.parseDate(text));
- }
- });
- }
-
- /**
- * 设置请求分页数据
- */
- protected void startPage() {
- PageDomain pageDomain = TableSupport.buildPageRequest();
- Integer pageNum = pageDomain.getPageNum();
- Integer pageSize = pageDomain.getPageSize();
- if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
- String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
- PageHelper.startPage(pageNum, pageSize, orderBy);
- }
- }
-
- /**
- * 响应请求分页数据
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- protected TableDataInfo getDataTable(List> list) {
- TableDataInfo rspData = new TableDataInfo();
- rspData.setCode(HttpStatus.SUCCESS);
- rspData.setMsg("查询成功");
- rspData.setRows(list);
- rspData.setTotal(new PageInfo(list).getTotal());
- return rspData;
- }
-
- /**
- * 响应返回结果
- *
- * @param rows 影响行数
- * @return 操作结果
- */
- protected AjaxResult toAjax(int rows) {
- return rows > 0 ? AjaxResult.success() : AjaxResult.error();
- }
-
- /**
- * 页面跳转
- */
- public String redirect(String url) {
- System.out.println(StringUtils.format("redirect:{}", url));
- return StringUtils.format("redirect:{}", url);
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/HcyBaseController.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/HcyBaseController.java
deleted file mode 100644
index a1dbc28..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/controller/HcyBaseController.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.hchyun.common.core.controller;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.hchyun.common.constant.HttpStatus;
-import com.hchyun.common.core.entity.AjaxResult;
-import com.hchyun.common.core.page.PageDomain;
-import com.hchyun.common.core.page.TableDataInfo;
-import com.hchyun.common.core.page.TableSupport;
-import com.hchyun.common.utils.DateUtils;
-import com.hchyun.common.utils.StringUtils;
-import com.hchyun.common.utils.sql.SqlUtil;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
-
-import java.beans.PropertyEditorSupport;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-public class HcyBaseController {
-
- /**
- * 将前台传递过来的日期格式的字符串,自动转化为Date类型
- */
- @InitBinder
- public void initBinder(WebDataBinder binder) {
- // Date 类型转换
- binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
- @Override
- public void setAsText(String text) {
- setValue(DateUtils.parseDate(text));
- }
- });
- }
-
- /**
- * 设置请求分页数据
- */
- protected void startPage() {
- PageDomain pageDomain = TableSupport.buildPageRequest();
- Integer pageNum = pageDomain.getPageNum();
- Integer pageSize = pageDomain.getPageSize();
- if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
- String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
- PageHelper.startPage(pageNum, pageSize, orderBy);
- }
- }
-
- /**
- * 设置请求分页数据
- */
- public void startPage(Map map) {
- PageDomain pageDomain = TableSupport.buildPageRequest();
- Integer pageNum = (Integer) map.get("pageNum");
- Integer pageSize = (Integer) map.get("pageSize");
- if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
- String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
- PageHelper.startPage(pageNum, pageSize, orderBy);
- }
- }
-
- /**
- * 响应请求分页数据
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- protected TableDataInfo getDataTable(List> list) {
- TableDataInfo rspData = new TableDataInfo();
- rspData.setCode(HttpStatus.SUCCESS);
- rspData.setMsg("查询成功");
- rspData.setRows(list);
- rspData.setTotal(new PageInfo(list).getTotal());
- return rspData;
- }
-
-
-// /**
-// * 响应返回结果
-// *
-// * @param rows 影响行数
-// * @return 操作结果
-// */
-// protected AjaxResult toAjax(int rows)
-// {
-// return rows > 0 ? AjaxResult.success() : AjaxResult.error();
-// }
-
- /**
- * 页面跳转
- */
- public String redirect(String url) {
- return StringUtils.format("redirect:{}", url);
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/AjaxResult.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/AjaxResult.java
deleted file mode 100644
index d69998e..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/AjaxResult.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package com.hchyun.common.core.entity;
-
-import java.util.HashMap;
-
-import com.hchyun.common.constant.HttpStatus;
-import com.hchyun.common.utils.StringUtils;
-
-/**
- * 操作消息提醒
- *
- * @author hchyun
- */
-public class AjaxResult extends HashMap {
-
-
- /**
- * 状态码
- */
- public static final String CODE_TAG = "code";
-
- /**
- * 返回内容
- */
- public static final String MSG_TAG = "msg";
-
- /**
- * 数据对象
- */
- public static final String DATA_TAG = "data";
-
- /**
- * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
- */
- public AjaxResult() {
- }
-
- /**
- * 初始化一个新创建的 AjaxResult 对象
- *
- * @param code 状态码
- * @param msg 返回内容
- */
- public AjaxResult(int code, String msg) {
- super.put(CODE_TAG, code);
- super.put(MSG_TAG, msg);
- }
-
- /**
- * 初始化一个新创建的 AjaxResult 对象
- *
- * @param code 状态码
- * @param msg 返回内容
- * @param data 数据对象
- */
- public AjaxResult(int code, String msg, Object data) {
- super.put(CODE_TAG, code);
- super.put(MSG_TAG, msg);
- if (StringUtils.isNotNull(data)) {
- super.put(DATA_TAG, data);
- }
- }
-
- /**
- * 返回成功消息
- *
- * @return 成功消息
- */
- public static AjaxResult success() {
- return AjaxResult.success("操作成功");
- }
-
- /**
- * 返回成功数据
- *
- * @return 成功消息
- */
- public static AjaxResult success(Object data) {
- return AjaxResult.success("操作成功", data);
- }
-
- /**
- * 返回成功消息
- *
- * @param msg 返回内容
- * @return 成功消息
- */
- public static AjaxResult success(String msg) {
- return AjaxResult.success(msg, null);
- }
-
- /**
- * 返回成功消息
- *
- * @param msg 返回内容
- * @param data 数据对象
- * @return 成功消息
- */
- public static AjaxResult success(String msg, Object data) {
- return new AjaxResult(HttpStatus.SUCCESS, msg, data);
- }
-
- /**
- * 返回错误消息
- *
- * @return
- */
- public static AjaxResult error() {
- return AjaxResult.error("操作失败");
- }
-
- /**
- * 返回错误消息
- *
- * @param msg 返回内容
- * @return 警告消息
- */
- public static AjaxResult error(String msg) {
- return AjaxResult.error(msg, null);
- }
-
- /**
- * 返回错误消息
- *
- * @param msg 返回内容
- * @param data 数据对象
- * @return 警告消息
- */
- public static AjaxResult error(String msg, Object data) {
- return new AjaxResult(HttpStatus.ERROR, msg, data);
- }
-
- /**
- * 返回错误消息
- *
- * @param code 状态码
- * @param msg 返回内容
- * @return 警告消息
- */
- public static AjaxResult error(int code, String msg) {
- return new AjaxResult(code, msg, null);
- }
-
- /**
- * 返回提示信息
- *
- * @param msg 返回内容
- * @return 提示消息
- */
- public static AjaxResult info(String msg) {
- return new AjaxResult(HttpStatus.NO_DATA, msg, null);
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java
deleted file mode 100644
index 312ec43..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.hchyun.common.core.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.hchyun.common.annotation.Excel;
-
-/**
- * Entity基类
- *
- * @author hchyun
- */
-public class BaseEntity implements Serializable {
-
-
- /**
- * 搜索值
- */
- private String searchValue;
-
- /**
- * 创建者
- */
- private Long createBy;
-
- /**
- * 创建时间
- */
- @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = Integer.MAX_VALUE - 1)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date createTime;
-
- /**
- * 更新者
- */
- private Long updateBy;
-
- /**
- * 更新时间
- */
- @Excel(name = "更新时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = Integer.MAX_VALUE)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
-
- /**
- * 备注
- */
- private String remark;
-
- /**
- * 开始时间
- */
- @JsonIgnore
- private String beginTime;
-
- /**
- * 结束时间
- */
- @JsonIgnore
- private String endTime;
-
- /**
- * 请求参数
- */
- private Map params;
-
- public String getSearchValue() {
- return searchValue;
- }
-
- public void setSearchValue(String searchValue) {
- this.searchValue = searchValue;
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public Long getCreateBy() {
- return createBy;
- }
-
- public void setCreateBy(Long createBy) {
- this.createBy = createBy;
- }
-
- public Long getUpdateBy() {
- return updateBy;
- }
-
- public void setUpdateBy(Long updateBy) {
- this.updateBy = updateBy;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- public String getBeginTime() {
- return beginTime;
- }
-
- public void setBeginTime(String beginTime) {
- this.beginTime = beginTime;
- }
-
- public String getEndTime() {
- return endTime;
- }
-
- public void setEndTime(String endTime) {
- this.endTime = endTime;
- }
-
- public Map getParams() {
- if (params == null) {
- params = new HashMap<>();
- }
- return params;
- }
-
- public void setParams(Map params) {
- this.params = params;
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeEntity.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeEntity.java
deleted file mode 100644
index e215a1c..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeEntity.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.hchyun.common.core.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Tree基类
- *
- * @author hchyun
- */
-public class TreeEntity extends BaseEntity {
-
-
- /**
- * 父菜单名称
- */
- private String parentName;
-
- /**
- * 父菜单ID
- */
- private Long parentId;
-
- /**
- * 显示顺序
- */
- private Integer orderNum;
-
- /**
- * 祖级列表
- */
- private String ancestors;
-
- /**
- * 子部门
- */
- private List> children = new ArrayList<>();
-
- public String getParentName() {
- return parentName;
- }
-
- public void setParentName(String parentName) {
- this.parentName = parentName;
- }
-
- public Long getParentId() {
- return parentId;
- }
-
- public void setParentId(Long parentId) {
- this.parentId = parentId;
- }
-
- public Integer getOrderNum() {
- return orderNum;
- }
-
- public void setOrderNum(Integer orderNum) {
- this.orderNum = orderNum;
- }
-
- public String getAncestors() {
- return ancestors;
- }
-
- public void setAncestors(String ancestors) {
- this.ancestors = ancestors;
- }
-
- public List> getChildren() {
- return children;
- }
-
- public void setChildren(List> children) {
- this.children = children;
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeSelect.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeSelect.java
deleted file mode 100644
index 3771344..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/TreeSelect.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.hchyun.common.core.entity;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.hchyun.common.core.entity.entity.Dept;
-import com.hchyun.common.core.entity.entity.Menu;
-
-/**
- * Treeselect树结构实体类
- *
- * @author hchyun
- */
-public class TreeSelect implements Serializable {
-
-
- /**
- * 节点ID
- */
- private Long id;
-
- /**
- * 节点名称
- */
- private String label;
-
- /**
- * 子节点
- */
- @JsonInclude(JsonInclude.Include.NON_EMPTY)
- private List children;
-
- public TreeSelect() {
-
- }
-
- public TreeSelect(Dept dept) {
- this.id = dept.getDeptId();
- this.label = dept.getDeptName();
- this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
- }
-
- public TreeSelect(Menu menu) {
- this.id = menu.getMenuId();
- this.label = menu.getMenuName();
- this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public List getChildren() {
- return children;
- }
-
- public void setChildren(List children) {
- this.children = children;
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Dept.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Dept.java
deleted file mode 100644
index d5c1576..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Dept.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package com.hchyun.common.core.entity.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.constraints.Email;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.hchyun.common.core.entity.BaseEntity;
-
-/**
- * 部门表 sys_dept
- *
- * @author hchyun
- */
-public class Dept extends BaseEntity {
-
-
- /**
- * 部门ID
- */
- private Long deptId;
-
- /**
- * 父部门ID
- */
- private Long parentId;
-
- /**
- * 祖级列表
- */
- private String ancestors;
-
- /**
- * 部门名称
- */
- private String deptName;
-
- /**
- * 显示顺序
- */
- private String orderNum;
-
- /**
- * 负责人
- */
- private String leader;
-
- /**
- * 联系电话
- */
- private String phone;
-
- /**
- * 邮箱
- */
- private String email;
-
- /**
- * 部门状态:0正常,1停用
- */
- private String status;
-
- /**
- * 删除标志(0代表存在 2代表删除)
- */
- private String delFlag;
-
- /**
- * 父部门名称
- */
- private String parentName;
-
- /**
- * 子部门
- */
- private List children = new ArrayList();
-
- public Long getDeptId() {
- return deptId;
- }
-
- public void setDeptId(Long deptId) {
- this.deptId = deptId;
- }
-
- public Long getParentId() {
- return parentId;
- }
-
- public void setParentId(Long parentId) {
- this.parentId = parentId;
- }
-
- public String getAncestors() {
- return ancestors;
- }
-
- public void setAncestors(String ancestors) {
- this.ancestors = ancestors;
- }
-
- @NotBlank(message = "部门名称不能为空")
- @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
- public String getDeptName() {
- return deptName;
- }
-
- public void setDeptName(String deptName) {
- this.deptName = deptName;
- }
-
- @NotBlank(message = "显示顺序不能为空")
- public String getOrderNum() {
- return orderNum;
- }
-
- public void setOrderNum(String orderNum) {
- this.orderNum = orderNum;
- }
-
- public String getLeader() {
- return leader;
- }
-
- public void setLeader(String leader) {
- this.leader = leader;
- }
-
- @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
- public String getPhone() {
- return phone;
- }
-
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
- @Email(message = "邮箱格式不正确")
- @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getDelFlag() {
- return delFlag;
- }
-
- public void setDelFlag(String delFlag) {
- this.delFlag = delFlag;
- }
-
- public String getParentName() {
- return parentName;
- }
-
- public void setParentName(String parentName) {
- this.parentName = parentName;
- }
-
- public List getChildren() {
- return children;
- }
-
- public void setChildren(List children) {
- this.children = children;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("deptId", getDeptId())
- .append("parentId", getParentId())
- .append("ancestors", getAncestors())
- .append("deptName", getDeptName())
- .append("orderNum", getOrderNum())
- .append("leader", getLeader())
- .append("phone", getPhone())
- .append("email", getEmail())
- .append("status", getStatus())
- .append("delFlag", getDelFlag())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .toString();
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictData.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictData.java
deleted file mode 100644
index 6432510..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictData.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.hchyun.common.core.entity.entity;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.hchyun.common.annotation.Excel;
-import com.hchyun.common.annotation.Excel.ColumnType;
-import com.hchyun.common.constant.UserConstants;
-import com.hchyun.common.core.entity.BaseEntity;
-
-/**
- * 字典数据表 sys_dict_data
- *
- * @author hchyun
- */
-public class DictData extends BaseEntity {
-
-
- /**
- * 字典编码
- */
- @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
- private Long dictCode;
-
- /**
- * 字典排序
- */
- @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
- private Long dictSort;
-
- /**
- * 字典标签
- */
- @Excel(name = "字典标签")
- private String dictLabel;
-
- /**
- * 字典键值
- */
- @Excel(name = "字典键值")
- private String dictValue;
-
- /**
- * 字典类型
- */
- @Excel(name = "字典类型")
- private String dictType;
-
- /**
- * 样式属性(其他样式扩展)
- */
- private String cssClass;
-
- /**
- * 表格字典样式
- */
- private String listClass;
-
- /**
- * 是否默认(Y是 N否)
- */
- @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
- private String isDefault;
-
- /**
- * 状态(0正常 1停用)
- */
- @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
- private String status;
-
- public Long getDictCode() {
- return dictCode;
- }
-
- public void setDictCode(Long dictCode) {
- this.dictCode = dictCode;
- }
-
- public Long getDictSort() {
- return dictSort;
- }
-
- public void setDictSort(Long dictSort) {
- this.dictSort = dictSort;
- }
-
- @NotBlank(message = "字典标签不能为空")
- @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
- public String getDictLabel() {
- return dictLabel;
- }
-
- public void setDictLabel(String dictLabel) {
- this.dictLabel = dictLabel;
- }
-
- @NotBlank(message = "字典键值不能为空")
- @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
- public String getDictValue() {
- return dictValue;
- }
-
- public void setDictValue(String dictValue) {
- this.dictValue = dictValue;
- }
-
- @NotBlank(message = "字典类型不能为空")
- @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
- public String getDictType() {
- return dictType;
- }
-
- public void setDictType(String dictType) {
- this.dictType = dictType;
- }
-
- @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
- public String getCssClass() {
- return cssClass;
- }
-
- public void setCssClass(String cssClass) {
- this.cssClass = cssClass;
- }
-
- public String getListClass() {
- return listClass;
- }
-
- public void setListClass(String listClass) {
- this.listClass = listClass;
- }
-
- public boolean getDefault() {
- return UserConstants.YES.equals(this.isDefault) ? true : false;
- }
-
- public String getIsDefault() {
- return isDefault;
- }
-
- public void setIsDefault(String isDefault) {
- this.isDefault = isDefault;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("dictCode", getDictCode())
- .append("dictSort", getDictSort())
- .append("dictLabel", getDictLabel())
- .append("dictValue", getDictValue())
- .append("dictType", getDictType())
- .append("cssClass", getCssClass())
- .append("listClass", getListClass())
- .append("isDefault", getIsDefault())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictType.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictType.java
deleted file mode 100644
index 192bdda..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/DictType.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.hchyun.common.core.entity.entity;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.hchyun.common.annotation.Excel;
-import com.hchyun.common.annotation.Excel.ColumnType;
-import com.hchyun.common.core.entity.BaseEntity;
-
-/**
- * 字典类型表 sys_dict_type
- *
- * @author hchyun
- */
-public class DictType extends BaseEntity {
-
-
- /**
- * 字典主键
- */
- @Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
- private Long dictId;
-
- /**
- * 字典名称
- */
- @Excel(name = "字典名称")
- private String dictName;
-
- /**
- * 字典类型
- */
- @Excel(name = "字典类型")
- private String dictType;
-
- /**
- * 状态(0正常 1停用)
- */
- @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
- private String status;
-
- public Long getDictId() {
- return dictId;
- }
-
- public void setDictId(Long dictId) {
- this.dictId = dictId;
- }
-
- @NotBlank(message = "字典名称不能为空")
- @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
- public String getDictName() {
- return dictName;
- }
-
- public void setDictName(String dictName) {
- this.dictName = dictName;
- }
-
- @NotBlank(message = "字典类型不能为空")
- @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
- public String getDictType() {
- return dictType;
- }
-
- public void setDictType(String dictType) {
- this.dictType = dictType;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("dictId", getDictId())
- .append("dictName", getDictName())
- .append("dictType", getDictType())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
-}
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Menu.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Menu.java
deleted file mode 100644
index 628803a..0000000
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/entity/Menu.java
+++ /dev/null
@@ -1,263 +0,0 @@
-package com.hchyun.common.core.entity.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.hchyun.common.core.entity.BaseEntity;
-
-/**
- * 菜单权限表 sys_menu
- *
- * @author hchyun
- */
-public class Menu extends BaseEntity {
-
-
- /**
- * 菜单ID
- */
- private Long menuId;
-
- /**
- * 菜单名称
- */
- private String menuName;
-
- /**
- * 父菜单名称
- */
- private String parentName;
-
- /**
- * 父菜单ID
- */
- private Long parentId;
-
- /**
- * 显示顺序
- */
- private String orderNum;
-
- /**
- * 路由地址
- */
- private String path;
-
- /**
- * 组件路径
- */
- private String component;
-
- /**
- * 是否为外链(0是 1否)
- */
- private String isFrame;
-
- /**
- * 是否缓存(0缓存 1不缓存)
- */
- private String isCache;
-
- /**
- * 类型(M目录 C菜单 F按钮)
- */
- private String menuType;
-
- /**
- * 显示状态(0显示 1隐藏)
- */
- private String visible;
-
- /**
- * 菜单状态(0显示 1隐藏)
- */
- private String status;
-
- /**
- * 权限字符串
- */
- private String perms;
-
- /**
- * 菜单图标
- */
- private String icon;
-
- /**
- * 子菜单
- */
- private List