From a700a45b2babef5a821c9fa508d546752dbde9c7 Mon Sep 17 00:00:00 2001
From: chen <1251790704@qq.com>
Date: Fri, 29 Jul 2022 15:15:55 +0800
Subject: [PATCH] =?UTF-8?q?=E7=B2=92=E5=AD=90=E7=A0=94=E7=A9=B6=E9=99=A2?=
=?UTF-8?q?=E7=BD=91=E7=AB=99=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 45 +++
Dockerfile | 13 +
LICENSE | 73 +++++
README.md | 78 +++++
pom.xml | 225 +++++++++++++
.../java/com/huoran/iasf/IASFApplication.java | 33 ++
.../iasf/common/aop/annotation/DataScope.java | 16 +
.../common/aop/annotation/LogAnnotation.java | 25 ++
.../common/aop/aspect/DataScopeAspect.java | 135 ++++++++
.../iasf/common/aop/aspect/SysLogAspect.java | 118 +++++++
.../common/config/FileUploadProperties.java | 50 +++
.../config/MetaObjectHandlerConfig.java | 85 +++++
.../iasf/common/config/MyBatisPlusConfig.java | 23 ++
.../common/config/SwaggerConfiguration.java | 48 +++
.../iasf/common/config/WebMvcConfigurer.java | 140 ++++++++
.../common/exception/BusinessException.java | 52 +++
.../exception/code/BaseResponseCode.java | 59 ++++
.../exception/code/ResponseCodeInterface.java | 24 ++
.../handler/RestExceptionHandler.java | 83 +++++
.../huoran/iasf/common/filter/AuthFilter.java | 87 +++++
.../huoran/iasf/common/job/task/TestTask.java | 22 ++
.../iasf/common/job/utils/ScheduleJob.java | 111 +++++++
.../iasf/common/job/utils/ScheduleUtils.java | 150 +++++++++
.../shiro/CustomAccessControlFilter.java | 116 +++++++
.../shiro/CustomHashedCredentialsMatcher.java | 38 +++
.../huoran/iasf/common/shiro/CustomRealm.java | 88 ++++++
.../huoran/iasf/common/shiro/ShiroConfig.java | 115 +++++++
.../huoran/iasf/common/utils/Constant.java | 47 +++
.../huoran/iasf/common/utils/DateUtils.java | 30 ++
.../huoran/iasf/common/utils/GenUtils.java | 238 ++++++++++++++
.../iasf/common/utils/HttpContextUtils.java | 32 ++
.../com/huoran/iasf/common/utils/IPUtils.java | 73 +++++
.../huoran/iasf/common/utils/OkHttpUtils.java | 299 ++++++++++++++++++
.../iasf/common/utils/PasswordEncoder.java | 117 +++++++
.../iasf/common/utils/PasswordUtils.java | 47 +++
.../java/com/huoran/iasf/common/utils/R.java | 113 +++++++
.../iasf/common/utils/SpringContextUtils.java | 33 ++
.../iasf/common/utils/ValidatorUtils.java | 53 ++++
.../iasf/controller/CaptchaController.java | 41 +++
.../iasf/controller/DeptController.java | 93 ++++++
.../iasf/controller/HomeController.java | 40 +++
.../iasf/controller/PermissionController.java | 148 +++++++++
.../iasf/controller/RoleController.java | 132 ++++++++
.../controller/RolePermissionController.java | 41 +++
.../iasf/controller/SysContentController.java | 79 +++++
.../iasf/controller/SysDictController.java | 96 ++++++
.../controller/SysDictDetailController.java | 90 ++++++
.../iasf/controller/SysFilesController.java | 62 ++++
.../controller/SysGeneratorController.java | 57 ++++
.../iasf/controller/SysJobController.java | 178 +++++++++++
.../iasf/controller/SysJobLogController.java | 55 ++++
.../iasf/controller/SysLogController.java | 62 ++++
.../iasf/controller/UserController.java | 194 ++++++++++++
.../iasf/controller/UserRoleController.java | 38 +++
.../iasf/controller/api/TestController.java | 49 +++
.../com/huoran/iasf/entity/BaseEntity.java | 42 +++
.../com/huoran/iasf/entity/ColumnEntity.java | 104 ++++++
.../huoran/iasf/entity/SysContentEntity.java | 78 +++++
.../java/com/huoran/iasf/entity/SysDept.java | 54 ++++
.../iasf/entity/SysDictDetailEntity.java | 68 ++++
.../com/huoran/iasf/entity/SysDictEntity.java | 51 +++
.../huoran/iasf/entity/SysFilesEntity.java | 51 +++
.../com/huoran/iasf/entity/SysGenerator.java | 30 ++
.../com/huoran/iasf/entity/SysJobEntity.java | 72 +++++
.../huoran/iasf/entity/SysJobLogEntity.java | 75 +++++
.../java/com/huoran/iasf/entity/SysLog.java | 48 +++
.../com/huoran/iasf/entity/SysPermission.java | 63 ++++
.../java/com/huoran/iasf/entity/SysRole.java | 66 ++++
.../huoran/iasf/entity/SysRoleDeptEntity.java | 49 +++
.../huoran/iasf/entity/SysRolePermission.java | 30 ++
.../java/com/huoran/iasf/entity/SysUser.java | 88 ++++++
.../com/huoran/iasf/entity/SysUserRole.java | 31 ++
.../com/huoran/iasf/entity/TableEntity.java | 84 +++++
.../huoran/iasf/mapper/GeneratorMapper.java | 26 ++
.../huoran/iasf/mapper/SysContentMapper.java | 15 +
.../com/huoran/iasf/mapper/SysDeptMapper.java | 14 +
.../iasf/mapper/SysDictDetailMapper.java | 15 +
.../com/huoran/iasf/mapper/SysDictMapper.java | 15 +
.../huoran/iasf/mapper/SysFilesMapper.java | 15 +
.../huoran/iasf/mapper/SysJobLogMapper.java | 15 +
.../com/huoran/iasf/mapper/SysJobMapper.java | 15 +
.../com/huoran/iasf/mapper/SysLogMapper.java | 14 +
.../iasf/mapper/SysPermissionMapper.java | 15 +
.../huoran/iasf/mapper/SysRoleDeptMapper.java | 15 +
.../com/huoran/iasf/mapper/SysRoleMapper.java | 15 +
.../iasf/mapper/SysRolePermissionMapper.java | 15 +
.../com/huoran/iasf/mapper/SysUserMapper.java | 14 +
.../huoran/iasf/mapper/SysUserRoleMapper.java | 15 +
.../com/huoran/iasf/service/DeptService.java | 47 +++
.../com/huoran/iasf/service/HomeService.java | 21 ++
.../iasf/service/HttpApiSessionService.java | 97 ++++++
.../iasf/service/HttpSessionService.java | 265 ++++++++++++++++
.../iasf/service/ISysGeneratorService.java | 32 ++
.../com/huoran/iasf/service/LogService.java | 14 +
.../iasf/service/PermissionService.java | 87 +++++
.../com/huoran/iasf/service/RedisService.java | 74 +++++
.../iasf/service/RolePermissionService.java | 22 ++
.../com/huoran/iasf/service/RoleService.java | 61 ++++
.../iasf/service/SysContentService.java | 16 +
.../iasf/service/SysDictDetailService.java | 26 ++
.../huoran/iasf/service/SysDictService.java | 16 +
.../huoran/iasf/service/SysFilesService.java | 23 ++
.../huoran/iasf/service/SysJobLogService.java | 16 +
.../huoran/iasf/service/SysJobService.java | 67 ++++
.../iasf/service/SysRoleDeptService.java | 16 +
.../huoran/iasf/service/UserRoleService.java | 40 +++
.../com/huoran/iasf/service/UserService.java | 76 +++++
.../iasf/service/impl/DeptServiceImpl.java | 212 +++++++++++++
.../iasf/service/impl/HomeServiceImpl.java | 58 ++++
.../iasf/service/impl/LogServiceImpl.java | 18 ++
.../service/impl/PermissionServiceImpl.java | 269 ++++++++++++++++
.../impl/RolePermissionServiceImpl.java | 36 +++
.../iasf/service/impl/RoleServiceImpl.java | 166 ++++++++++
.../service/impl/SysContentServiceImpl.java | 20 ++
.../impl/SysDictDetailServiceImpl.java | 51 +++
.../iasf/service/impl/SysDictServiceImpl.java | 51 +++
.../service/impl/SysFilesServiceImpl.java | 96 ++++++
.../service/impl/SysGeneratorServiceImpl.java | 65 ++++
.../service/impl/SysJobLogServiceImpl.java | 20 ++
.../iasf/service/impl/SysJobServiceImpl.java | 115 +++++++
.../service/impl/SysRoleDeptServiceImpl.java | 14 +
.../service/impl/UserRoleServiceImpl.java | 58 ++++
.../iasf/service/impl/UserServiceImpl.java | 249 +++++++++++++++
.../vo/req/RolePermissionOperationReqVO.java | 25 ++
.../iasf/vo/req/UserRoleOperationReqVO.java | 25 ++
.../huoran/iasf/vo/resp/DeptRespNodeVO.java | 53 ++++
.../com/huoran/iasf/vo/resp/HomeRespVO.java | 22 ++
.../com/huoran/iasf/vo/resp/LoginRespVO.java | 27 ++
.../iasf/vo/resp/PermissionRespNode.java | 53 ++++
.../huoran/iasf/vo/resp/UserInfoRespVO.java | 30 ++
.../iasf/vo/resp/UserOwnRoleRespVO.java | 22 ++
src/main/resources/application-dev.yml | 30 ++
src/main/resources/application-prod.yml | 33 ++
src/main/resources/application-test.yml | 30 ++
src/main/resources/application.yml | 45 +++
src/main/resources/generator.properties | 61 ++++
src/main/resources/logback-spring.xml | 60 ++++
.../project/CompanyFrameApplicationTests.java | 16 +
138 files changed, 8952 insertions(+)
create mode 100644 .gitignore
create mode 100644 Dockerfile
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 pom.xml
create mode 100644 src/main/java/com/huoran/iasf/IASFApplication.java
create mode 100644 src/main/java/com/huoran/iasf/common/aop/annotation/DataScope.java
create mode 100644 src/main/java/com/huoran/iasf/common/aop/annotation/LogAnnotation.java
create mode 100644 src/main/java/com/huoran/iasf/common/aop/aspect/DataScopeAspect.java
create mode 100644 src/main/java/com/huoran/iasf/common/aop/aspect/SysLogAspect.java
create mode 100644 src/main/java/com/huoran/iasf/common/config/FileUploadProperties.java
create mode 100644 src/main/java/com/huoran/iasf/common/config/MetaObjectHandlerConfig.java
create mode 100644 src/main/java/com/huoran/iasf/common/config/MyBatisPlusConfig.java
create mode 100644 src/main/java/com/huoran/iasf/common/config/SwaggerConfiguration.java
create mode 100644 src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java
create mode 100644 src/main/java/com/huoran/iasf/common/exception/BusinessException.java
create mode 100644 src/main/java/com/huoran/iasf/common/exception/code/BaseResponseCode.java
create mode 100644 src/main/java/com/huoran/iasf/common/exception/code/ResponseCodeInterface.java
create mode 100644 src/main/java/com/huoran/iasf/common/exception/handler/RestExceptionHandler.java
create mode 100644 src/main/java/com/huoran/iasf/common/filter/AuthFilter.java
create mode 100644 src/main/java/com/huoran/iasf/common/job/task/TestTask.java
create mode 100644 src/main/java/com/huoran/iasf/common/job/utils/ScheduleJob.java
create mode 100644 src/main/java/com/huoran/iasf/common/job/utils/ScheduleUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/shiro/CustomAccessControlFilter.java
create mode 100644 src/main/java/com/huoran/iasf/common/shiro/CustomHashedCredentialsMatcher.java
create mode 100644 src/main/java/com/huoran/iasf/common/shiro/CustomRealm.java
create mode 100644 src/main/java/com/huoran/iasf/common/shiro/ShiroConfig.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/Constant.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/DateUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/GenUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/HttpContextUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/IPUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/OkHttpUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/PasswordEncoder.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/PasswordUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/R.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/SpringContextUtils.java
create mode 100644 src/main/java/com/huoran/iasf/common/utils/ValidatorUtils.java
create mode 100644 src/main/java/com/huoran/iasf/controller/CaptchaController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/DeptController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/HomeController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/PermissionController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/RoleController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/RolePermissionController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysContentController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysDictController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysDictDetailController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysFilesController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysGeneratorController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysJobController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysJobLogController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/SysLogController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/UserController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/UserRoleController.java
create mode 100644 src/main/java/com/huoran/iasf/controller/api/TestController.java
create mode 100644 src/main/java/com/huoran/iasf/entity/BaseEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/ColumnEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysContentEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysDept.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysDictDetailEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysDictEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysFilesEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysGenerator.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysJobEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysJobLogEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysLog.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysPermission.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysRole.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysRoleDeptEntity.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysRolePermission.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysUser.java
create mode 100644 src/main/java/com/huoran/iasf/entity/SysUserRole.java
create mode 100644 src/main/java/com/huoran/iasf/entity/TableEntity.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/GeneratorMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysContentMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysDeptMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysDictDetailMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysDictMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysFilesMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysJobLogMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysJobMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysLogMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysPermissionMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysRoleDeptMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysRoleMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysRolePermissionMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysUserMapper.java
create mode 100644 src/main/java/com/huoran/iasf/mapper/SysUserRoleMapper.java
create mode 100644 src/main/java/com/huoran/iasf/service/DeptService.java
create mode 100644 src/main/java/com/huoran/iasf/service/HomeService.java
create mode 100644 src/main/java/com/huoran/iasf/service/HttpApiSessionService.java
create mode 100644 src/main/java/com/huoran/iasf/service/HttpSessionService.java
create mode 100644 src/main/java/com/huoran/iasf/service/ISysGeneratorService.java
create mode 100644 src/main/java/com/huoran/iasf/service/LogService.java
create mode 100644 src/main/java/com/huoran/iasf/service/PermissionService.java
create mode 100644 src/main/java/com/huoran/iasf/service/RedisService.java
create mode 100644 src/main/java/com/huoran/iasf/service/RolePermissionService.java
create mode 100644 src/main/java/com/huoran/iasf/service/RoleService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysContentService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysDictDetailService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysDictService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysFilesService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysJobLogService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysJobService.java
create mode 100644 src/main/java/com/huoran/iasf/service/SysRoleDeptService.java
create mode 100644 src/main/java/com/huoran/iasf/service/UserRoleService.java
create mode 100644 src/main/java/com/huoran/iasf/service/UserService.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/DeptServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/HomeServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/LogServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/RolePermissionServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/RoleServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysDictDetailServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysDictServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysGeneratorServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysJobLogServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysJobServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysRoleDeptServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/UserRoleServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/service/impl/UserServiceImpl.java
create mode 100644 src/main/java/com/huoran/iasf/vo/req/RolePermissionOperationReqVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/req/UserRoleOperationReqVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/DeptRespNodeVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/HomeRespVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/LoginRespVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/PermissionRespNode.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/UserInfoRespVO.java
create mode 100644 src/main/java/com/huoran/iasf/vo/resp/UserOwnRoleRespVO.java
create mode 100644 src/main/resources/application-dev.yml
create mode 100644 src/main/resources/application-prod.yml
create mode 100644 src/main/resources/application-test.yml
create mode 100644 src/main/resources/application.yml
create mode 100644 src/main/resources/generator.properties
create mode 100644 src/main/resources/logback-spring.xml
create mode 100644 src/test/java/com/company/project/CompanyFrameApplicationTests.java
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a7e4258
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,45 @@
+# ---> Java
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+replay_pid*
+
+# ---> Maven
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+# https://github.com/takari/maven-wrapper#usage-without-binary-jar
+.mvn/wrapper/maven-wrapper.jar
+
+# Eclipse m2e generated files
+# Eclipse Core
+.project
+# JDT-specific (Eclipse Java Development Tools)
+.classpath
+
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f4c7719
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+# 基础镜像
+FROM openjdk:8-jre
+# author
+MAINTAINER cheney
+# 复制jar文件到路径
+ADD manager.jar manager.jar
+# 时间
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
+RUN echo 'Asia/Shanghai' >/etc/timezone
+# 启动服务
+ENTRYPOINT ["java","-jar","/manager.jar"]
+# 暴露端口
+EXPOSE 8080
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..137069b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,73 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ee5b008
--- /dev/null
+++ b/README.md
@@ -0,0 +1,78 @@
+<<<<<<< HEAD
+# IASF
+
+粒子研究院网站
+=======
+#IASF 粒子研究院网站
+
+## 代码结构
+```
+├─main
+│ ├─java
+│ │ └─com
+│ │ └─company
+│ │ └─project
+│ │ ├─CompanyProjectApplication.java 项目启动类
+│ │ ├─common 公共资源,如注解、切面、定时、全局异常处理、shiro集成、通用工具类等
+│ │ ├─controller Controler层
+│ │ ├─entity 实体类
+│ │ ├─mapper DAO层
+│ │ ├─service Service层
+│ │ │ └─impl Service层实现
+│ └─resources
+│ ├── application-dev.yml 开发环境配置文件
+│ ├── application-test.yml 测试环境配置文件
+│ ├── application-prod.yml 生产环境配置文件
+│ ├── application.yml 通用配置文件
+│ ├── logback-spring.xml 日志配置文件
+│ └──mapper Mybatis XML文件
+└─test
+ └─java
+ └─com
+ └─company
+ └─project
+ ├── CompanyFrameApplicationTests.java 单元测试
+```
+
+## 开发建议
+- Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建VO,否则需在扩展的成员变量上加@TableField(exist = false)
+- 建议业务失败直接使用throw new BusinessException("ErrorMessage")抛出,由统一异常处理器来封装业务失败的响应结果,会直接被封装为{"code":500002,"message":"ErrorMessage"}返回,尽情抛出;
+- token支持header跟query传参形式,如:
+ - ajax中设置header:```beforeSend: function(request) {request.setRequestHeader("authorization", "有效的token");}```
+ - query:```?authorization=有效的token ```
+- 数据库基础字段:id(bigint)、remark(varchar)、unable_flag(tinyint)、deleted(tinyint)、create_id(bigint)、update_id(bigint)、create_time(datetime)、update_time(datetime)
+
+## 使用说明
+- 使用IDE导入本项目,IDE需要安装lombok插件
+- 下载redis 启动redis
+- 创建数据库, 导入***.sql
+- 配置application-dev.yml中的redis以及数据库连接
+- 运行项目
+ 1. 直接运行CompanyProjectApplication.java
+ 2. 项目根目录下执行mvn -X clean package -Dmaven.test.skip=true编译打包,然后执行java -jar manager.jar
+- 登录地址 http://localhost:8080/index/login 用户名密码:admin/123456
+- 代码生成使用
+ 1. 逻辑删除字段,请统一用deleted字段: 1未删 0已删; 主键请统一格式: `id` varchar(50) 类型; 列名请勿使用数据库关键字
+ 2. application.yml中配置: 使用代码生成模块时 指定要生成的表存在于哪种数据库。project.database=mysql
+ 3. 点击[代码生成]菜单,生成一个或多个表的代码,下载到本地
+ 4. 解压下载的代码,直接复制main文件夹到本地项目的src目录下
+ 5. 数据库执行sql,生成菜单
+ 6. 点击[角色管理]菜单,修改角色所绑定的菜单的权限,刷新页面查看
+
+- 数据权限配置及使用 示例:文章管理列表
+ 1. 需要数据权限所控制的表(如sys_content), 需要有创建人字段
+ 2. 配置角色的数据范围(本部门,其他部门等), 以及绑定的部门
+ 3. 在列表加个注解@DataScope(用来查询当前等路人的多个角色(并集), 根据角色数据范围, 获取绑定的部门id, 查关联的用户id)
+ 4. 在查某个模块的list或page的时候,手动queryWrapper.in(createId, 关联的用户id)
+
+
+## 技术文档
+* 核心框架:[Spring Boot](https://spring.io/projects/spring-boot)
+* 持久层框架:[MyBatis-Plus](https://mybatis.plus)
+* 分页:[Page](https://mybatis.plus/guide/page.html)
+* 数据库连接池:[Alibaba Druid](https://github.com/alibaba/druid/)
+* 安全框架:[Apache Shiro](http://shiro.apache.org/)
+* 缓存框架:[Redis](https://redis.io/)
+* 接口文档:[Knife4j](https://doc.xiaominfo.com/)
+* 阿里巴巴Java开发手册[最新版下载](https://github.com/alibaba/p3c)
+>>>>>>> 粒子研究院网站提交
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..c8d6ba3
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,225 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.6.RELEASE
+
+
+
+ com.huoran
+ iasf
+ 1.0.0
+ IASF
+ jar
+ 粒子研究院网站
+
+
+ 1.8
+ 3.4.0
+ 2.5.5
+ 2.6
+ 2.5
+ 1.10
+ 1.7
+ 2.3.2
+ 1.4.0
+ 1.1.10
+ 1.2.74
+ 2.0.2
+ 1.6.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ ${druid.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ org.apache.shiro
+ shiro-spring
+ ${shiro.version}
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+ com.alibaba
+ fastjson
+ ${fastjson.version}
+
+
+
+ com.baomidou
+ dynamic-datasource-spring-boot-starter
+ ${mybatis-plus-dynamic.version}
+
+
+ com.baomidou
+ mybatis-plus
+ ${mybatis-plus.version}
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus.version}
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j.version}
+
+
+ commons-lang
+ commons-lang
+ ${commons.lang.version}
+
+
+ commons-io
+ commons-io
+ ${commons.io.version}
+
+
+ commons-configuration
+ commons-configuration
+ ${commons.configuration.version}
+
+
+ velocity
+ org.apache.velocity
+ ${velocity.version}
+
+
+ org.quartz-scheduler
+ quartz
+ ${quartz.version}
+
+
+ com.mchange
+ c3p0
+
+
+ com.zaxxer
+ HikariCP-java6
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ ${easy-captcha.version}
+
+
+ commons-codec
+ commons-codec
+ 1.13
+
+
+ io.jsonwebtoken
+ jjwt
+ 0.9.0
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 3.14.9
+
+
+
+
+
+ iasf
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.2
+
+ true
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+ src/main/resources
+
+ **/*
+
+ true
+
+
+
+
+
+
+ aliyun-repos
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ false
+
+
+
+
+
+
+ aliyun-plugin
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ false
+
+
+
+
diff --git a/src/main/java/com/huoran/iasf/IASFApplication.java b/src/main/java/com/huoran/iasf/IASFApplication.java
new file mode 100644
index 0000000..fab9864
--- /dev/null
+++ b/src/main/java/com/huoran/iasf/IASFApplication.java
@@ -0,0 +1,33 @@
+package com.huoran.iasf;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
+import lombok.extern.slf4j.Slf4j;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.core.env.Environment;
+
+import java.net.InetAddress;
+
+@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
+@MapperScan("com.huoran.iasf.mapper")
+@Slf4j
+@ServletComponentScan(basePackages = {"com.huoran.iasf.common.filter"}) //这一句完成了配置,Springboot的”懒理念“真的厉害。
+public class IASFApplication {
+
+ public static void main(String[] args) throws Exception {
+ ConfigurableApplicationContext application = SpringApplication.run(IASFApplication.class, args);
+
+ Environment env = application.getEnvironment();
+ log.info("\n----------------------------------------------------------\n\t" +
+ "Application '{}' is running! Access URLs:\n\t" +
+ "Doc: \thttp://{}:{}/iasf/doc.html\n" +
+ "----------------------------------------------------------",
+ env.getProperty("spring.application.name"),
+ InetAddress.getLocalHost().getHostAddress(),
+ env.getProperty("server.port"));
+ }
+
+}
diff --git a/src/main/java/com/huoran/iasf/common/aop/annotation/DataScope.java b/src/main/java/com/huoran/iasf/common/aop/annotation/DataScope.java
new file mode 100644
index 0000000..5b3f4d6
--- /dev/null
+++ b/src/main/java/com/huoran/iasf/common/aop/annotation/DataScope.java
@@ -0,0 +1,16 @@
+package com.huoran.iasf.common.aop.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * LogAnnotation
+ *
+ * @author cheney
+ * @version V1.0
+ * @date 2022年7月28日
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataScope {
+}
diff --git a/src/main/java/com/huoran/iasf/common/aop/annotation/LogAnnotation.java b/src/main/java/com/huoran/iasf/common/aop/annotation/LogAnnotation.java
new file mode 100644
index 0000000..bd48f94
--- /dev/null
+++ b/src/main/java/com/huoran/iasf/common/aop/annotation/LogAnnotation.java
@@ -0,0 +1,25 @@
+package com.huoran.iasf.common.aop.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * LogAnnotation
+ *
+ * @author cheney
+ * @version V1.0
+ * @date 2022年7月28日
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface LogAnnotation {
+ /**
+ * 模块
+ */
+ String title() default "";
+
+ /**
+ * 功能
+ */
+ String action() default "";
+}
diff --git a/src/main/java/com/huoran/iasf/common/aop/aspect/DataScopeAspect.java b/src/main/java/com/huoran/iasf/common/aop/aspect/DataScopeAspect.java
new file mode 100644
index 0000000..bfc15cc
--- /dev/null
+++ b/src/main/java/com/huoran/iasf/common/aop/aspect/DataScopeAspect.java
@@ -0,0 +1,135 @@
+package com.huoran.iasf.common.aop.aspect;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.huoran.iasf.common.exception.BusinessException;
+import com.huoran.iasf.common.utils.Constant;
+import com.huoran.iasf.entity.SysRole;
+import com.huoran.iasf.service.HttpSessionService;
+import org.apache.commons.lang.StringUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 概念:最终控制列表中显示哪些 部门/人 创建的数据
+ * 1、需要数据权限控制的列表, 需要有创建人字段, 示例:文章管理
+ * 2、配置角色的数据范围(本部门,其他部门等), 以及绑定的部门
+ * 3、加个注解,用来查询当前等路人的多个角色(并集), 根据角色数据范围, 获取绑定的部门id, 查关联的用户id
+ * 4、在查某个模块的list或page的时候,手动queryWrapper.in(createId, 关联的用户id)
+ *
+ * @author cheney
+ */
+@Aspect
+@Component
+public class DataScopeAspect {
+
+ @Resource
+ HttpSessionService sessionService;
+ @Resource
+ com.huoran.iasf.service.RoleService roleService;
+ @Resource
+ com.huoran.iasf.service.SysRoleDeptService sysRoleDeptService;
+ @Resource
+ com.huoran.iasf.service.DeptService deptService;
+ @Resource
+ com.huoran.iasf.service.UserService userService;
+
+
+ @Pointcut("@annotation(com.huoran.iasf.common.aop.annotation.DataScope)")
+ public void dataScopePointCut() {
+ }
+
+ @Before("dataScopePointCut()")
+ public void doBefore(JoinPoint point) {
+ handleDataScope(point);
+ }
+
+ protected void handleDataScope(final JoinPoint joinPoint) {
+ //获取当前登陆人
+ String id = sessionService.getCurrentUserId();
+ //获取当前登陆人角色, 如果无角色, 那么不限制
+ List sysRoles = roleService.getRoleInfoByUserId(id);
+ if (CollectionUtils.isEmpty(sysRoles) || sysRoles.size() == 0) {
+ return;
+ }
+ //角色未配置数据权限范围, 那么不限制
+ List list = sysRoles.parallelStream().filter(one -> null != one.getDataScope()).collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(list) || list.size() == 0) {
+ return;
+ }
+ //如果存在某角色配置了全部范围, 那么不限制
+ if (list.stream().anyMatch(sysRole -> Constant.DATA_SCOPE_ALL.equals(sysRole.getDataScope()))) {
+ return;
+ }
+ //获取绑定的人
+ List userIds = this.getUserIdsByRoles(list, id);
+ Object params = joinPoint.getArgs()[0];
+ if (params instanceof com.huoran.iasf.entity.BaseEntity) {
+ com.huoran.iasf.entity.BaseEntity baseEntity = (com.huoran.iasf.entity.BaseEntity) params;
+ baseEntity.setCreateIds(userIds);
+ }
+
+ }
+
+ /**
+ * 获取最终的用户id
+ *
+ * @param sysRoles 角色
+ * @param userId 当前用户id
+ * @return 用户id集合
+ */
+ private List getUserIdsByRoles(List sysRoles, String userId) {
+ //本人
+ com.huoran.iasf.entity.SysUser sysUser = userService.getById(userId);
+ //本部门
+ com.huoran.iasf.entity.SysDept sysDept = deptService.getById(sysUser.getDeptId());
+ //部门ids, 定义哪些部门最终拥有权限查看
+ LinkedList