├── .github
└── FUNDING.yml
├── .gitignore
├── .vscode
└── settings.json
├── LICENSE
├── README.md
├── bin
├── clean.bat
├── package.bat
├── run-auth.bat
├── run-gateway.bat
├── run-modules-file.bat
├── run-modules-gen.bat
├── run-modules-job.bat
├── run-modules-system.bat
└── run-monitor.bat
├── docker
├── copy.sh
├── deploy.sh
├── docker-compose.yml
├── mysql
│ ├── db
│ │ └── readme.txt
│ └── dockerfile
├── nacos
│ ├── conf
│ │ └── application.properties
│ └── dockerfile
├── nginx
│ ├── conf
│ │ └── nginx.conf
│ └── dockerfile
├── redis
│ ├── conf
│ │ └── redis.conf
│ └── dockerfile
└── ruoyi
│ ├── auth
│ ├── dockerfile
│ └── jar
│ │ └── readme.txt
│ ├── gateway
│ ├── dockerfile
│ └── jar
│ │ └── readme.txt
│ ├── modules
│ ├── file
│ │ ├── dockerfile
│ │ └── jar
│ │ │ └── readme.txt
│ ├── gen
│ │ ├── dockerfile
│ │ └── jar
│ │ │ └── readme.txt
│ ├── job
│ │ ├── dockerfile
│ │ └── jar
│ │ │ └── readme.txt
│ └── system
│ │ ├── dockerfile
│ │ └── jar
│ │ └── readme.txt
│ └── visual
│ └── monitor
│ ├── dockerfile
│ └── jar
│ └── readme.txt
├── pom.xml
├── react-ui
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .github
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── question.md
│ └── workflows
│ │ ├── ci.yml
│ │ ├── codeql.yml
│ │ ├── coverage.yml
│ │ ├── emoji-helper.yml
│ │ ├── issue-labeled.yml
│ │ ├── issue-open-check.yml
│ │ ├── pnpm.yml
│ │ ├── preview-build.yml
│ │ ├── preview-deploy.yml
│ │ └── preview-start.yml
├── .gitignore
├── .husky
│ ├── commit-msg
│ └── pre-commit
├── .prettierignore
├── .prettierrc.js
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── config
│ ├── config.ts
│ ├── defaultSettings.ts
│ ├── oneapi.json
│ ├── proxy.ts
│ └── routes.ts
├── jest.config.ts
├── jsconfig.json
├── mock
│ ├── listTableList.ts
│ ├── notices.ts
│ ├── requestRecord.mock.js
│ ├── route.ts
│ └── user.ts
├── package.json
├── public
│ ├── CNAME
│ ├── favicon.ico
│ ├── icons
│ │ ├── icon-128x128.png
│ │ ├── icon-192x192.png
│ │ └── icon-512x512.png
│ ├── logo.svg
│ ├── pro_icon.svg
│ └── scripts
│ │ └── loading.js
├── src
│ ├── access.ts
│ ├── app.tsx
│ ├── components
│ │ ├── DictTag
│ │ │ └── index.tsx
│ │ ├── Footer
│ │ │ └── index.tsx
│ │ ├── HeaderDropdown
│ │ │ └── index.tsx
│ │ ├── IconSelector
│ │ │ ├── Category.tsx
│ │ │ ├── CopyableIcon.tsx
│ │ │ ├── IconPicSearcher.tsx
│ │ │ ├── fields.ts
│ │ │ ├── index.tsx
│ │ │ ├── style.less
│ │ │ └── themeIcons.tsx
│ │ └── RightContent
│ │ │ ├── AvatarDropdown.tsx
│ │ │ └── index.tsx
│ ├── enums
│ │ ├── httpEnum.ts
│ │ └── pagesEnums.ts
│ ├── global.less
│ ├── global.tsx
│ ├── hooks
│ │ └── net
│ │ │ └── dict.ts
│ ├── locales
│ │ ├── en-US.ts
│ │ ├── en-US
│ │ │ ├── app.ts
│ │ │ ├── component.ts
│ │ │ ├── globalHeader.ts
│ │ │ ├── menu.ts
│ │ │ ├── pages.ts
│ │ │ ├── pwa.ts
│ │ │ ├── settingDrawer.ts
│ │ │ └── settings.ts
│ │ ├── zh-CN.ts
│ │ ├── zh-CN
│ │ │ ├── app.ts
│ │ │ ├── component.ts
│ │ │ ├── globalHeader.ts
│ │ │ ├── menu.ts
│ │ │ ├── monitor
│ │ │ │ ├── job-log.ts
│ │ │ │ ├── job.ts
│ │ │ │ ├── logininfor.ts
│ │ │ │ ├── onlineUser.ts
│ │ │ │ ├── operlog.ts
│ │ │ │ └── server.ts
│ │ │ ├── pages.ts
│ │ │ ├── pwa.ts
│ │ │ ├── settingDrawer.ts
│ │ │ ├── settings.ts
│ │ │ └── system
│ │ │ │ ├── config.ts
│ │ │ │ ├── dept.ts
│ │ │ │ ├── dict-data.ts
│ │ │ │ ├── dict.ts
│ │ │ │ ├── menu.ts
│ │ │ │ ├── notice.ts
│ │ │ │ ├── post.ts
│ │ │ │ ├── role.ts
│ │ │ │ └── user.ts
│ │ ├── zh-TW.ts
│ │ └── zh-TW
│ │ │ ├── component.ts
│ │ │ ├── globalHeader.ts
│ │ │ ├── menu.ts
│ │ │ ├── pages.ts
│ │ │ ├── pwa.ts
│ │ │ ├── settingDrawer.ts
│ │ │ └── settings.ts
│ ├── manifest.json
│ ├── pages
│ │ ├── 404.tsx
│ │ ├── Monitor
│ │ │ ├── Job
│ │ │ │ ├── detail.tsx
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── JobLog
│ │ │ │ ├── detail.tsx
│ │ │ │ └── index.tsx
│ │ │ └── Online
│ │ │ │ └── index.tsx
│ │ ├── System
│ │ │ ├── Config
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Dept
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Dict
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── DictData
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Logininfor
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Menu
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Notice
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Operlog
│ │ │ │ ├── detail.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Post
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Role
│ │ │ │ ├── authUser.tsx
│ │ │ │ ├── components
│ │ │ │ │ ├── DataScope.tsx
│ │ │ │ │ └── UserSelectorModal.tsx
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ │ └── User
│ │ │ │ ├── components
│ │ │ │ ├── AuthRole.tsx
│ │ │ │ ├── DeptTree.tsx
│ │ │ │ └── ResetPwd.tsx
│ │ │ │ ├── edit.tsx
│ │ │ │ └── index.tsx
│ │ ├── Tool
│ │ │ ├── Gen
│ │ │ │ ├── components
│ │ │ │ │ ├── BaseInfo.tsx
│ │ │ │ │ ├── ColumnInfo.tsx
│ │ │ │ │ ├── GenInfo.tsx
│ │ │ │ │ └── PreviewCode.tsx
│ │ │ │ ├── data.d.ts
│ │ │ │ ├── edit.tsx
│ │ │ │ ├── import.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── locales
│ │ │ │ │ └── zh-CN.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── style.less
│ │ │ └── Swagger
│ │ │ │ └── index.tsx
│ │ ├── User
│ │ │ ├── Center
│ │ │ │ ├── Center.less
│ │ │ │ ├── components
│ │ │ │ │ ├── AvatarCropper
│ │ │ │ │ │ ├── cropper.css
│ │ │ │ │ │ ├── images
│ │ │ │ │ │ │ └── bg.png
│ │ │ │ │ │ ├── index.less
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── BaseInfo
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── ResetPassword
│ │ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Login
│ │ │ │ └── index.tsx
│ │ │ └── Settings
│ │ │ │ └── index.tsx
│ │ └── Welcome.tsx
│ ├── requestErrorConfig.ts
│ ├── service-worker.js
│ ├── services
│ │ ├── ant-design-pro
│ │ │ ├── api.ts
│ │ │ ├── index.ts
│ │ │ ├── login.ts
│ │ │ ├── rule.ts
│ │ │ └── typings.d.ts
│ │ ├── monitor
│ │ │ ├── cache.ts
│ │ │ ├── cachelist.ts
│ │ │ ├── job.ts
│ │ │ ├── jobLog.ts
│ │ │ ├── logininfor.ts
│ │ │ ├── online.ts
│ │ │ ├── operlog.ts
│ │ │ └── server.ts
│ │ ├── session.ts
│ │ ├── swagger
│ │ │ ├── index.ts
│ │ │ ├── pet.ts
│ │ │ ├── store.ts
│ │ │ ├── typings.d.ts
│ │ │ └── user.ts
│ │ ├── system
│ │ │ ├── auth.ts
│ │ │ ├── config.ts
│ │ │ ├── dept.ts
│ │ │ ├── dict.ts
│ │ │ ├── dictdata.ts
│ │ │ ├── index.ts
│ │ │ ├── menu.ts
│ │ │ ├── notice.ts
│ │ │ ├── post.ts
│ │ │ ├── role.ts
│ │ │ └── user.ts
│ │ └── typings.d.ts
│ ├── types
│ │ ├── monitor
│ │ │ ├── cache.d.ts
│ │ │ ├── cacheList.d.ts
│ │ │ ├── job.d.ts
│ │ │ ├── jobLog.d.ts
│ │ │ ├── logininfor.d.ts
│ │ │ ├── online.d.ts
│ │ │ ├── operlog.d.ts
│ │ │ └── server.d.ts
│ │ ├── system
│ │ │ ├── config.d.ts
│ │ │ ├── dept.d.ts
│ │ │ ├── dict-data.d.ts
│ │ │ ├── dict.d.ts
│ │ │ ├── menu.d.ts
│ │ │ ├── notice.d.ts
│ │ │ ├── post.d.ts
│ │ │ ├── role.d.ts
│ │ │ └── user.d.ts
│ │ └── typings.d.ts
│ ├── typings.d.ts
│ └── utils
│ │ ├── IconUtil.ts
│ │ ├── downloadfile.ts
│ │ ├── options.ts
│ │ ├── permission.ts
│ │ └── tree.ts
├── tests
│ └── setupTests.jsx
├── tsconfig.json
└── types
│ ├── cache
│ ├── cache.json
│ ├── login.cache.json
│ └── mock
│ │ ├── login.mock.cache.js
│ │ └── mock.cache.js
│ ├── index.d.ts
│ └── route.d.ts
├── ruoyi-api
├── pom.xml
└── ruoyi-api-system
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── system
│ │ └── api
│ │ ├── RemoteFileService.java
│ │ ├── RemoteLogService.java
│ │ ├── RemoteUserService.java
│ │ ├── domain
│ │ ├── SysDept.java
│ │ ├── SysDictData.java
│ │ ├── SysDictType.java
│ │ ├── SysFile.java
│ │ ├── SysLogininfor.java
│ │ ├── SysOperLog.java
│ │ ├── SysRole.java
│ │ └── SysUser.java
│ │ ├── factory
│ │ ├── RemoteFileFallbackFactory.java
│ │ ├── RemoteLogFallbackFactory.java
│ │ └── RemoteUserFallbackFactory.java
│ │ └── model
│ │ └── LoginUser.java
│ └── resources
│ └── META-INF
│ └── spring
│ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-auth
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── auth
│ │ ├── RuoYiAuthApplication.java
│ │ ├── controller
│ │ └── TokenController.java
│ │ ├── form
│ │ ├── LoginBody.java
│ │ └── RegisterBody.java
│ │ └── service
│ │ ├── SysLoginService.java
│ │ ├── SysPasswordService.java
│ │ └── SysRecordLogService.java
│ └── resources
│ ├── banner.txt
│ ├── bootstrap.yml
│ └── logback.xml
├── ruoyi-common
├── pom.xml
├── ruoyi-common-core
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── common
│ │ │ └── core
│ │ │ ├── annotation
│ │ │ ├── Excel.java
│ │ │ └── Excels.java
│ │ │ ├── constant
│ │ │ ├── CacheConstants.java
│ │ │ ├── Constants.java
│ │ │ ├── GenConstants.java
│ │ │ ├── HttpStatus.java
│ │ │ ├── ScheduleConstants.java
│ │ │ ├── SecurityConstants.java
│ │ │ ├── ServiceNameConstants.java
│ │ │ ├── TokenConstants.java
│ │ │ └── UserConstants.java
│ │ │ ├── context
│ │ │ └── SecurityContextHolder.java
│ │ │ ├── domain
│ │ │ └── R.java
│ │ │ ├── enums
│ │ │ └── UserStatus.java
│ │ │ ├── exception
│ │ │ ├── CaptchaException.java
│ │ │ ├── CheckedException.java
│ │ │ ├── DemoModeException.java
│ │ │ ├── GlobalException.java
│ │ │ ├── InnerAuthException.java
│ │ │ ├── PreAuthorizeException.java
│ │ │ ├── ServiceException.java
│ │ │ ├── UtilException.java
│ │ │ ├── auth
│ │ │ │ ├── NotLoginException.java
│ │ │ │ ├── NotPermissionException.java
│ │ │ │ └── NotRoleException.java
│ │ │ ├── base
│ │ │ │ └── BaseException.java
│ │ │ ├── file
│ │ │ │ ├── FileException.java
│ │ │ │ ├── FileNameLengthLimitExceededException.java
│ │ │ │ ├── FileSizeLimitExceededException.java
│ │ │ │ ├── FileUploadException.java
│ │ │ │ └── InvalidExtensionException.java
│ │ │ ├── job
│ │ │ │ └── TaskException.java
│ │ │ └── user
│ │ │ │ ├── CaptchaExpireException.java
│ │ │ │ ├── UserException.java
│ │ │ │ └── UserPasswordNotMatchException.java
│ │ │ ├── text
│ │ │ ├── CharsetKit.java
│ │ │ ├── Convert.java
│ │ │ └── StrFormatter.java
│ │ │ ├── utils
│ │ │ ├── DateUtils.java
│ │ │ ├── ExceptionUtil.java
│ │ │ ├── JwtUtils.java
│ │ │ ├── PageUtils.java
│ │ │ ├── ServletUtils.java
│ │ │ ├── SpringUtils.java
│ │ │ ├── StringUtils.java
│ │ │ ├── bean
│ │ │ │ ├── BeanUtils.java
│ │ │ │ └── BeanValidators.java
│ │ │ ├── file
│ │ │ │ ├── FileTypeUtils.java
│ │ │ │ ├── FileUtils.java
│ │ │ │ ├── ImageUtils.java
│ │ │ │ └── MimeTypeUtils.java
│ │ │ ├── html
│ │ │ │ ├── EscapeUtil.java
│ │ │ │ └── HTMLFilter.java
│ │ │ ├── ip
│ │ │ │ └── IpUtils.java
│ │ │ ├── poi
│ │ │ │ ├── ExcelHandlerAdapter.java
│ │ │ │ └── ExcelUtil.java
│ │ │ ├── reflect
│ │ │ │ └── ReflectUtils.java
│ │ │ ├── sign
│ │ │ │ └── Base64.java
│ │ │ ├── sql
│ │ │ │ └── SqlUtil.java
│ │ │ └── uuid
│ │ │ │ ├── IdUtils.java
│ │ │ │ ├── Seq.java
│ │ │ │ └── UUID.java
│ │ │ ├── web
│ │ │ ├── controller
│ │ │ │ └── BaseController.java
│ │ │ ├── domain
│ │ │ │ ├── AjaxResult.java
│ │ │ │ ├── BaseEntity.java
│ │ │ │ └── TreeEntity.java
│ │ │ └── page
│ │ │ │ ├── PageDomain.java
│ │ │ │ ├── TableDataInfo.java
│ │ │ │ └── TableSupport.java
│ │ │ └── xss
│ │ │ ├── Xss.java
│ │ │ └── XssValidator.java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-common-datascope
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── common
│ │ │ └── datascope
│ │ │ ├── annotation
│ │ │ └── DataScope.java
│ │ │ └── aspect
│ │ │ └── DataScopeAspect.java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-common-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── ruoyi
│ │ └── common
│ │ └── datasource
│ │ └── annotation
│ │ ├── Master.java
│ │ └── Slave.java
├── ruoyi-common-log
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── common
│ │ │ └── log
│ │ │ ├── annotation
│ │ │ └── Log.java
│ │ │ ├── aspect
│ │ │ └── LogAspect.java
│ │ │ ├── enums
│ │ │ ├── BusinessStatus.java
│ │ │ ├── BusinessType.java
│ │ │ └── OperatorType.java
│ │ │ ├── filter
│ │ │ └── PropertyPreExcludeFilter.java
│ │ │ └── service
│ │ │ └── AsyncLogService.java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-common-redis
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── common
│ │ │ └── redis
│ │ │ ├── configure
│ │ │ ├── FastJson2JsonRedisSerializer.java
│ │ │ └── RedisConfig.java
│ │ │ └── service
│ │ │ └── RedisService.java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-common-seata
│ └── pom.xml
├── ruoyi-common-security
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── common
│ │ │ └── security
│ │ │ ├── annotation
│ │ │ ├── EnableCustomConfig.java
│ │ │ ├── EnableRyFeignClients.java
│ │ │ ├── InnerAuth.java
│ │ │ ├── Logical.java
│ │ │ ├── RequiresLogin.java
│ │ │ ├── RequiresPermissions.java
│ │ │ └── RequiresRoles.java
│ │ │ ├── aspect
│ │ │ ├── InnerAuthAspect.java
│ │ │ └── PreAuthorizeAspect.java
│ │ │ ├── auth
│ │ │ ├── AuthLogic.java
│ │ │ └── AuthUtil.java
│ │ │ ├── config
│ │ │ ├── ApplicationConfig.java
│ │ │ └── WebMvcConfig.java
│ │ │ ├── feign
│ │ │ ├── FeignAutoConfiguration.java
│ │ │ └── FeignRequestInterceptor.java
│ │ │ ├── handler
│ │ │ └── GlobalExceptionHandler.java
│ │ │ ├── interceptor
│ │ │ └── HeaderInterceptor.java
│ │ │ ├── service
│ │ │ └── TokenService.java
│ │ │ └── utils
│ │ │ ├── DictUtils.java
│ │ │ └── SecurityUtils.java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
└── ruoyi-common-swagger
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── common
│ │ └── swagger
│ │ ├── annotation
│ │ └── EnableCustomSwagger2.java
│ │ └── config
│ │ ├── SwaggerAutoConfiguration.java
│ │ ├── SwaggerBeanPostProcessor.java
│ │ ├── SwaggerProperties.java
│ │ └── SwaggerWebConfiguration.java
│ └── resources
│ └── META-INF
│ └── spring
│ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── ruoyi-gateway
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── gateway
│ │ ├── RuoYiGatewayApplication.java
│ │ ├── config
│ │ ├── CaptchaConfig.java
│ │ ├── GatewayConfig.java
│ │ ├── KaptchaTextCreator.java
│ │ ├── RouterFunctionConfiguration.java
│ │ ├── SwaggerProvider.java
│ │ └── properties
│ │ │ ├── CaptchaProperties.java
│ │ │ ├── IgnoreWhiteProperties.java
│ │ │ └── XssProperties.java
│ │ ├── filter
│ │ ├── AuthFilter.java
│ │ ├── BlackListUrlFilter.java
│ │ ├── CacheRequestFilter.java
│ │ ├── ValidateCodeFilter.java
│ │ └── XssFilter.java
│ │ ├── handler
│ │ ├── GatewayExceptionHandler.java
│ │ ├── SentinelFallbackHandler.java
│ │ ├── SwaggerHandler.java
│ │ └── ValidateCodeHandler.java
│ │ └── service
│ │ ├── ValidateCodeService.java
│ │ └── impl
│ │ └── ValidateCodeServiceImpl.java
│ └── resources
│ ├── banner.txt
│ ├── bootstrap.yml
│ └── logback.xml
├── ruoyi-modules
├── pom.xml
├── ruoyi-file
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── file
│ │ │ ├── RuoYiFileApplication.java
│ │ │ ├── config
│ │ │ ├── MinioConfig.java
│ │ │ └── ResourcesConfig.java
│ │ │ ├── controller
│ │ │ └── SysFileController.java
│ │ │ ├── service
│ │ │ ├── FastDfsSysFileServiceImpl.java
│ │ │ ├── ISysFileService.java
│ │ │ ├── LocalSysFileServiceImpl.java
│ │ │ └── MinioSysFileServiceImpl.java
│ │ │ └── utils
│ │ │ └── FileUploadUtils.java
│ │ └── resources
│ │ ├── banner.txt
│ │ ├── bootstrap.yml
│ │ └── logback.xml
├── ruoyi-gen
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── gen
│ │ │ ├── RuoYiGenApplication.java
│ │ │ ├── config
│ │ │ └── GenConfig.java
│ │ │ ├── controller
│ │ │ └── GenController.java
│ │ │ ├── domain
│ │ │ ├── GenTable.java
│ │ │ └── GenTableColumn.java
│ │ │ ├── mapper
│ │ │ ├── GenTableColumnMapper.java
│ │ │ └── GenTableMapper.java
│ │ │ ├── service
│ │ │ ├── GenTableColumnServiceImpl.java
│ │ │ ├── GenTableServiceImpl.java
│ │ │ ├── IGenTableColumnService.java
│ │ │ └── IGenTableService.java
│ │ │ └── util
│ │ │ ├── GenUtils.java
│ │ │ ├── VelocityInitializer.java
│ │ │ └── VelocityUtils.java
│ │ └── resources
│ │ ├── banner.txt
│ │ ├── bootstrap.yml
│ │ ├── logback.xml
│ │ ├── mapper
│ │ └── generator
│ │ │ ├── GenTableColumnMapper.xml
│ │ │ └── GenTableMapper.xml
│ │ └── vm
│ │ ├── java
│ │ ├── controller.java.vm
│ │ ├── domain.java.vm
│ │ ├── mapper.java.vm
│ │ ├── service.java.vm
│ │ ├── serviceImpl.java.vm
│ │ └── sub-domain.java.vm
│ │ ├── js
│ │ └── api.js.vm
│ │ ├── sql
│ │ └── sql.vm
│ │ ├── vue
│ │ ├── index-tree.vue.vm
│ │ ├── index.vue.vm
│ │ └── v3
│ │ │ ├── index-tree.vue.vm
│ │ │ ├── index.vue.vm
│ │ │ └── readme.txt
│ │ └── xml
│ │ └── mapper.xml.vm
├── ruoyi-job
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── ruoyi
│ │ │ └── job
│ │ │ ├── RuoYiJobApplication.java
│ │ │ ├── config
│ │ │ └── ScheduleConfig.java
│ │ │ ├── controller
│ │ │ ├── SysJobController.java
│ │ │ └── SysJobLogController.java
│ │ │ ├── domain
│ │ │ ├── SysJob.java
│ │ │ └── SysJobLog.java
│ │ │ ├── mapper
│ │ │ ├── SysJobLogMapper.java
│ │ │ └── SysJobMapper.java
│ │ │ ├── service
│ │ │ ├── ISysJobLogService.java
│ │ │ ├── ISysJobService.java
│ │ │ ├── SysJobLogServiceImpl.java
│ │ │ └── SysJobServiceImpl.java
│ │ │ ├── task
│ │ │ └── RyTask.java
│ │ │ └── util
│ │ │ ├── AbstractQuartzJob.java
│ │ │ ├── CronUtils.java
│ │ │ ├── JobInvokeUtil.java
│ │ │ ├── QuartzDisallowConcurrentExecution.java
│ │ │ ├── QuartzJobExecution.java
│ │ │ └── ScheduleUtils.java
│ │ └── resources
│ │ ├── banner.txt
│ │ ├── bootstrap.yml
│ │ ├── logback.xml
│ │ └── mapper
│ │ └── job
│ │ ├── SysJobLogMapper.xml
│ │ └── SysJobMapper.xml
└── ruoyi-system
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── system
│ │ ├── RuoYiSystemApplication.java
│ │ ├── controller
│ │ ├── SysConfigController.java
│ │ ├── SysDeptController.java
│ │ ├── SysDictDataController.java
│ │ ├── SysDictTypeController.java
│ │ ├── SysLogininforController.java
│ │ ├── SysMenuController.java
│ │ ├── SysNoticeController.java
│ │ ├── SysOperlogController.java
│ │ ├── SysPostController.java
│ │ ├── SysProfileController.java
│ │ ├── SysRoleController.java
│ │ ├── SysUserController.java
│ │ └── SysUserOnlineController.java
│ │ ├── domain
│ │ ├── SysConfig.java
│ │ ├── SysMenu.java
│ │ ├── SysNotice.java
│ │ ├── SysPost.java
│ │ ├── SysRoleDept.java
│ │ ├── SysRoleMenu.java
│ │ ├── SysUserOnline.java
│ │ ├── SysUserPost.java
│ │ ├── SysUserRole.java
│ │ └── vo
│ │ │ ├── MetaVo.java
│ │ │ ├── RouterVo.java
│ │ │ └── TreeSelect.java
│ │ ├── mapper
│ │ ├── SysConfigMapper.java
│ │ ├── SysDeptMapper.java
│ │ ├── SysDictDataMapper.java
│ │ ├── SysDictTypeMapper.java
│ │ ├── SysLogininforMapper.java
│ │ ├── SysMenuMapper.java
│ │ ├── SysNoticeMapper.java
│ │ ├── SysOperLogMapper.java
│ │ ├── SysPostMapper.java
│ │ ├── SysRoleDeptMapper.java
│ │ ├── SysRoleMapper.java
│ │ ├── SysRoleMenuMapper.java
│ │ ├── SysUserMapper.java
│ │ ├── SysUserPostMapper.java
│ │ └── SysUserRoleMapper.java
│ │ └── service
│ │ ├── ISysConfigService.java
│ │ ├── ISysDeptService.java
│ │ ├── ISysDictDataService.java
│ │ ├── ISysDictTypeService.java
│ │ ├── ISysLogininforService.java
│ │ ├── ISysMenuService.java
│ │ ├── ISysNoticeService.java
│ │ ├── ISysOperLogService.java
│ │ ├── ISysPermissionService.java
│ │ ├── ISysPostService.java
│ │ ├── ISysRoleService.java
│ │ ├── ISysUserOnlineService.java
│ │ ├── ISysUserService.java
│ │ └── impl
│ │ ├── SysConfigServiceImpl.java
│ │ ├── SysDeptServiceImpl.java
│ │ ├── SysDictDataServiceImpl.java
│ │ ├── SysDictTypeServiceImpl.java
│ │ ├── SysLogininforServiceImpl.java
│ │ ├── SysMenuServiceImpl.java
│ │ ├── SysNoticeServiceImpl.java
│ │ ├── SysOperLogServiceImpl.java
│ │ ├── SysPermissionServiceImpl.java
│ │ ├── SysPostServiceImpl.java
│ │ ├── SysRoleServiceImpl.java
│ │ ├── SysUserOnlineServiceImpl.java
│ │ └── SysUserServiceImpl.java
│ └── resources
│ ├── banner.txt
│ ├── bootstrap.yml
│ ├── logback.xml
│ └── mapper
│ └── system
│ ├── SysConfigMapper.xml
│ ├── SysDeptMapper.xml
│ ├── SysDictDataMapper.xml
│ ├── SysDictTypeMapper.xml
│ ├── SysLogininforMapper.xml
│ ├── SysMenuMapper.xml
│ ├── SysNoticeMapper.xml
│ ├── SysOperLogMapper.xml
│ ├── SysPostMapper.xml
│ ├── SysRoleDeptMapper.xml
│ ├── SysRoleMapper.xml
│ ├── SysRoleMenuMapper.xml
│ ├── SysUserMapper.xml
│ ├── SysUserPostMapper.xml
│ └── SysUserRoleMapper.xml
├── ruoyi-visual
├── pom.xml
└── ruoyi-monitor
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── ruoyi
│ │ └── modules
│ │ └── monitor
│ │ ├── RuoYiMonitorApplication.java
│ │ └── config
│ │ └── WebSecurityConfigurer.java
│ └── resources
│ ├── banner.txt
│ ├── bootstrap.yml
│ └── logback.xml
└── sql
├── quartz.sql
├── ry_20230706.sql
├── ry_config_20220929.sql
└── ry_seata_20210128.sql
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | custom: https://gitee.com/whiteshader/ruoyi-react
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # Build Tools
3 |
4 | .gradle
5 | /build/
6 | !gradle/wrapper/gradle-wrapper.jar
7 |
8 | target/
9 | !.mvn/wrapper/maven-wrapper.jar
10 |
11 | ######################################################################
12 | # IDE
13 |
14 | ### STS ###
15 | .apt_generated
16 | .classpath
17 | .factorypath
18 | .project
19 | .settings
20 | .springBeans
21 |
22 | ### IntelliJ IDEA ###
23 | .idea
24 | *.iws
25 | *.iml
26 | *.ipr
27 |
28 | ### JRebel ###
29 | rebel.xml
30 | ### NetBeans ###
31 | nbproject/private/
32 | build/*
33 | nbbuild/
34 | dist/
35 | nbdist/
36 | .nb-gradle/
37 |
38 | ######################################################################
39 | # Others
40 | *.log
41 | *.xml.versionsBackup
42 | *.swp
43 |
44 | !*/build/*.java
45 | !*/build/*.html
46 | !*/build/*.xml
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude": {
3 | "**/.classpath": true,
4 | "**/.project": true,
5 | "**/.settings": true,
6 | "**/.factorypath": true
7 | },
8 | "java.compile.nullAnalysis.mode": "automatic",
9 | "java.configuration.updateBuildConfiguration": "interactive"
10 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 若依
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/bin/clean.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/clean.bat
--------------------------------------------------------------------------------
/bin/package.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/package.bat
--------------------------------------------------------------------------------
/bin/run-auth.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-auth.bat
--------------------------------------------------------------------------------
/bin/run-gateway.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-gateway.bat
--------------------------------------------------------------------------------
/bin/run-modules-file.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-modules-file.bat
--------------------------------------------------------------------------------
/bin/run-modules-gen.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-modules-gen.bat
--------------------------------------------------------------------------------
/bin/run-modules-job.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-modules-job.bat
--------------------------------------------------------------------------------
/bin/run-modules-system.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-modules-system.bat
--------------------------------------------------------------------------------
/bin/run-monitor.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/bin/run-monitor.bat
--------------------------------------------------------------------------------
/docker/copy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # 复制项目的文件到对应docker路径,便于一键生成镜像。
4 | usage() {
5 | echo "Usage: sh copy.sh"
6 | exit 1
7 | }
8 |
9 |
10 | # copy sql
11 | echo "begin copy sql "
12 | cp ../sql/ry_20230223.sql ./mysql/db
13 | cp ../sql/ry_config_20220929.sql ./mysql/db
14 |
15 | # copy html
16 | echo "begin copy html "
17 | cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
18 |
19 |
20 | # copy jar
21 | echo "begin copy ruoyi-gateway "
22 | cp ../ruoyi-gateway/target/ruoyi-gateway.jar ./ruoyi/gateway/jar
23 |
24 | echo "begin copy ruoyi-auth "
25 | cp ../ruoyi-auth/target/ruoyi-auth.jar ./ruoyi/auth/jar
26 |
27 | echo "begin copy ruoyi-visual "
28 | cp ../ruoyi-visual/ruoyi-monitor/target/ruoyi-visual-monitor.jar ./ruoyi/visual/monitor/jar
29 |
30 | echo "begin copy ruoyi-modules-system "
31 | cp ../ruoyi-modules/ruoyi-system/target/ruoyi-modules-system.jar ./ruoyi/modules/system/jar
32 |
33 | echo "begin copy ruoyi-modules-file "
34 | cp ../ruoyi-modules/ruoyi-file/target/ruoyi-modules-file.jar ./ruoyi/modules/file/jar
35 |
36 | echo "begin copy ruoyi-modules-job "
37 | cp ../ruoyi-modules/ruoyi-job/target/ruoyi-modules-job.jar ./ruoyi/modules/job/jar
38 |
39 | echo "begin copy ruoyi-modules-gen "
40 | cp ../ruoyi-modules/ruoyi-gen/target/ruoyi-modules-gen.jar ./ruoyi/modules/gen/jar
41 |
42 |
--------------------------------------------------------------------------------
/docker/mysql/db/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/mysql/db/readme.txt
--------------------------------------------------------------------------------
/docker/mysql/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM mysql:5.7
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 执行sql脚本
7 | ADD ./db/*.sql /docker-entrypoint-initdb.d/
8 |
--------------------------------------------------------------------------------
/docker/nacos/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM nacos/nacos-server
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 复制conf文件到路径
7 | COPY ./conf/application.properties /home/nacos/conf/application.properties
8 |
--------------------------------------------------------------------------------
/docker/nginx/conf/nginx.conf:
--------------------------------------------------------------------------------
1 | worker_processes 1;
2 |
3 | events {
4 | worker_connections 1024;
5 | }
6 |
7 | http {
8 | include mime.types;
9 | default_type application/octet-stream;
10 | sendfile on;
11 | keepalive_timeout 65;
12 |
13 | server {
14 | listen 80;
15 | server_name localhost;
16 |
17 | location / {
18 | root /home/ruoyi/projects/ruoyi-ui;
19 | try_files $uri $uri/ /index.html;
20 | index index.html index.htm;
21 | }
22 |
23 | location /prod-api/{
24 | proxy_set_header Host $http_host;
25 | proxy_set_header X-Real-IP $remote_addr;
26 | proxy_set_header REMOTE-HOST $remote_addr;
27 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
28 | proxy_pass http://ruoyi-gateway:8080/;
29 | }
30 |
31 | # 避免actuator暴露
32 | if ($request_uri ~ "/actuator") {
33 | return 403;
34 | }
35 |
36 | error_page 500 502 503 504 /50x.html;
37 | location = /50x.html {
38 | root html;
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/docker/nginx/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM nginx
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi/projects/ruoyi-ui
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
10 | # 指定路径
11 | WORKDIR /home/ruoyi/projects/ruoyi-ui
12 | # 复制conf文件到路径
13 | COPY ./conf/nginx.conf /etc/nginx/nginx.conf
14 | # 复制html文件到路径
15 | COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
16 |
--------------------------------------------------------------------------------
/docker/redis/conf/redis.conf:
--------------------------------------------------------------------------------
1 | # requirepass 123456
--------------------------------------------------------------------------------
/docker/redis/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM redis
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi/redis
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi/redis
10 | # 指定路径
11 | WORKDIR /home/ruoyi/redis
12 | # 复制conf文件到路径
13 | COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
14 |
--------------------------------------------------------------------------------
/docker/ruoyi/auth/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
14 | # 启动认证服务
15 | ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/auth/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/auth/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/gateway/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
14 | # 启动网关服务
15 | ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/gateway/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/gateway/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/modules/file/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
14 | # 启动文件服务
15 | ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/modules/file/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/modules/file/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/modules/gen/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
14 | # 启动代码生成服务
15 | ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/modules/gen/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/modules/gen/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/modules/job/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
14 | # 启动定时任务服务
15 | ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/modules/job/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/modules/job/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/modules/system/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
14 | # 启动系统服务
15 | ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/modules/system/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/modules/system/jar/readme.txt
--------------------------------------------------------------------------------
/docker/ruoyi/visual/monitor/dockerfile:
--------------------------------------------------------------------------------
1 | # 基础镜像
2 | FROM openjdk:8-jre
3 | # author
4 | MAINTAINER ruoyi
5 |
6 | # 挂载目录
7 | VOLUME /home/ruoyi
8 | # 创建目录
9 | RUN mkdir -p /home/ruoyi
10 | # 指定路径
11 | WORKDIR /home/ruoyi
12 | # 复制jar文件到路径
13 | COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
14 | # 启动系统服务
15 | ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
--------------------------------------------------------------------------------
/docker/ruoyi/visual/monitor/jar/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/docker/ruoyi/visual/monitor/jar/readme.txt
--------------------------------------------------------------------------------
/react-ui/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/react-ui/.eslintignore:
--------------------------------------------------------------------------------
1 | /lambda/
2 | /scripts
3 | /config
4 | .history
5 | public
6 | dist
7 | .umi
8 | mock
--------------------------------------------------------------------------------
/react-ui/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [require.resolve('@umijs/lint/dist/config/eslint')],
3 | globals: {
4 | page: true,
5 | REACT_APP_ENV: true,
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/react-ui/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: ant-design
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/react-ui/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: '报告 Bug | Report bug 🐛'
3 | about: 报告 Ant Design Pro 的 bug
4 | title: '🐛 [BUG]'
5 | labels: '🐛 bug'
6 | assignees: ''
7 | ---
8 |
9 | ### 🐛 bug 描述
10 |
11 |
15 |
16 | ### 📷 复现步骤 | Recurrence steps
17 |
18 |
22 |
23 | ### 🏞 期望结果 | Expected results
24 |
25 |
29 |
30 | ### 💻 复现代码 | Recurrence code
31 |
32 |
36 |
37 | ### © 版本信息
38 |
39 | - Ant Design Pro 版本: [e.g. 4.0.0]
40 | - umi 版本
41 | - 浏览器环境
42 | - 开发环境 [e.g. mac OS]
43 |
44 | ### 🚑 其他信息
45 |
46 |
49 |
--------------------------------------------------------------------------------
/react-ui/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: '功能需求 | Feature Requirements ✨'
3 | about: 对 Ant Design Pro 的需求或建议
4 | title: '👑 [需求 | Feature]'
5 | labels: '👑 Feature Request'
6 | assignees: ''
7 | ---
8 |
9 | ### 🥰 需求描述 | Requirements description
10 |
11 |
15 |
16 | ### 🧐 解决方案 | Solution
17 |
18 |
22 |
23 | ### 🚑 其他信息 | Other information
24 |
25 |
29 |
--------------------------------------------------------------------------------
/react-ui/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: '疑问或需要帮助 | Questions or need help ❓'
3 | about: 对 Ant Design Pro 使用的疑问或需要帮助
4 | title: '🧐[问题 | question]'
5 | labels: '🧐 question'
6 | assignees: ''
7 | ---
8 |
9 | ### 🧐 问题描述 | Problem description
10 |
11 |
15 |
16 | ### 💻 示例代码 | Sample code
17 |
18 |
22 |
23 | ### 🚑 其他信息 | Other information
24 |
25 |
29 |
30 | OS:
31 |
32 | Node:
33 |
34 | 浏览器 | browser:
35 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: Node CI
2 |
3 | on: [push, pull_request]
4 |
5 | permissions:
6 | contents: read
7 |
8 | jobs:
9 | build:
10 | runs-on: ${{ matrix.os }}
11 | strategy:
12 | matrix:
13 | node_version: [16.x, 14.x]
14 | os: [ubuntu-latest, windows-latest, macOS-latest]
15 | steps:
16 | - uses: actions/checkout@v1
17 | - name: Use Node.js ${{ matrix.node_version }}
18 | uses: actions/setup-node@v1
19 | with:
20 | node-version: ${{ matrix.node_version }}
21 | - run: echo ${{github.ref}}
22 | - run: npm install
23 | - run: yarn run lint
24 | - run: yarn run tsc
25 | - run: yarn run build
26 | env:
27 | CI: true
28 | PROGRESS: none
29 | NODE_ENV: test
30 | NODE_OPTIONS: --max_old_space_size=4096
31 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 | pull_request:
7 | branches: [ "master" ]
8 | schedule:
9 | - cron: "48 12 * * 2"
10 |
11 | jobs:
12 | analyze:
13 | name: Analyze
14 | runs-on: ubuntu-latest
15 | permissions:
16 | actions: read
17 | contents: read
18 | security-events: write
19 |
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | language: [ javascript ]
24 |
25 | steps:
26 | - name: Checkout
27 | uses: actions/checkout@v3
28 |
29 | - name: Initialize CodeQL
30 | uses: github/codeql-action/init@v2
31 | with:
32 | languages: ${{ matrix.language }}
33 | queries: +security-and-quality
34 |
35 | - name: Autobuild
36 | uses: github/codeql-action/autobuild@v2
37 |
38 | - name: Perform CodeQL Analysis
39 | uses: github/codeql-action/analyze@v2
40 | with:
41 | category: "/language:${{ matrix.language }}"
42 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/coverage.yml:
--------------------------------------------------------------------------------
1 | name: coverage CI
2 |
3 | on: [push, pull_request]
4 |
5 | permissions:
6 | contents: read
7 |
8 | jobs:
9 | build:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v1
13 | - name: Use Node.js 16.x
14 | uses: actions/setup-node@v1
15 | with:
16 | node-version: 16.x
17 | - run: echo ${{github.ref}}
18 | - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
19 | - run: pnpm config set store-dir ~/.pnpm-store
20 | - run: pnpm install --strict-peer-dependencies=false
21 | - run: yarn run test:coverage
22 | env:
23 | CI: true
24 | PROGRESS: none
25 | NODE_ENV: test
26 | NODE_OPTIONS: --max_old_space_size=4096
27 | - run: bash <(curl -s https://codecov.io/bash)
28 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/emoji-helper.yml:
--------------------------------------------------------------------------------
1 | name: Emoji Helper
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | emoji:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions-cool/emoji-helper@v1.0.0
12 | with:
13 | type: 'release'
14 | emoji: '+1, laugh, heart, hooray, rocket, eyes'
15 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/issue-open-check.yml:
--------------------------------------------------------------------------------
1 | name: Issue Open Check
2 |
3 | on:
4 | issues:
5 | types: [opened, edited]
6 |
7 | jobs:
8 | check-issue:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions-cool/issues-helper@v2.2.0
12 | id: check
13 | with:
14 | actions: 'check-issue'
15 | issue-number: ${{ github.event.issue.number }}
16 | title-excludes: '🐛 [BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
17 |
18 | - if: steps.check.outputs.check-result == 'false' && github.event.issue.state == 'open'
19 | uses: actions-cool/issues-helper@v2.2.0
20 | with:
21 | actions: 'create-comment, close-issue'
22 | issue-number: ${{ github.event.issue.number }}
23 | body: |
24 | 当前 Issue 未检测到标题,请规范填写,谢谢!
25 |
26 | The title of the current issue is not detected, please fill in according to the specifications, thank you!
27 |
28 | - if: steps.check.outputs.check-result == 'true'
29 | uses: actions-cool/issues-similarity-analysis@v1
30 | with:
31 | filter-threshold: 0.8
32 | title-excludes: '🐛[BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
33 | comment-title: '### 以下的 Issues 可能会帮助到你 / The following issues may help you'
34 | show-footer: false
35 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/pnpm.yml:
--------------------------------------------------------------------------------
1 | name: Node pnpm CI
2 |
3 | on: [push, pull_request]
4 |
5 | permissions:
6 | contents: read
7 |
8 | jobs:
9 | build:
10 | runs-on: ${{ matrix.os }}
11 | strategy:
12 | matrix:
13 | node_version: [16.x]
14 | os: [ubuntu-latest, windows-latest, macOS-latest]
15 | steps:
16 | - uses: actions/checkout@v1
17 | - name: Use Node.js ${{ matrix.node_version }}
18 | uses: actions/setup-node@v1
19 | with:
20 | node-version: ${{ matrix.node_version }}
21 | - run: echo ${{github.ref}}
22 | - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
23 | - run: pnpm config set store-dir ~/.pnpm-store
24 | - run: pnpm install --strict-peer-dependencies=false
25 | - run: pnpm run lint
26 | - run: pnpm run tsc
27 | - run: pnpm run build
28 | - run: pnpm run test
29 | env:
30 | CI: true
31 | PROGRESS: none
32 | NODE_ENV: test
33 | NODE_OPTIONS: --max_old_space_size=4096
34 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/preview-build.yml:
--------------------------------------------------------------------------------
1 | name: Preview Build
2 |
3 | on:
4 | pull_request:
5 | types: [opened, synchronize, reopened]
6 |
7 | permissions:
8 | contents: read
9 |
10 | jobs:
11 | build-preview:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | with:
17 | ref: ${{ github.event.pull_request.head.sha }}
18 |
19 | - name: build
20 | run: |
21 | yarn
22 | yarn add umi-plugin-pro --save
23 | yarn build
24 |
25 | - name: upload dist artifact
26 | uses: actions/upload-artifact@v2
27 | with:
28 | name: dist
29 | path: dist/
30 | retention-days: 5
31 |
32 | - name: Save PR number
33 | if: ${{ always() }}
34 | run: echo ${{ github.event.number }} > ./pr-id.txt
35 |
36 | - name: Upload PR number
37 | if: ${{ always() }}
38 | uses: actions/upload-artifact@v2
39 | with:
40 | name: pr
41 | path: ./pr-id.txt
42 |
--------------------------------------------------------------------------------
/react-ui/.github/workflows/preview-start.yml:
--------------------------------------------------------------------------------
1 | name: Preview Start
2 |
3 | on: pull_request_target
4 |
5 | permissions:
6 | contents: read
7 |
8 | jobs:
9 | preview:
10 | permissions:
11 | issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
12 | pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
13 | runs-on: ubuntu-latest
14 | steps:
15 | - name: create
16 | uses: actions-cool/maintain-one-comment@v1.2.1
17 | with:
18 | token: ${{ secrets.GITHUB_TOKEN }}
19 | body: |
20 | ⚡️ Deploying PR Preview...
21 |
22 |
23 |
24 | body-include: ''
25 |
--------------------------------------------------------------------------------
/react-ui/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | **/node_modules
5 | # roadhog-api-doc ignore
6 | /src/utils/request-temp.js
7 | _roadhog-api-doc
8 |
9 | # production
10 | /dist
11 |
12 | # misc
13 | .DS_Store
14 | npm-debug.log*
15 | yarn-error.log
16 |
17 | /coverage
18 | .idea
19 | yarn.lock
20 | package-lock.json
21 | *bak
22 | .vscode
23 |
24 |
25 | # visual studio code
26 | .history
27 | *.log
28 | functions/*
29 | .temp/**
30 |
31 | # umi
32 | .umi
33 | .umi-production
34 | .umi-test
35 |
36 | # screenshot
37 | screenshot
38 | .firebase
39 | .eslintcache
40 |
41 | build
42 |
43 | pnpm-lock.yaml
--------------------------------------------------------------------------------
/react-ui/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | # Export Git hook params
5 | export GIT_PARAMS=$*
6 |
7 | # npx --no-install fabric verify-commit
8 |
--------------------------------------------------------------------------------
/react-ui/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | # npx --no-install lint-staged
5 |
--------------------------------------------------------------------------------
/react-ui/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.svg
2 | .umi
3 | .umi-production
4 | /dist
5 | .dockerignore
6 | .DS_Store
7 | .eslintignore
8 | *.png
9 | *.toml
10 | docker
11 | .editorconfig
12 | Dockerfile*
13 | .gitignore
14 | .prettierignore
15 | LICENSE
16 | .eslintcache
17 | *.lock
18 | yarn-error.log
19 | .history
20 | CNAME
21 | /build
22 | /public
23 |
--------------------------------------------------------------------------------
/react-ui/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | singleQuote: true,
3 | trailingComma: 'all',
4 | printWidth: 100,
5 | proseWrap: 'never',
6 | endOfLine: 'lf',
7 | overrides: [
8 | {
9 | files: '.prettierrc',
10 | options: {
11 | parser: 'json',
12 | },
13 | },
14 | {
15 | files: 'document.ejs',
16 | options: {
17 | parser: 'html',
18 | },
19 | },
20 | ],
21 | };
22 |
--------------------------------------------------------------------------------
/react-ui/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019-present Alipay.inc
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/react-ui/config/defaultSettings.ts:
--------------------------------------------------------------------------------
1 | import { ProLayoutProps } from '@ant-design/pro-components';
2 |
3 | /**
4 | * @name
5 | */
6 | const Settings: ProLayoutProps & {
7 | pwa?: boolean;
8 | logo?: string;
9 | } = {
10 | navTheme: 'light',
11 | // 拂晓蓝
12 | colorPrimary: '#1890ff',
13 | layout: 'mix',
14 | contentWidth: 'Fluid',
15 | fixedHeader: false,
16 | fixSiderbar: false,
17 | splitMenus: true,
18 | colorWeak: false,
19 | title: 'Ant Design Pro',
20 | pwa: true,
21 | logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
22 | iconfontUrl: '',
23 | token: {
24 | // 参见ts声明,demo 见文档,通过token 修改样式
25 | //https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F
26 | },
27 | };
28 |
29 | export default Settings;
30 |
--------------------------------------------------------------------------------
/react-ui/jest.config.ts:
--------------------------------------------------------------------------------
1 | import { configUmiAlias, createConfig } from '@umijs/max/test';
2 |
3 | export default async () => {
4 | const config = await configUmiAlias({
5 | ...createConfig({
6 | target: 'browser',
7 | }),
8 | });
9 |
10 | console.log();
11 | return {
12 | ...config,
13 | testEnvironmentOptions: {
14 | ...(config?.testEnvironmentOptions || {}),
15 | url: 'http://localhost:8000',
16 | },
17 | setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'],
18 | globals: {
19 | ...config.globals,
20 | localStorage: null,
21 | },
22 | };
23 | };
24 |
--------------------------------------------------------------------------------
/react-ui/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "jsx": "react-jsx",
4 | "emitDecoratorMetadata": true,
5 | "experimentalDecorators": true,
6 | "baseUrl": ".",
7 | "paths": {
8 | "@/*": ["./src/*"]
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/react-ui/mock/route.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | '/api/auth_routes': {
3 | '/form/advanced-form': { authority: ['admin', 'user'] },
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/react-ui/public/CNAME:
--------------------------------------------------------------------------------
1 | preview.pro.ant.design
--------------------------------------------------------------------------------
/react-ui/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/public/favicon.ico
--------------------------------------------------------------------------------
/react-ui/public/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/public/icons/icon-128x128.png
--------------------------------------------------------------------------------
/react-ui/public/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/public/icons/icon-192x192.png
--------------------------------------------------------------------------------
/react-ui/public/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/public/icons/icon-512x512.png
--------------------------------------------------------------------------------
/react-ui/public/pro_icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/react-ui/src/components/Footer/index.tsx:
--------------------------------------------------------------------------------
1 | import { GithubOutlined } from '@ant-design/icons';
2 | import { DefaultFooter } from '@ant-design/pro-components';
3 | import { useIntl } from '@umijs/max';
4 | import React from 'react';
5 |
6 | const Footer: React.FC = () => {
7 | const intl = useIntl();
8 | const defaultMessage = intl.formatMessage({
9 | id: 'app.copyright.produced',
10 | defaultMessage: '蚂蚁集团体验技术部出品',
11 | });
12 |
13 | const currentYear = new Date().getFullYear();
14 |
15 | return (
16 | ,
31 | href: 'https://github.com/ant-design/ant-design-pro',
32 | blankTarget: true,
33 | },
34 | {
35 | key: 'Ant Design',
36 | title: 'Ant Design',
37 | href: 'https://ant.design',
38 | blankTarget: true,
39 | },
40 | ]}
41 | />
42 | );
43 | };
44 |
45 | export default Footer;
46 |
--------------------------------------------------------------------------------
/react-ui/src/components/HeaderDropdown/index.tsx:
--------------------------------------------------------------------------------
1 | import { Dropdown } from 'antd';
2 | import type { DropDownProps } from 'antd/es/dropdown';
3 | import React from 'react';
4 | import { useEmotionCss } from '@ant-design/use-emotion-css';
5 | import classNames from 'classnames';
6 |
7 | export type HeaderDropdownProps = {
8 | overlayClassName?: string;
9 | placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter';
10 | } & Omit;
11 |
12 | const HeaderDropdown: React.FC = ({ overlayClassName: cls, ...restProps }) => {
13 | const className = useEmotionCss(({ token }) => {
14 | return {
15 | [`@media screen and (max-width: ${token.screenXS})`]: {
16 | width: '100%',
17 | },
18 | };
19 | });
20 | return (
21 | target.parentElement || document.body}
24 | {...restProps}
25 | />
26 | );
27 | };
28 |
29 | export default HeaderDropdown;
30 |
--------------------------------------------------------------------------------
/react-ui/src/components/IconSelector/CopyableIcon.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Tooltip } from 'antd';
3 | import classNames from 'classnames';
4 | import * as AntdIcons from '@ant-design/icons';
5 | import type { ThemeType } from './index';
6 | import styles from './style.less';
7 |
8 | const allIcons: {
9 | [key: string]: any;
10 | } = AntdIcons;
11 |
12 | export interface CopyableIconProps {
13 | name: string;
14 | isNew: boolean;
15 | theme: ThemeType;
16 | justCopied: string | null;
17 | onSelect: (type: string, text: string) => any;
18 | }
19 |
20 | const CopyableIcon: React.FC = ({
21 | name,
22 | justCopied,
23 | onSelect,
24 | theme,
25 | }) => {
26 | const className = classNames({
27 | copied: justCopied === name,
28 | [theme]: !!theme,
29 | });
30 | return (
31 | {
33 | if (onSelect) {
34 | onSelect(theme, name);
35 | }
36 | }}>
37 |
38 | {React.createElement(allIcons[name], { className: styles.anticon })}
39 |
40 | {/*
41 | {name}
42 | */}
43 |
44 | );
45 | };
46 |
47 | export default CopyableIcon;
48 |
--------------------------------------------------------------------------------
/react-ui/src/components/IconSelector/themeIcons.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 |
4 | export const FilledIcon: React.FC = props => {
5 | const path =
6 | 'M864 64H160C107 64 64 107 64 160v' +
7 | '704c0 53 43 96 96 96h704c53 0 96-43 96-96V16' +
8 | '0c0-53-43-96-96-96z';
9 | return (
10 |
13 | );
14 | };
15 |
16 | export const OutlinedIcon: React.FC = props => {
17 | const path =
18 | 'M864 64H160C107 64 64 107 64 160v7' +
19 | '04c0 53 43 96 96 96h704c53 0 96-43 96-96V160c' +
20 | '0-53-43-96-96-96z m-12 800H172c-6.6 0-12-5.4-' +
21 | '12-12V172c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4' +
22 | ' 12 12v680c0 6.6-5.4 12-12 12z';
23 | return (
24 |
27 | );
28 | };
29 |
30 | export const TwoToneIcon: React.FC = props => {
31 | const path =
32 | 'M16 512c0 273.932 222.066 496 496 49' +
33 | '6s496-222.068 496-496S785.932 16 512 16 16 238.' +
34 | '066 16 512z m496 368V144c203.41 0 368 164.622 3' +
35 | '68 368 0 203.41-164.622 368-368 368z';
36 | return (
37 |
40 | );
41 | };
42 |
--------------------------------------------------------------------------------
/react-ui/src/enums/httpEnum.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @description: Request result set
3 | */
4 | export enum HttpResult {
5 | SUCCESS = 200,
6 | ERROR = -1,
7 | TIMEOUT = 401,
8 | TYPE = 'success',
9 | }
10 |
11 | /**
12 | * @description: request method
13 | */
14 | export enum RequestMethod {
15 | GET = 'GET',
16 | POST = 'POST',
17 | PUT = 'PUT',
18 | DELETE = 'DELETE',
19 | }
20 |
21 | /**
22 | * @description: contentType
23 | */
24 | export enum ContentType {
25 | // json
26 | JSON = 'application/json;charset=UTF-8',
27 | // form-data qs
28 | FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
29 | // form-data upload
30 | FORM_DATA = 'multipart/form-data;charset=UTF-8',
31 | }
32 |
--------------------------------------------------------------------------------
/react-ui/src/enums/pagesEnums.ts:
--------------------------------------------------------------------------------
1 |
2 | export enum PageEnum {
3 | LOGIN = '/user/login'
4 | }
--------------------------------------------------------------------------------
/react-ui/src/global.less:
--------------------------------------------------------------------------------
1 | html,
2 | body,
3 | #root {
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
8 | 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
9 | 'Noto Color Emoji';
10 | }
11 |
12 | .colorWeak {
13 | filter: invert(80%);
14 | }
15 |
16 | .ant-layout {
17 | min-height: 100vh;
18 | }
19 | .ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
20 | left: unset;
21 | }
22 |
23 | canvas {
24 | display: block;
25 | }
26 |
27 | body {
28 | text-rendering: optimizeLegibility;
29 | -webkit-font-smoothing: antialiased;
30 | -moz-osx-font-smoothing: grayscale;
31 | }
32 |
33 | ul,
34 | ol {
35 | list-style: none;
36 | }
37 |
38 | @media (max-width: 768px) {
39 | .ant-table {
40 | width: 100%;
41 | overflow-x: auto;
42 | &-thead > tr,
43 | &-tbody > tr {
44 | > th,
45 | > td {
46 | white-space: pre;
47 | > span {
48 | display: block;
49 | }
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/react-ui/src/hooks/net/dict.ts:
--------------------------------------------------------------------------------
1 | import { getDictValueEnum } from "@/services/system/dict";
2 |
3 | export function useDictEnum(name: string)
4 | {
5 | const data = getDictValueEnum(name);
6 | return data;
7 | }
--------------------------------------------------------------------------------
/react-ui/src/locales/en-US.ts:
--------------------------------------------------------------------------------
1 | import app from './en-US/app';
2 | import component from './en-US/component';
3 | import globalHeader from './en-US/globalHeader';
4 | import menu from './en-US/menu';
5 | import pages from './en-US/pages';
6 | import pwa from './en-US/pwa';
7 | import settingDrawer from './en-US/settingDrawer';
8 | import settings from './en-US/settings';
9 |
10 | export default {
11 | 'navBar.lang': 'Languages',
12 | 'layout.user.link.help': 'Help',
13 | 'layout.user.link.privacy': 'Privacy',
14 | 'layout.user.link.terms': 'Terms',
15 | 'app.copyright.produced': 'Produced by Ant Financial Experience Department',
16 | 'app.preview.down.block': 'Download this page to your local project',
17 | 'app.welcome.link.fetch-blocks': 'Get all block',
18 | 'app.welcome.link.block-list': 'Quickly build standard, pages based on `block` development',
19 | ...app,
20 | ...globalHeader,
21 | ...menu,
22 | ...settingDrawer,
23 | ...settings,
24 | ...pwa,
25 | ...component,
26 | ...pages,
27 | };
28 |
--------------------------------------------------------------------------------
/react-ui/src/locales/en-US/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expand',
3 | 'component.tagSelect.collapse': 'Collapse',
4 | 'component.tagSelect.all': 'All',
5 | };
6 |
--------------------------------------------------------------------------------
/react-ui/src/locales/en-US/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'Search',
3 | 'component.globalHeader.search.example1': 'Search example 1',
4 | 'component.globalHeader.search.example2': 'Search example 2',
5 | 'component.globalHeader.search.example3': 'Search example 3',
6 | 'component.globalHeader.help': 'Help',
7 | 'component.globalHeader.notification': 'Notification',
8 | 'component.globalHeader.notification.empty': 'You have viewed all notifications.',
9 | 'component.globalHeader.message': 'Message',
10 | 'component.globalHeader.message.empty': 'You have viewed all messsages.',
11 | 'component.globalHeader.event': 'Event',
12 | 'component.globalHeader.event.empty': 'You have viewed all events.',
13 | 'component.noticeIcon.clear': 'Clear',
14 | 'component.noticeIcon.cleared': 'Cleared',
15 | 'component.noticeIcon.empty': 'No notifications',
16 | 'component.noticeIcon.view-more': 'View more',
17 | };
18 |
--------------------------------------------------------------------------------
/react-ui/src/locales/en-US/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'You are offline now',
3 | 'app.pwa.serviceworker.updated': 'New content is available',
4 | 'app.pwa.serviceworker.updated.hint': 'Please press the "Refresh" button to reload current page',
5 | 'app.pwa.serviceworker.updated.ok': 'Refresh',
6 | };
7 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/app.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.docs.components.icon.search.placeholder': '在此搜索图标,点击图标可复制代码',
3 | 'app.docs.components.icon.outlined': '线框风格',
4 | 'app.docs.components.icon.filled': '实底风格',
5 | 'app.docs.components.icon.two-tone': '双色风格',
6 | 'app.docs.components.icon.category.direction': '方向性图标',
7 | 'app.docs.components.icon.category.suggestion': '提示建议性图标',
8 | 'app.docs.components.icon.category.editor': '编辑类图标',
9 | 'app.docs.components.icon.category.data': '数据类图标',
10 | 'app.docs.components.icon.category.other': '网站通用图标',
11 | 'app.docs.components.icon.category.logo': '品牌和标识',
12 | 'app.docs.components.icon.pic-searcher.intro': 'AI 截图搜索上线了,快来体验吧!🎉',
13 | 'app.docs.components.icon.pic-searcher.title': '上传图片搜索图标',
14 | 'app.docs.components.icon.pic-searcher.upload-text': '点击/拖拽/粘贴上传图片',
15 | 'app.docs.components.icon.pic-searcher.upload-hint':
16 | '我们会通过上传的图片进行匹配,得到最相似的图标',
17 | 'app.docs.components.icon.pic-searcher.server-error': '识别服务暂不可用',
18 | 'app.docs.components.icon.pic-searcher.matching': '匹配中...',
19 | 'app.docs.components.icon.pic-searcher.modelloading': '神经网络模型加载中...',
20 | 'app.docs.components.icon.pic-searcher.result-tip': '为您匹配到以下图标:',
21 | 'app.docs.components.icon.pic-searcher.th-icon': '图标',
22 | 'app.docs.components.icon.pic-searcher.th-score': '匹配度',
23 | };
24 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展开',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': '站内搜索',
3 | 'component.globalHeader.search.example1': '搜索提示一',
4 | 'component.globalHeader.search.example2': '搜索提示二',
5 | 'component.globalHeader.search.example3': '搜索提示三',
6 | 'component.globalHeader.help': '使用文档',
7 | 'component.globalHeader.notification': '通知',
8 | 'component.globalHeader.notification.empty': '你已查看所有通知',
9 | 'component.globalHeader.message': '消息',
10 | 'component.globalHeader.message.empty': '您已读完所有消息',
11 | 'component.globalHeader.event': '待办',
12 | 'component.globalHeader.event.empty': '你已完成所有待办',
13 | 'component.noticeIcon.clear': '清空',
14 | 'component.noticeIcon.cleared': '清空了',
15 | 'component.noticeIcon.empty': '暂无数据',
16 | 'component.noticeIcon.view-more': '查看更多',
17 | };
18 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/job-log.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 定时任务调度日志
3 | *
4 | * @author whiteshader
5 | * @date 2023-02-07
6 | */
7 |
8 | export default {
9 | 'monitor.job.log.title': '定时任务调度日志',
10 | 'monitor.job.log.job_log_id': '任务日志编号',
11 | 'monitor.job.log.job_name': '任务名称',
12 | 'monitor.job.log.job_group': '任务组名',
13 | 'monitor.job.log.invoke_target': '调用方法',
14 | 'monitor.job.log.job_message': '日志信息',
15 | 'monitor.job.log.status': '执行状态',
16 | 'monitor.job.log.exception_info': '异常信息',
17 | 'monitor.job.log.create_time': '创建时间',
18 | };
19 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/job.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 定时任务调度
3 | *
4 | * @author whiteshader@163.com
5 | * @date 2023-02-07
6 | */
7 |
8 | export default {
9 | 'monitor.job.title': '定时任务调度',
10 | 'monitor.job.job_id': '任务编号',
11 | 'monitor.job.job_name': '任务名称',
12 | 'monitor.job.job_group': '任务组名',
13 | 'monitor.job.invoke_target': '调用方法',
14 | 'monitor.job.cron_expression': 'cron执行表达式',
15 | 'monitor.job.misfire_policy': '执行策略',
16 | 'monitor.job.concurrent': '是否并发执行',
17 | 'monitor.job.next_valid_time': '下次执行时间',
18 | 'monitor.job.status': '状态',
19 | 'monitor.job.create_by': '创建者',
20 | 'monitor.job.create_time': '创建时间',
21 | 'monitor.job.update_by': '更新者',
22 | 'monitor.job.update_time': '更新时间',
23 | 'monitor.job.remark': '备注信息',
24 | 'monitor.job.detail': '任务详情',
25 | };
26 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/logininfor.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'monitor.logininfor.title': '系统访问记录',
3 | 'monitor.logininfor.info_id': '访问编号',
4 | 'monitor.logininfor.user_name': '用户账号',
5 | 'monitor.logininfor.ipaddr': '登录IP地址',
6 | 'monitor.logininfor.login_location': '登录地点',
7 | 'monitor.logininfor.browser': '浏览器类型',
8 | 'monitor.logininfor.os': '操作系统',
9 | 'monitor.logininfor.status': '登录状态',
10 | 'monitor.logininfor.msg': '提示消息',
11 | 'monitor.logininfor.login_time': '访问时间',
12 | 'monitor.logininfor.unlock': '解锁',
13 | };
14 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/onlineUser.ts:
--------------------------------------------------------------------------------
1 |
2 | /* *
3 | *
4 | * @author whiteshader@163.com
5 | * @datetime 2021/09/16
6 | *
7 | * */
8 |
9 | export default {
10 | 'monitor.online.user.id': '编号',
11 | 'monitor.online.user.token_id': '会话编号',
12 | 'monitor.online.user.user_name': '会话编号',
13 | 'monitor.online.user.ipaddr': '登录IP地址',
14 | 'monitor.online.user.login_location': '登录地点',
15 | 'monitor.online.user.browser': '浏览器类型',
16 | 'monitor.online.user.os': '操作系统',
17 | 'monitor.online.user.dept_name': '部门',
18 | 'monitor.online.user.login_time': '访问时间',
19 | 'monitor.online.user.force_logout': '强制退出',
20 | };
21 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/operlog.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'monitor.operlog.title': '操作日志记录',
3 | 'monitor.operlog.oper_id': '日志主键',
4 | 'monitor.operlog.business_type': '业务类型',
5 | 'monitor.operlog.method': '方法名称',
6 | 'monitor.operlog.request_method': '请求方式',
7 | 'monitor.operlog.operator_type': '操作类别',
8 | 'monitor.operlog.oper_name': '操作人员',
9 | 'monitor.operlog.dept_name': '部门名称',
10 | 'monitor.operlog.oper_url': '请求URL',
11 | 'monitor.operlog.oper_ip': '主机地址',
12 | 'monitor.operlog.oper_location': '操作地点',
13 | 'monitor.operlog.oper_param': '请求参数',
14 | 'monitor.operlog.json_result': '返回参数',
15 | 'monitor.operlog.status': '操作状态',
16 | 'monitor.operlog.error_msg': '错误消息',
17 | 'monitor.operlog.oper_time': '操作时间',
18 | 'monitor.operlog.module': '操作模块',
19 | };
20 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/monitor/server.ts:
--------------------------------------------------------------------------------
1 |
2 | /* *
3 | *
4 | * @author whiteshader@163.com
5 | * @datetime 2021/09/16
6 | *
7 | * */
8 |
9 | export default {
10 | 'monitor.server.cpu.cpuNum': '核心数',
11 | 'monitor.server.cpu.total': '总使用率',
12 | 'monitor.server.cpu.sys': '系统使用率',
13 | 'monitor.server.cpu.used': '用户使用率',
14 | 'monitor.server.cpu.wait': 'IO等待',
15 | 'monitor.server.cpu.free': '当前空闲率',
16 | 'monitor.server.mem.total': '总内存',
17 | 'monitor.server.mem.used': '已用内存',
18 | 'monitor.server.mem.free': '剩余内存',
19 | 'monitor.server.mem.usage': '使用率',
20 | 'monitor.server.disk.dirName': '盘符路径',
21 | 'monitor.server.disk.sysTypeName': '文件系统',
22 | 'monitor.server.disk.typeName': '盘符类型',
23 | 'monitor.server.disk.total': '总大小',
24 | 'monitor.server.disk.free': '可用大小',
25 | 'monitor.server.disk.used': '已用大小',
26 | 'monitor.server.disk.usage': '使用率',
27 | };
28 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '当前处于离线状态',
3 | 'app.pwa.serviceworker.updated': '有新内容',
4 | 'app.pwa.serviceworker.updated.hint': '请点击“刷新”按钮或者手动刷新页面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': '整体风格设置',
3 | 'app.setting.pagestyle.dark': '暗色菜单风格',
4 | 'app.setting.pagestyle.light': '亮色菜单风格',
5 | 'app.setting.content-width': '内容区域宽度',
6 | 'app.setting.content-width.fixed': '定宽',
7 | 'app.setting.content-width.fluid': '流式',
8 | 'app.setting.themecolor': '主题色',
9 | 'app.setting.themecolor.dust': '薄暮',
10 | 'app.setting.themecolor.volcano': '火山',
11 | 'app.setting.themecolor.sunset': '日暮',
12 | 'app.setting.themecolor.cyan': '明青',
13 | 'app.setting.themecolor.green': '极光绿',
14 | 'app.setting.themecolor.daybreak': '拂晓蓝(默认)',
15 | 'app.setting.themecolor.geekblue': '极客蓝',
16 | 'app.setting.themecolor.purple': '酱紫',
17 | 'app.setting.navigationmode': '导航模式',
18 | 'app.setting.sidemenu': '侧边菜单布局',
19 | 'app.setting.topmenu': '顶部菜单布局',
20 | 'app.setting.fixedheader': '固定 Header',
21 | 'app.setting.fixedsidebar': '固定侧边菜单',
22 | 'app.setting.fixedsidebar.hint': '侧边菜单布局时可配置',
23 | 'app.setting.hideheader': '下滑时隐藏 Header',
24 | 'app.setting.hideheader.hint': '固定 Header 时可配置',
25 | 'app.setting.othersettings': '其他设置',
26 | 'app.setting.weakmode': '色弱模式',
27 | 'app.setting.copy': '拷贝设置',
28 | 'app.setting.copyinfo': '拷贝成功,请到 config/defaultSettings.js 中替换默认配置',
29 | 'app.setting.production.hint':
30 | '配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件',
31 | };
32 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/config.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.config.title': '参数配置',
3 | 'system.config.config_id': '参数主键',
4 | 'system.config.config_name': '参数名称',
5 | 'system.config.config_key': '参数键名',
6 | 'system.config.config_value': '参数键值',
7 | 'system.config.config_type': '系统内置',
8 | 'system.config.create_by': '创建者',
9 | 'system.config.create_time': '创建时间',
10 | 'system.config.update_by': '更新者',
11 | 'system.config.update_time': '更新时间',
12 | 'system.config.remark': '备注',
13 | 'system.config.refreshCache': '刷新缓存',
14 | };
15 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/dept.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.dept.title': '部门',
3 | 'system.dept.dept_id': '部门id',
4 | 'system.dept.parent_id': '父部门id',
5 | 'system.dept.parent_dept': '上级部门',
6 | 'system.dept.ancestors': '祖级列表',
7 | 'system.dept.dept_name': '部门名称',
8 | 'system.dept.order_num': '显示顺序',
9 | 'system.dept.leader': '负责人',
10 | 'system.dept.phone': '联系电话',
11 | 'system.dept.email': '邮箱',
12 | 'system.dept.status': '部门状态',
13 | 'system.dept.del_flag': '删除标志',
14 | 'system.dept.create_by': '创建者',
15 | 'system.dept.create_time': '创建时间',
16 | 'system.dept.update_by': '更新者',
17 | 'system.dept.update_time': '更新时间',
18 | };
19 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/dict-data.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.dict.data.title': '字典数据',
3 | 'system.dict.data.dict_code': '字典编码',
4 | 'system.dict.data.dict_sort': '字典排序',
5 | 'system.dict.data.dict_label': '字典标签',
6 | 'system.dict.data.dict_value': '字典键值',
7 | 'system.dict.data.dict_type': '字典类型',
8 | 'system.dict.data.css_class': '样式属性',
9 | 'system.dict.data.list_class': '回显样式',
10 | 'system.dict.data.is_default': '是否默认',
11 | 'system.dict.data.status': '状态',
12 | 'system.dict.data.create_by': '创建者',
13 | 'system.dict.data.create_time': '创建时间',
14 | 'system.dict.data.update_by': '更新者',
15 | 'system.dict.data.update_time': '更新时间',
16 | 'system.dict.data.remark': '备注',
17 | };
18 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/dict.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.dict.title': '字典类型',
3 | 'system.dict.dict_id': '字典主键',
4 | 'system.dict.dict_name': '字典名称',
5 | 'system.dict.dict_type': '字典类型',
6 | 'system.dict.status': '状态',
7 | 'system.dict.create_by': '创建者',
8 | 'system.dict.create_time': '创建时间',
9 | 'system.dict.update_by': '更新者',
10 | 'system.dict.update_time': '更新时间',
11 | 'system.dict.remark': '备注',
12 | };
13 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.menu.title': '菜单权限',
3 | 'system.menu.menu_id': '菜单编号',
4 | 'system.menu.menu_name': '菜单名称',
5 | 'system.menu.parent_id': '上级菜单',
6 | 'system.menu.order_num': '显示顺序',
7 | 'system.menu.path': '路由地址',
8 | 'system.menu.component': '组件路径',
9 | 'system.menu.query': '路由参数',
10 | 'system.menu.is_frame': '是否为外链',
11 | 'system.menu.is_cache': '是否缓存',
12 | 'system.menu.menu_type': '菜单类型',
13 | 'system.menu.visible': '显示状态',
14 | 'system.menu.status': '菜单状态',
15 | 'system.menu.perms': '权限标识',
16 | 'system.menu.icon': '菜单图标',
17 | 'system.menu.create_by': '创建者',
18 | 'system.menu.create_time': '创建时间',
19 | 'system.menu.update_by': '更新者',
20 | 'system.menu.update_time': '更新时间',
21 | 'system.menu.remark': '备注',
22 | };
23 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/notice.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.notice.title': '通知公告',
3 | 'system.notice.notice_id': '公告编号',
4 | 'system.notice.notice_title': '公告标题',
5 | 'system.notice.notice_type': '公告类型',
6 | 'system.notice.notice_content': '公告内容',
7 | 'system.notice.status': '公告状态',
8 | 'system.notice.create_by': '创建者',
9 | 'system.notice.create_time': '创建时间',
10 | 'system.notice.update_by': '更新者',
11 | 'system.notice.update_time': '更新时间',
12 | 'system.notice.remark': '备注',
13 | };
14 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/post.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.post.title': '岗位信息',
3 | 'system.post.post_id': '岗位编号',
4 | 'system.post.post_code': '岗位编码',
5 | 'system.post.post_name': '岗位名称',
6 | 'system.post.post_sort': '显示顺序',
7 | 'system.post.status': '状态',
8 | 'system.post.create_by': '创建者',
9 | 'system.post.create_time': '创建时间',
10 | 'system.post.update_by': '更新者',
11 | 'system.post.update_time': '更新时间',
12 | 'system.post.remark': '备注',
13 | };
14 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/role.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.role.title': '角色信息',
3 | 'system.role.role_id': '角色编号',
4 | 'system.role.role_name': '角色名称',
5 | 'system.role.role_key': '权限字符',
6 | 'system.role.role_sort': '显示顺序',
7 | 'system.role.data_scope': '数据范围',
8 | 'system.role.menu_check_strictly': '菜单树选择项是否关联显示',
9 | 'system.role.dept_check_strictly': '部门树选择项是否关联显示',
10 | 'system.role.status': '角色状态',
11 | 'system.role.del_flag': '删除标志',
12 | 'system.role.create_by': '创建者',
13 | 'system.role.create_time': '创建时间',
14 | 'system.role.update_by': '更新者',
15 | 'system.role.update_time': '更新时间',
16 | 'system.role.remark': '备注',
17 | 'system.role.auth': '菜单权限',
18 | 'system.role.auth.user': '选择用户',
19 | 'system.role.auth.addUser': '添加用户',
20 | 'system.role.auth.cancelAll': '批量取消授权',
21 | };
22 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-CN/system/user.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'system.user.title': '用户信息',
3 | 'system.user.user_id': '用户编号',
4 | 'system.user.dept_name': '部门',
5 | 'system.user.user_name': '用户账号',
6 | 'system.user.nick_name': '用户昵称',
7 | 'system.user.user_type': '用户类型',
8 | 'system.user.email': '用户邮箱',
9 | 'system.user.phonenumber': '手机号码',
10 | 'system.user.sex': '用户性别',
11 | 'system.user.avatar': '头像地址',
12 | 'system.user.password': '密码',
13 | 'system.user.status': '帐号状态',
14 | 'system.user.del_flag': '删除标志',
15 | 'system.user.login_ip': '最后登录IP',
16 | 'system.user.login_date': '最后登录时间',
17 | 'system.user.create_by': '创建者',
18 | 'system.user.create_time': '创建时间',
19 | 'system.user.update_by': '更新者',
20 | 'system.user.update_time': '更新时间',
21 | 'system.user.remark': '备注',
22 | 'system.user.post': '岗位',
23 | 'system.user.role': '角色',
24 | 'system.user.auth.role': '分配角色',
25 | 'system.user.reset.password': '密码重置',
26 | 'system.user.modify_info': '编辑用户信息',
27 | 'system.user.old_password': '旧密码',
28 | 'system.user.new_password': '新密码',
29 | 'system.user.confirm_password': '确认密码',
30 | 'system.user.modify_avatar': '修改头像',
31 | };
32 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-TW.ts:
--------------------------------------------------------------------------------
1 | import component from './zh-TW/component';
2 | import globalHeader from './zh-TW/globalHeader';
3 | import menu from './zh-TW/menu';
4 | import pwa from './zh-TW/pwa';
5 | import settingDrawer from './zh-TW/settingDrawer';
6 | import settings from './zh-TW/settings';
7 |
8 | export default {
9 | 'navBar.lang': '語言',
10 | 'layout.user.link.help': '幫助',
11 | 'layout.user.link.privacy': '隱私',
12 | 'layout.user.link.terms': '條款',
13 | 'app.preview.down.block': '下載此頁面到本地項目',
14 | ...globalHeader,
15 | ...menu,
16 | ...settingDrawer,
17 | ...settings,
18 | ...pwa,
19 | ...component,
20 | };
21 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-TW/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展開',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-TW/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': '站內搜索',
3 | 'component.globalHeader.search.example1': '搜索提示壹',
4 | 'component.globalHeader.search.example2': '搜索提示二',
5 | 'component.globalHeader.search.example3': '搜索提示三',
6 | 'component.globalHeader.help': '使用手冊',
7 | 'component.globalHeader.notification': '通知',
8 | 'component.globalHeader.notification.empty': '妳已查看所有通知',
9 | 'component.globalHeader.message': '消息',
10 | 'component.globalHeader.message.empty': '您已讀完所有消息',
11 | 'component.globalHeader.event': '待辦',
12 | 'component.globalHeader.event.empty': '妳已完成所有待辦',
13 | 'component.noticeIcon.clear': '清空',
14 | 'component.noticeIcon.cleared': '清空了',
15 | 'component.noticeIcon.empty': '暫無資料',
16 | 'component.noticeIcon.view-more': '查看更多',
17 | };
18 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-TW/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '當前處於離線狀態',
3 | 'app.pwa.serviceworker.updated': '有新內容',
4 | 'app.pwa.serviceworker.updated.hint': '請點擊“刷新”按鈕或者手動刷新頁面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/react-ui/src/locales/zh-TW/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': '整體風格設置',
3 | 'app.setting.pagestyle.dark': '暗色菜單風格',
4 | 'app.setting.pagestyle.light': '亮色菜單風格',
5 | 'app.setting.content-width': '內容區域寬度',
6 | 'app.setting.content-width.fixed': '定寬',
7 | 'app.setting.content-width.fluid': '流式',
8 | 'app.setting.themecolor': '主題色',
9 | 'app.setting.themecolor.dust': '薄暮',
10 | 'app.setting.themecolor.volcano': '火山',
11 | 'app.setting.themecolor.sunset': '日暮',
12 | 'app.setting.themecolor.cyan': '明青',
13 | 'app.setting.themecolor.green': '極光綠',
14 | 'app.setting.themecolor.daybreak': '拂曉藍(默認)',
15 | 'app.setting.themecolor.geekblue': '極客藍',
16 | 'app.setting.themecolor.purple': '醬紫',
17 | 'app.setting.navigationmode': '導航模式',
18 | 'app.setting.sidemenu': '側邊菜單布局',
19 | 'app.setting.topmenu': '頂部菜單布局',
20 | 'app.setting.fixedheader': '固定 Header',
21 | 'app.setting.fixedsidebar': '固定側邊菜單',
22 | 'app.setting.fixedsidebar.hint': '側邊菜單布局時可配置',
23 | 'app.setting.hideheader': '下滑時隱藏 Header',
24 | 'app.setting.hideheader.hint': '固定 Header 時可配置',
25 | 'app.setting.othersettings': '其他設置',
26 | 'app.setting.weakmode': '色弱模式',
27 | 'app.setting.copy': '拷貝設置',
28 | 'app.setting.copyinfo': '拷貝成功,請到 config/defaultSettings.js 中替換默認配置',
29 | 'app.setting.production.hint':
30 | '配置欄只在開發環境用於預覽,生產環境不會展現,請拷貝後手動修改配置文件',
31 | };
32 |
--------------------------------------------------------------------------------
/react-ui/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ant Design Pro",
3 | "short_name": "Ant Design Pro",
4 | "display": "standalone",
5 | "start_url": "./?utm_source=homescreen",
6 | "theme_color": "#002140",
7 | "background_color": "#001529",
8 | "icons": [
9 | {
10 | "src": "icons/icon-192x192.png",
11 | "sizes": "192x192"
12 | },
13 | {
14 | "src": "icons/icon-128x128.png",
15 | "sizes": "128x128"
16 | },
17 | {
18 | "src": "icons/icon-512x512.png",
19 | "sizes": "512x512"
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/react-ui/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import { history } from '@umijs/max';
2 | import { Button, Result } from 'antd';
3 | import React from 'react';
4 |
5 | const NoFoundPage: React.FC = () => (
6 | history.push('/')}>
12 | Back Home
13 |
14 | }
15 | />
16 | );
17 |
18 | export default NoFoundPage;
19 |
--------------------------------------------------------------------------------
/react-ui/src/pages/Tool/Gen/locales/zh-CN.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'gen.import': '导入',
3 | 'gen.title': '表信息',
4 | 'gen.goback': '返回',
5 | 'gen.submit': '提交',
6 | 'gen.gencode': '生成',
7 | 'gen.preview': '预览',
8 | };
9 |
--------------------------------------------------------------------------------
/react-ui/src/pages/Tool/Gen/style.less:
--------------------------------------------------------------------------------
1 | .steps:global(.ant-steps) {
2 | max-width: 750px;
3 | margin: 16px auto;
4 | }
5 |
--------------------------------------------------------------------------------
/react-ui/src/pages/Tool/Swagger/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react';
2 |
3 | /**
4 | *
5 | * @author whiteshader@163.com
6 | *
7 | * */
8 |
9 | const CacheInfo: React.FC = () => {
10 | useEffect(() => {
11 | const frame = document.getElementById('bdIframe');
12 | if (frame) {
13 | const deviceWidth = document.documentElement.clientWidth;
14 | const deviceHeight = document.documentElement.clientHeight;
15 | frame.style.width = `${Number(deviceWidth) - 260}px`;
16 | frame.style.height = `${Number(deviceHeight) - 120}px`;
17 | }
18 | });
19 |
20 | return (
21 |
22 |
27 |
28 | );
29 | };
30 |
31 | export default CacheInfo;
32 |
--------------------------------------------------------------------------------
/react-ui/src/pages/User/Center/Center.less:
--------------------------------------------------------------------------------
1 |
2 | .avatarHolder {
3 | margin-bottom: 16px;
4 | text-align: center;
5 | position: relative;
6 | display: inline-block;
7 | height: 120px;
8 |
9 | & > img {
10 | width: 120px;
11 | height: 120px;
12 | margin-bottom: 20px;
13 | border-radius: 50%;
14 | }
15 | &:hover:after {
16 | position: absolute;
17 | top: 0;
18 | right: 0;
19 | bottom: 0;
20 | left: 0;
21 | color: #eee;
22 | font-size: 24px;
23 | font-style: normal;
24 | line-height: 110px;
25 | background: rgba(0, 0, 0, 0.5);
26 | border-radius: 50%;
27 | cursor: pointer;
28 | content: '+';
29 | -webkit-font-smoothing: antialiased;
30 | -moz-osx-font-smoothing: grayscale;
31 | }
32 | }
33 |
34 | .teamTitle {
35 | margin-bottom: 12px;
36 | color: @heading-color;
37 | font-weight: 500;
38 | }
39 |
40 | .team {
41 | :global {
42 | .ant-avatar {
43 | margin-right: 12px;
44 | }
45 | }
46 |
47 | a {
48 | display: block;
49 | margin-bottom: 24px;
50 | overflow: hidden;
51 | color: @text-color;
52 | white-space: nowrap;
53 | text-overflow: ellipsis;
54 | word-break: break-all;
55 | transition: color 0.3s;
56 |
57 | &:hover {
58 | color: @primary-color;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/react-ui/src/pages/User/Center/components/AvatarCropper/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/src/pages/User/Center/components/AvatarCropper/images/bg.png
--------------------------------------------------------------------------------
/react-ui/src/pages/User/Center/components/AvatarCropper/index.less:
--------------------------------------------------------------------------------
1 | .avatarPreview {
2 | position: absolute;
3 | top: 50%;
4 | transform: translate(50%, -50%);
5 | width: 200px;
6 | height: 200px;
7 | border-radius: 50%;
8 | box-shadow: 0 0 4px #ccc;
9 | overflow: hidden;
10 | }
--------------------------------------------------------------------------------
/react-ui/src/pages/User/Settings/index.tsx:
--------------------------------------------------------------------------------
1 | import { PageContainer } from '@ant-design/pro-components';
2 | import { Card } from 'antd';
3 | import React from 'react';
4 |
5 | /**
6 | *
7 | * @author whiteshader@163.com
8 | *
9 | * */
10 |
11 |
12 | const Settings: React.FC = () => {
13 | return (
14 |
15 |
16 |
17 | );
18 | };
19 |
20 | export default Settings;
21 |
--------------------------------------------------------------------------------
/react-ui/src/services/ant-design-pro/api.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import { request } from '@umijs/max';
4 |
5 | /** 此处后端没有提供注释 GET /api/notices */
6 | export async function getNotices(options?: { [key: string]: any }) {
7 | return request('/api/notices', {
8 | method: 'GET',
9 | ...(options || {}),
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/react-ui/src/services/ant-design-pro/index.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | // API 更新时间:
4 | // API 唯一标识:
5 | import * as api from './api';
6 | import * as login from './login';
7 | import * as rule from './rule';
8 | export default {
9 | api,
10 | login,
11 | rule,
12 | };
13 |
--------------------------------------------------------------------------------
/react-ui/src/services/ant-design-pro/login.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import { request } from '@umijs/max';
4 |
5 | /** 登录接口 POST /api/login/account */
6 | export async function login(body: API.LoginParams, options?: { [key: string]: any }) {
7 | return request('/api/login/account', {
8 | method: 'POST',
9 | headers: {
10 | 'Content-Type': 'application/json',
11 | },
12 | data: body,
13 | ...(options || {}),
14 | });
15 | }
16 |
17 | /** 发送验证码 POST /api/login/captcha */
18 | export async function getFakeCaptcha(
19 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
20 | params: API.getFakeCaptchaParams,
21 | options?: { [key: string]: any },
22 | ) {
23 | return request('/api/login/captcha', {
24 | method: 'POST',
25 | params: {
26 | ...params,
27 | },
28 | ...(options || {}),
29 | });
30 | }
31 |
32 | /** 登录接口 POST /api/login/outLogin */
33 | export async function outLogin(options?: { [key: string]: any }) {
34 | return request>('/api/login/outLogin', {
35 | method: 'POST',
36 | ...(options || {}),
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/react-ui/src/services/ant-design-pro/rule.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import { request } from '@umijs/max';
4 |
5 | /** 获取规则列表 GET /api/rule */
6 | export async function rule(
7 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
8 | params: API.ruleParams,
9 | options?: { [key: string]: any },
10 | ) {
11 | return request('/api/rule', {
12 | method: 'GET',
13 | params: {
14 | ...params,
15 | },
16 | ...(options || {}),
17 | });
18 | }
19 |
20 | /** 新建规则 PUT /api/rule */
21 | export async function updateRule(options?: { [key: string]: any }) {
22 | return request('/api/rule', {
23 | method: 'PUT',
24 | ...(options || {}),
25 | });
26 | }
27 |
28 | /** 新建规则 POST /api/rule */
29 | export async function addRule(options?: { [key: string]: any }) {
30 | return request('/api/rule', {
31 | method: 'POST',
32 | ...(options || {}),
33 | });
34 | }
35 |
36 | /** 删除规则 DELETE /api/rule */
37 | export async function removeRule(options?: { [key: string]: any }) {
38 | return request>('/api/rule', {
39 | method: 'DELETE',
40 | ...(options || {}),
41 | });
42 | }
43 |
--------------------------------------------------------------------------------
/react-ui/src/services/monitor/cache.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 |
4 | /* *
5 | *
6 | * @author whiteshader@163.com
7 | * @datetime 2021/09/16
8 | *
9 | * */
10 |
11 |
12 | // 获取服务器信息
13 | export async function getCacheInfo() {
14 | return request('/api/monitor/cache', {
15 | method: 'GET',
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/react-ui/src/services/monitor/cachelist.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | /* *
4 | *
5 | * @author whiteshader@163.com
6 | * @datetime 2022/06/27
7 | *
8 | * */
9 |
10 |
11 | // 查询缓存名称列表
12 | export function listCacheName() {
13 | return request('/api/monitor/cache/getNames', {
14 | method: 'get'
15 | })
16 | }
17 |
18 | // 查询缓存键名列表
19 | export function listCacheKey(cacheName: string) {
20 | return request('/api/monitor/cache/getKeys/' + cacheName, {
21 | method: 'get'
22 | })
23 | }
24 |
25 | // 查询缓存内容
26 | export function getCacheValue(cacheName: string, cacheKey: string) {
27 | return request('/api/monitor/cache/getValue/' + cacheName + '/' + cacheKey, {
28 | method: 'get'
29 | })
30 | }
31 |
32 | // 清理指定名称缓存
33 | export function clearCacheName(cacheName: string) {
34 | return request('/api/monitor/cache/clearCacheName/' + cacheName, {
35 | method: 'delete'
36 | })
37 | }
38 |
39 | // 清理指定键名缓存
40 | export function clearCacheKey(cacheKey: string) {
41 | return request('/api/monitor/cache/clearCacheKey/' + cacheKey, {
42 | method: 'delete'
43 | })
44 | }
45 |
46 | // 清理全部缓存
47 | export function clearCacheAll() {
48 | return request('/api/monitor/cache/clearCacheAll', {
49 | method: 'delete'
50 | })
51 | }
52 |
--------------------------------------------------------------------------------
/react-ui/src/services/monitor/jobLog.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | /**
4 | * 定时任务调度日志 API
5 | *
6 | * @author whiteshader
7 | * @date 2023-02-07
8 | */
9 |
10 | // 查询定时任务调度日志列表
11 | export async function getJobLogList(params?: API.Monitor.JobLogListParams) {
12 | return request('/api/schedule/job/log/list', {
13 | method: 'GET',
14 | headers: {
15 | 'Content-Type': 'application/json;charset=UTF-8',
16 | },
17 | params
18 | });
19 | }
20 |
21 |
22 | // 删除定时任务调度日志
23 | export async function removeJobLog(jobLogId: string) {
24 | return request(`/api/schedule/job/log/${jobLogId}`, {
25 | method: 'DELETE'
26 | });
27 | }
28 |
29 | // 清空调度日志
30 | export function cleanJobLog() {
31 | return request('/api/schedule/job/log/clean', {
32 | method: 'delete'
33 | })
34 | }
35 |
36 | // 导出定时任务调度日志
37 | export function exportJobLog(params?: API.Monitor.JobLogListParams) {
38 | return request(`/api/schedule/job/log/export`, {
39 | method: 'GET',
40 | params
41 | });
42 | }
--------------------------------------------------------------------------------
/react-ui/src/services/monitor/online.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | /* *
4 | *
5 | * @author whiteshader@163.com
6 | * @datetime 2021/09/16
7 | *
8 | * */
9 |
10 | // 查询在线用户列表
11 | export async function getOnlineUserList(params?: API.Monitor.OnlineUserListParams) {
12 | return request('/api/system/online/list', {
13 | method: 'GET',
14 | params,
15 | });
16 | }
17 |
18 | // 强退用户
19 | export async function forceLogout(tokenId: string) {
20 | return request(`/api/system/online/${tokenId}`, {
21 | method: 'DELETE',
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/react-ui/src/services/monitor/server.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | /* *
4 | *
5 | * @author whiteshader@163.com
6 | * @datetime 2023/02/07
7 | *
8 | * */
9 |
10 |
11 | // 获取服务器信息
12 | export async function getServerInfo() {
13 | return request('/api/monitor/server', {
14 | method: 'GET',
15 | });
16 | }
17 |
--------------------------------------------------------------------------------
/react-ui/src/services/swagger/index.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | // API 更新时间:
4 | // API 唯一标识:
5 | import * as pet from './pet';
6 | import * as store from './store';
7 | import * as user from './user';
8 | export default {
9 | pet,
10 | store,
11 | user,
12 | };
13 |
--------------------------------------------------------------------------------
/react-ui/src/services/system/auth.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | export async function getCaptchaImg(params?: Record, options?: Record) {
4 | return request('/api/code', {
5 | method: 'GET',
6 | params: {
7 | ...params,
8 | },
9 | headers: {
10 | isToken: false,
11 | },
12 | ...(options || {}),
13 | });
14 | }
15 |
16 | /** 登录接口 POST /api/login/account */
17 | export async function login(body: API.LoginParams, options?: Record) {
18 | return request('/api/auth/login', {
19 | method: 'POST',
20 | headers: {
21 | isToken: false,
22 | 'Content-Type': 'application/json',
23 | },
24 | data: body,
25 | ...(options || {}),
26 | });
27 | }
28 |
29 | /** 退出登录接口 POST /api/login/outLogin */
30 | export async function logout() {
31 | return request>('/api/logout', {
32 | method: 'delete',
33 | });
34 | }
35 |
36 | // 获取手机验证码
37 | export async function getMobileCaptcha(mobile: string) {
38 | return request(`/api/login/captcha?mobile=${mobile}`);
39 | }
40 |
--------------------------------------------------------------------------------
/react-ui/src/services/system/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // 该文件由 OneAPI 自动生成,请勿手动修改!
3 |
4 | import * as Auth from './auth';
5 | import * as User from './User';
6 | import * as Dict from './dict';
7 | import * as Menu from './menu';
8 |
9 | export default {
10 | Auth,
11 | User,
12 | Dict,
13 | Menu,
14 | };
15 |
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/cacheList.d.ts:
--------------------------------------------------------------------------------
1 |
2 | /* *
3 | *
4 | * @author whiteshader@163.com
5 | * @datetime 2022/06/27
6 | *
7 | * */
8 |
9 | declare namespace API.Monitor {
10 |
11 | export type CacheContent = {
12 | cacheKey: string;
13 | cacheName: string;
14 | cacheValue: string;
15 | remark: string;
16 | };
17 |
18 | export type CacheNamesResponse = {
19 | data: CacheContent[];
20 | code: number;
21 | msg: string;
22 | };
23 |
24 | export type CacheKeysResponse = {
25 | data: string[];
26 | code: number;
27 | msg: string;
28 | };
29 |
30 | export type CacheValueResponse = {
31 | data: CacheContent;
32 | code: number;
33 | msg: string;
34 | };
35 |
36 | }
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/job.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 定时任务调度 Model Declare
3 | *
4 | * @author whiteshader@163.com
5 | * @date 2023-02-07
6 | */
7 |
8 | declare namespace API.Monitor {
9 |
10 | export interface Job {
11 | jobId: number;
12 | jobName: string;
13 | jobGroup: string;
14 | invokeTarget: string;
15 | cronExpression: string;
16 | misfirePolicy: string;
17 | concurrent: string;
18 | nextValidTime: string;
19 | status: string;
20 | createBy: string;
21 | createTime: Date;
22 | updateBy: string;
23 | updateTime: Date;
24 | remark: string;
25 | }
26 |
27 | export interface JobListParams {
28 | jobId?: string;
29 | jobName?: string;
30 | jobGroup?: string;
31 | invokeTarget?: string;
32 | cronExpression?: string;
33 | misfirePolicy?: string;
34 | concurrent?: string;
35 | status?: string;
36 | createBy?: string;
37 | createTime?: string;
38 | updateBy?: string;
39 | updateTime?: string;
40 | remark?: string;
41 | pageSize?: string;
42 | current?: string;
43 | }
44 |
45 | export interface JobInfoResult {
46 | code: number;
47 | msg: string;
48 | data: Job;
49 | }
50 |
51 | export interface JobPageResult {
52 | code: number;
53 | msg: string;
54 | total: number;
55 | rows: Array;
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/jobLog.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 定时任务调度日志 Model Declare
3 | *
4 | * @author whiteshader
5 | * @date 2023-02-07
6 | */
7 |
8 | declare namespace API.Monitor {
9 |
10 | export interface JobLog {
11 | jobLogId: number;
12 | jobName: string;
13 | jobGroup: string;
14 | invokeTarget: string;
15 | jobMessage: string;
16 | status: string;
17 | exceptionInfo: string;
18 | createTime: Date;
19 | }
20 |
21 | export interface JobLogListParams {
22 | jobLogId?: string;
23 | jobName?: string;
24 | jobGroup?: string;
25 | invokeTarget?: string;
26 | jobMessage?: string;
27 | status?: string;
28 | exceptionInfo?: string;
29 | createTime?: string;
30 | pageSize?: string;
31 | current?: string;
32 | }
33 |
34 | export interface JobLogInfoResult {
35 | code: number;
36 | msg: string;
37 | data: JobLog;
38 | }
39 |
40 | export interface JobLogPageResult {
41 | code: number;
42 | msg: string;
43 | total: number;
44 | rows: Array;
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/logininfor.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.Monitor {
3 |
4 | export interface Logininfor {
5 | infoId: number;
6 | userName: string;
7 | ipaddr: string;
8 | loginLocation: string;
9 | browser: string;
10 | os: string;
11 | status: string;
12 | msg: string;
13 | loginTime: Date;
14 | }
15 |
16 | export interface LogininforListParams {
17 | infoId?: string;
18 | userName?: string;
19 | ipaddr?: string;
20 | loginLocation?: string;
21 | browser?: string;
22 | os?: string;
23 | status?: string;
24 | msg?: string;
25 | loginTime?: string;
26 | pageSize?: string;
27 | current?: string;
28 | }
29 |
30 | export interface LogininforInfoResult {
31 | code: number;
32 | msg: string;
33 | data: Logininfor;
34 | }
35 |
36 | export interface LogininforPageResult {
37 | code: number;
38 | msg: string;
39 | total: number;
40 | rows: Array;
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/online.d.ts:
--------------------------------------------------------------------------------
1 |
2 | /* *
3 | *
4 | * @author whiteshader@163.com
5 | * @datetime 2023/02/07
6 | *
7 | * */
8 | declare namespace API.Monitor {
9 |
10 | export type OnlineUserType = {
11 | tokenId: string;
12 | userName: string;
13 | ipaddr: string;
14 | loginLocation: string;
15 | browser: string;
16 | os: string;
17 | deptName: string;
18 | loginTime: string;
19 | };
20 |
21 | export type OnlineUserListPagination = {
22 | total: number;
23 | pageSize: number;
24 | current: number;
25 | };
26 |
27 | export type OnlineUserListData = {
28 | list: OnlineUserType[];
29 | pagination: Partial;
30 | };
31 |
32 | export type OnlineUserListParams = {
33 | tokenId?: string;
34 | userName?: string;
35 | ipaddr?: string;
36 | loginLocation?: string;
37 | browser?: string;
38 | os?: string;
39 | deptName?: string;
40 | loginTime?: string;
41 | pageSize?: string;
42 | current?: string;
43 | pageNum?: string;
44 | filter?: string;
45 | sorter?: string;
46 | };
47 |
48 | export interface OnlineUserPageResult {
49 | code: number;
50 | msg: string;
51 | total: number;
52 | rows: Array;
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/react-ui/src/types/monitor/operlog.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.Monitor {
3 |
4 | export interface Operlog {
5 | operId: number;
6 | title: string;
7 | businessType: number;
8 | method: string;
9 | requestMethod: string;
10 | operatorType: number;
11 | operName: string;
12 | deptName: string;
13 | operUrl: string;
14 | operIp: string;
15 | operLocation: string;
16 | operParam: string;
17 | jsonResult: string;
18 | status: number;
19 | errorMsg: string;
20 | operTime: Date;
21 | }
22 |
23 | export interface OperlogListParams {
24 | operId?: string;
25 | title?: string;
26 | businessType?: string;
27 | method?: string;
28 | requestMethod?: string;
29 | operatorType?: string;
30 | operName?: string;
31 | deptName?: string;
32 | operUrl?: string;
33 | operIp?: string;
34 | operLocation?: string;
35 | operParam?: string;
36 | jsonResult?: string;
37 | status?: string;
38 | errorMsg?: string;
39 | operTime?: string;
40 | pageSize?: string;
41 | current?: string;
42 | }
43 |
44 | export interface OperlogInfoResult {
45 | code: number;
46 | msg: string;
47 | data: Operlog;
48 | }
49 |
50 | export interface OperlogPageResult {
51 | code: number;
52 | msg: string;
53 | total: number;
54 | rows: Array;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/react-ui/src/types/system/config.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.System {
3 |
4 | export interface Config {
5 | configId: number;
6 | configName: string;
7 | configKey: string;
8 | configValue: string;
9 | configType: string;
10 | createBy: string;
11 | createTime: Date;
12 | updateBy: string;
13 | updateTime: Date;
14 | remark: string;
15 | }
16 |
17 | export interface ConfigListParams {
18 | configId?: string;
19 | configName?: string;
20 | configKey?: string;
21 | configValue?: string;
22 | configType?: string;
23 | createBy?: string;
24 | createTime?: string;
25 | updateBy?: string;
26 | updateTime?: string;
27 | remark?: string;
28 | pageSize?: string;
29 | current?: string;
30 | }
31 |
32 | export interface ConfigInfoResult {
33 | code: number;
34 | msg: string;
35 | data: Config;
36 | }
37 |
38 | export interface ConfigPageResult {
39 | code: number;
40 | msg: string;
41 | total: number;
42 | rows: Array;
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/react-ui/src/types/system/dept.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.System {
3 |
4 | interface Dept {
5 | deptId: number;
6 | parentId: number;
7 | ancestors: string;
8 | deptName: string;
9 | orderNum: number;
10 | leader: string;
11 | phone: string;
12 | email: string;
13 | status: string;
14 | delFlag: string;
15 | createBy: string;
16 | createTime: Date;
17 | updateBy: string;
18 | updateTime: Date;
19 | }
20 |
21 | export interface DeptListParams {
22 | deptId?: string;
23 | parentId?: string;
24 | ancestors?: string;
25 | deptName?: string;
26 | orderNum?: string;
27 | leader?: string;
28 | phone?: string;
29 | email?: string;
30 | status?: string;
31 | delFlag?: string;
32 | createBy?: string;
33 | createTime?: string;
34 | updateBy?: string;
35 | updateTime?: string;
36 | pageSize?: string;
37 | current?: string;
38 | }
39 |
40 | export interface DeptInfoResult {
41 | code: number;
42 | msg: string;
43 | data: Dept;
44 | }
45 |
46 | export interface DeptPageResult {
47 | code: number;
48 | msg: string;
49 | total: number;
50 | data: Array;
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/react-ui/src/types/system/dict-data.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace API.System {
2 | interface DictData {
3 | dictCode: number;
4 | dictSort: number;
5 | dictLabel: string;
6 | dictValue: string;
7 | dictType: string;
8 | cssClass: string;
9 | listClass: string;
10 | isDefault: string;
11 | status: string;
12 | createBy: string;
13 | createTime: Date;
14 | updateBy: string;
15 | updateTime: Date;
16 | remark: string;
17 | }
18 |
19 | export interface DictDataListParams {
20 | dictCode?: string;
21 | dictSort?: string;
22 | dictLabel?: string;
23 | dictValue?: string;
24 | dictType?: string;
25 | cssClass?: string;
26 | listClass?: string;
27 | isDefault?: string;
28 | status?: string;
29 | createBy?: string;
30 | createTime?: string;
31 | updateBy?: string;
32 | updateTime?: string;
33 | remark?: string;
34 | pageSize?: string;
35 | currentPage?: string;
36 | filter?: string;
37 | sorter?: string;
38 | }
39 |
40 | export interface DictDataInfoResult {
41 | current: number;
42 | pageSize: number;
43 | total: number;
44 | data: DictData;
45 | }
46 |
47 | export interface DictDataPageResult {
48 | code: number;
49 | msg: string;
50 | total: number;
51 | rows: Array;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/react-ui/src/types/system/dict.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace API.System {
2 | export interface DictType {
3 | dictId: number;
4 | dictName: string;
5 | dictType: string;
6 | status: string;
7 | createBy: string;
8 | createTime: Date;
9 | updateBy: string;
10 | updateTime: Date;
11 | remark: string;
12 | }
13 |
14 | export interface DictTypeListParams {
15 | dictId?: string;
16 | dictName?: string;
17 | dictType?: string;
18 | status?: string;
19 | createBy?: string;
20 | createTime?: string;
21 | updateBy?: string;
22 | updateTime?: string;
23 | remark?: string;
24 | pageSize?: string;
25 | currentPage?: string;
26 | filter?: string;
27 | sorter?: string;
28 | }
29 |
30 | export interface DictTypeInfoResult {
31 | code: number;
32 | msg: string;
33 | data: Dict;
34 | }
35 |
36 | export interface DictTypePageResult {
37 | code: number;
38 | msg: string;
39 | total: number;
40 | rows: Array;
41 | }
42 |
43 | export interface DictTypeResult {
44 | code: number;
45 | msg: string;
46 | data: Array;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/react-ui/src/types/system/notice.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.System {
3 |
4 | export interface Notice {
5 | noticeId: number;
6 | noticeTitle: string;
7 | noticeType: string;
8 | noticeContent: string;
9 | status: string;
10 | createBy: string;
11 | createTime: Date;
12 | updateBy: string;
13 | updateTime: Date;
14 | remark: string;
15 | }
16 |
17 | export interface NoticeListParams {
18 | noticeId?: string;
19 | noticeTitle?: string;
20 | noticeType?: string;
21 | noticeContent?: string;
22 | status?: string;
23 | createBy?: string;
24 | createTime?: string;
25 | updateBy?: string;
26 | updateTime?: string;
27 | remark?: string;
28 | pageSize?: string;
29 | current?: string;
30 | }
31 |
32 | export interface NoticeInfoResult {
33 | code: number;
34 | msg: string;
35 | data: Notice;
36 | }
37 |
38 | export interface NoticePageResult {
39 | code: number;
40 | msg: string;
41 | total: number;
42 | rows: Array;
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/react-ui/src/types/system/post.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace API.System {
3 |
4 | interface Post {
5 | postId: number;
6 | postCode: string;
7 | postName: string;
8 | postSort: number;
9 | status: string;
10 | createBy: string;
11 | createTime: Date;
12 | updateBy: string;
13 | updateTime: Date;
14 | remark: string;
15 | }
16 |
17 | export interface PostListParams {
18 | postId?: string;
19 | postCode?: string;
20 | postName?: string;
21 | postSort?: string;
22 | status?: string;
23 | createBy?: string;
24 | createTime?: string;
25 | updateBy?: string;
26 | updateTime?: string;
27 | remark?: string;
28 | pageSize?: string;
29 | current?: string;
30 | }
31 |
32 | export interface PostInfoResult {
33 | code: number;
34 | msg: string;
35 | data: Post;
36 | }
37 |
38 | export interface PostPageResult {
39 | code: number;
40 | msg: string;
41 | total: number;
42 | rows: Array;
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/react-ui/src/types/typings.d.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/src/types/typings.d.ts
--------------------------------------------------------------------------------
/react-ui/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'slash2';
2 | declare module '*.css';
3 | declare module '*.less';
4 | declare module '*.scss';
5 | declare module '*.sass';
6 | declare module '*.svg';
7 | declare module '*.png';
8 | declare module '*.jpg';
9 | declare module '*.jpeg';
10 | declare module '*.gif';
11 | declare module '*.bmp';
12 | declare module '*.tiff';
13 | declare module 'omit.js';
14 | declare module 'numeral';
15 | declare module '@antv/data-set';
16 | declare module 'mockjs';
17 | declare module 'react-fittext';
18 | declare module 'bizcharts-plugin-slider';
19 |
20 | declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;
21 |
--------------------------------------------------------------------------------
/react-ui/src/utils/IconUtil.ts:
--------------------------------------------------------------------------------
1 | import * as AntdIcons from '@ant-design/icons';
2 | import React from 'react';
3 |
4 | const allIcons: Record = AntdIcons;
5 |
6 | export function getIcon(name: string): React.ReactNode | string {
7 | const icon = allIcons[name];
8 | return icon || '';
9 | }
10 |
11 | export function createIcon(icon: string | any): React.ReactNode | string {
12 | if (typeof icon === 'object') {
13 | return icon;
14 | }
15 | const ele = allIcons[icon];
16 | if (ele) {
17 | return React.createElement(allIcons[icon]);
18 | }
19 | return '';
20 | }
21 |
--------------------------------------------------------------------------------
/react-ui/src/utils/options.ts:
--------------------------------------------------------------------------------
1 | import { DictValueEnumObj } from "@/components/DictTag";
2 | import { ProSchemaValueEnumObj, ProSchemaValueEnumType } from "@ant-design/pro-components";
3 |
4 | export function getValueEnumLabel(options: DictValueEnumObj | ProSchemaValueEnumObj, val: string | number | undefined, defaultValue?: string) {
5 | if (val !== undefined) {
6 | const data = options[val] as ProSchemaValueEnumType;
7 | if(data) {
8 | return data.text;
9 | }
10 | }
11 | return defaultValue?defaultValue:val;
12 | }
13 |
--------------------------------------------------------------------------------
/react-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "importHelpers": true,
7 | "jsx": "preserve",
8 | "esModuleInterop": true,
9 | "sourceMap": true,
10 | "baseUrl": "./",
11 | "skipLibCheck": true,
12 | "experimentalDecorators": true,
13 | "strict": true,
14 | "resolveJsonModule": true,
15 | "allowSyntheticDefaultImports": true,
16 | "paths": {
17 | "@/*": ["./src/*"],
18 | "@@/*": ["./src/.umi/*"],
19 | "@@test/*": ["./src/.umi-test/*"]
20 | }
21 | },
22 | "include": ["./**/*.d.ts", "./**/*.ts", "./**/*.tsx"]
23 | }
24 |
--------------------------------------------------------------------------------
/react-ui/types/cache/cache.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/react-ui/types/cache/mock/mock.cache.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/react-ui/types/cache/mock/mock.cache.js
--------------------------------------------------------------------------------
/react-ui/types/route.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace API {
2 | type RoutersMenuItem = {
3 | alwaysShow?: boolean;
4 | children?: RoutersMenuItem[];
5 | component?: string;
6 | hidden?: boolean;
7 | meta: MenuItemMeta;
8 | name: string;
9 | path: string;
10 | redirect?: string;
11 | [key: string]: any;
12 | };
13 | interface GetRoutersResult {
14 | code: number;
15 | msg: string;
16 | data: RoutersMenuItem[];
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ruoyi-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.ruoyi
6 | ruoyi
7 | 3.6.3
8 |
9 | 4.0.0
10 |
11 |
12 | ruoyi-api-system
13 |
14 |
15 | ruoyi-api
16 | pom
17 |
18 |
19 | ruoyi-api系统接口
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ruoyi-api/ruoyi-api-system/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-api
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-api-system
13 |
14 |
15 | ruoyi-api-system系统接口模块
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.ruoyi
23 | ruoyi-common-core
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteFileService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.api;
2 |
3 | import org.springframework.cloud.openfeign.FeignClient;
4 | import org.springframework.http.MediaType;
5 | import org.springframework.web.bind.annotation.PostMapping;
6 | import org.springframework.web.bind.annotation.RequestPart;
7 | import org.springframework.web.multipart.MultipartFile;
8 | import com.ruoyi.common.core.constant.ServiceNameConstants;
9 | import com.ruoyi.common.core.domain.R;
10 | import com.ruoyi.system.api.domain.SysFile;
11 | import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
12 |
13 | /**
14 | * 文件服务
15 | *
16 | * @author ruoyi
17 | */
18 | @FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
19 | public interface RemoteFileService
20 | {
21 | /**
22 | * 上传文件
23 | *
24 | * @param file 文件信息
25 | * @return 结果
26 | */
27 | @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
28 | public R upload(@RequestPart(value = "file") MultipartFile file);
29 | }
30 |
--------------------------------------------------------------------------------
/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysFile.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.api.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 文件信息
8 | *
9 | * @author ruoyi
10 | */
11 | public class SysFile
12 | {
13 | /**
14 | * 文件名称
15 | */
16 | private String name;
17 |
18 | /**
19 | * 文件地址
20 | */
21 | private String url;
22 |
23 | public String getName()
24 | {
25 | return name;
26 | }
27 |
28 | public void setName(String name)
29 | {
30 | this.name = name;
31 | }
32 |
33 | public String getUrl()
34 | {
35 | return url;
36 | }
37 |
38 | public void setUrl(String url)
39 | {
40 | this.url = url;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
46 | .append("name", getName())
47 | .append("url", getUrl())
48 | .toString();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.api.factory;
2 |
3 | import org.slf4j.Logger;
4 | import org.slf4j.LoggerFactory;
5 | import org.springframework.cloud.openfeign.FallbackFactory;
6 | import org.springframework.stereotype.Component;
7 | import org.springframework.web.multipart.MultipartFile;
8 | import com.ruoyi.common.core.domain.R;
9 | import com.ruoyi.system.api.RemoteFileService;
10 | import com.ruoyi.system.api.domain.SysFile;
11 |
12 | /**
13 | * 文件服务降级处理
14 | *
15 | * @author ruoyi
16 | */
17 | @Component
18 | public class RemoteFileFallbackFactory implements FallbackFactory
19 | {
20 | private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
21 |
22 | @Override
23 | public RemoteFileService create(Throwable throwable)
24 | {
25 | log.error("文件服务调用失败:{}", throwable.getMessage());
26 | return new RemoteFileService()
27 | {
28 | @Override
29 | public R upload(MultipartFile file)
30 | {
31 | return R.fail("上传文件失败:" + throwable.getMessage());
32 | }
33 | };
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ruoyi-api/ruoyi-api-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.system.api.factory.RemoteUserFallbackFactory
2 | com.ruoyi.system.api.factory.RemoteLogFallbackFactory
3 | com.ruoyi.system.api.factory.RemoteFileFallbackFactory
4 |
--------------------------------------------------------------------------------
/ruoyi-auth/src/main/java/com/ruoyi/auth/RuoYiAuthApplication.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.auth;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6 | import com.ruoyi.common.security.annotation.EnableRyFeignClients;
7 |
8 | /**
9 | * 认证授权中心
10 | *
11 | * @author ruoyi
12 | */
13 | @EnableRyFeignClients
14 | @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
15 | public class RuoYiAuthApplication
16 | {
17 | public static void main(String[] args)
18 | {
19 | SpringApplication.run(RuoYiAuthApplication.class, args);
20 | System.out.println("(♥◠‿◠)ノ゙ 认证授权中心启动成功 ლ(´ڡ`ლ)゙ \n" +
21 | " .-------. ____ __ \n" +
22 | " | _ _ \\ \\ \\ / / \n" +
23 | " | ( ' ) | \\ _. / ' \n" +
24 | " |(_ o _) / _( )_ .' \n" +
25 | " | (_,_).' __ ___(_ o _)' \n" +
26 | " | |\\ \\ | || |(_,_)' \n" +
27 | " | | \\ `' /| `-' / \n" +
28 | " | | \\ / \\ / \n" +
29 | " ''-' `'-' `-..-' ");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ruoyi-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.auth.form;
2 |
3 | /**
4 | * 用户登录对象
5 | *
6 | * @author ruoyi
7 | */
8 | public class LoginBody
9 | {
10 | /**
11 | * 用户名
12 | */
13 | private String username;
14 |
15 | /**
16 | * 用户密码
17 | */
18 | private String password;
19 |
20 | public String getUsername()
21 | {
22 | return username;
23 | }
24 |
25 | public void setUsername(String username)
26 | {
27 | this.username = username;
28 | }
29 |
30 | public String getPassword()
31 | {
32 | return password;
33 | }
34 |
35 | public void setPassword(String password)
36 | {
37 | this.password = password;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ruoyi-auth/src/main/java/com/ruoyi/auth/form/RegisterBody.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.auth.form;
2 |
3 | /**
4 | * 用户注册对象
5 | *
6 | * @author ruoyi
7 | */
8 | public class RegisterBody extends LoginBody
9 | {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/ruoyi-auth/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ _ _
4 | (_) | | | |
5 | _ __ _ _ ___ _ _ _ ______ __ _ _ _ | |_ | |__
6 | | '__|| | | | / _ \ | | | || ||______| / _` || | | || __|| '_ \
7 | | | | |_| || (_) || |_| || | | (_| || |_| || |_ | | | |
8 | |_| \__,_| \___/ \__, ||_| \__,_| \__,_| \__||_| |_|
9 | __/ |
10 | |___/
--------------------------------------------------------------------------------
/ruoyi-auth/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9200
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-auth
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------
/ruoyi-common/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.ruoyi
6 | ruoyi
7 | 3.6.3
8 |
9 | 4.0.0
10 |
11 |
12 | ruoyi-common-log
13 | ruoyi-common-core
14 | ruoyi-common-redis
15 | ruoyi-common-seata
16 | ruoyi-common-swagger
17 | ruoyi-common-security
18 | ruoyi-common-datascope
19 | ruoyi-common-datasource
20 |
21 |
22 | ruoyi-common
23 | pom
24 |
25 |
26 | ruoyi-common通用模块
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excels.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Excel注解集
10 | *
11 | * @author ruoyi
12 | */
13 | @Target(ElementType.FIELD)
14 | @Retention(RetentionPolicy.RUNTIME)
15 | public @interface Excels
16 | {
17 | Excel[] value();
18 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ScheduleConstants.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.constant;
2 |
3 | /**
4 | * 任务调度通用常量
5 | *
6 | * @author ruoyi
7 | */
8 | public class ScheduleConstants
9 | {
10 | public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
11 |
12 | /** 执行目标key */
13 | public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
14 |
15 | /** 默认 */
16 | public static final String MISFIRE_DEFAULT = "0";
17 |
18 | /** 立即触发执行 */
19 | public static final String MISFIRE_IGNORE_MISFIRES = "1";
20 |
21 | /** 触发一次执行 */
22 | public static final String MISFIRE_FIRE_AND_PROCEED = "2";
23 |
24 | /** 不触发立即执行 */
25 | public static final String MISFIRE_DO_NOTHING = "3";
26 |
27 | public enum Status
28 | {
29 | /**
30 | * 正常
31 | */
32 | NORMAL("0"),
33 | /**
34 | * 暂停
35 | */
36 | PAUSE("1");
37 |
38 | private String value;
39 |
40 | private Status(String value)
41 | {
42 | this.value = value;
43 | }
44 |
45 | public String getValue()
46 | {
47 | return value;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/SecurityConstants.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.constant;
2 |
3 | /**
4 | * 权限相关通用常量
5 | *
6 | * @author ruoyi
7 | */
8 | public class SecurityConstants
9 | {
10 | /**
11 | * 用户ID字段
12 | */
13 | public static final String DETAILS_USER_ID = "user_id";
14 |
15 | /**
16 | * 用户名字段
17 | */
18 | public static final String DETAILS_USERNAME = "username";
19 |
20 | /**
21 | * 授权信息字段
22 | */
23 | public static final String AUTHORIZATION_HEADER = "authorization";
24 |
25 | /**
26 | * 请求来源
27 | */
28 | public static final String FROM_SOURCE = "from-source";
29 |
30 | /**
31 | * 内部请求
32 | */
33 | public static final String INNER = "inner";
34 |
35 | /**
36 | * 用户标识
37 | */
38 | public static final String USER_KEY = "user_key";
39 |
40 | /**
41 | * 登录用户
42 | */
43 | public static final String LOGIN_USER = "login_user";
44 |
45 | /**
46 | * 角色权限
47 | */
48 | public static final String ROLE_PERMISSION = "role_permission";
49 | }
50 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ServiceNameConstants.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.constant;
2 |
3 | /**
4 | * 服务名称
5 | *
6 | * @author ruoyi
7 | */
8 | public class ServiceNameConstants
9 | {
10 | /**
11 | * 认证服务的serviceid
12 | */
13 | public static final String AUTH_SERVICE = "ruoyi-auth";
14 |
15 | /**
16 | * 系统模块的serviceid
17 | */
18 | public static final String SYSTEM_SERVICE = "ruoyi-system";
19 |
20 | /**
21 | * 文件服务的serviceid
22 | */
23 | public static final String FILE_SERVICE = "ruoyi-file";
24 | }
25 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/TokenConstants.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.constant;
2 |
3 | /**
4 | * Token的Key常量
5 | *
6 | * @author ruoyi
7 | */
8 | public class TokenConstants
9 | {
10 | /**
11 | * 令牌自定义标识
12 | */
13 | public static final String AUTHENTICATION = "Authorization";
14 |
15 | /**
16 | * 令牌前缀
17 | */
18 | public static final String PREFIX = "Bearer ";
19 |
20 | /**
21 | * 令牌秘钥
22 | */
23 | public final static String SECRET = "abcdefghijklmnopqrstuvwxyz";
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/UserStatus.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.enums;
2 |
3 | /**
4 | * 用户状态
5 | *
6 | * @author ruoyi
7 | */
8 | public enum UserStatus
9 | {
10 | OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
11 |
12 | private final String code;
13 | private final String info;
14 |
15 | UserStatus(String code, String info)
16 | {
17 | this.code = code;
18 | this.info = info;
19 | }
20 |
21 | public String getCode()
22 | {
23 | return code;
24 | }
25 |
26 | public String getInfo()
27 | {
28 | return info;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/CaptchaException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 验证码错误异常类
5 | *
6 | * @author ruoyi
7 | */
8 | public class CaptchaException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public CaptchaException(String msg)
13 | {
14 | super(msg);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/CheckedException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 检查异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class CheckedException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public CheckedException(String message)
13 | {
14 | super(message);
15 | }
16 |
17 | public CheckedException(Throwable cause)
18 | {
19 | super(cause);
20 | }
21 |
22 | public CheckedException(String message, Throwable cause)
23 | {
24 | super(message, cause);
25 | }
26 |
27 | public CheckedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
28 | {
29 | super(message, cause, enableSuppression, writableStackTrace);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/DemoModeException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 演示模式异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class DemoModeException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public DemoModeException()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 全局异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class GlobalException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * 错误提示
14 | */
15 | private String message;
16 |
17 | /**
18 | * 错误明细,内部调试错误
19 | *
20 | * 和 {@link CommonResult#getDetailMessage()} 一致的设计
21 | */
22 | private String detailMessage;
23 |
24 | /**
25 | * 空构造方法,避免反序列化问题
26 | */
27 | public GlobalException()
28 | {
29 | }
30 |
31 | public GlobalException(String message)
32 | {
33 | this.message = message;
34 | }
35 |
36 | public String getDetailMessage()
37 | {
38 | return detailMessage;
39 | }
40 |
41 | public GlobalException setDetailMessage(String detailMessage)
42 | {
43 | this.detailMessage = detailMessage;
44 | return this;
45 | }
46 |
47 | @Override
48 | public String getMessage()
49 | {
50 | return message;
51 | }
52 |
53 | public GlobalException setMessage(String message)
54 | {
55 | this.message = message;
56 | return this;
57 | }
58 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/InnerAuthException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 内部认证异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class InnerAuthException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public InnerAuthException(String message)
13 | {
14 | super(message);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/PreAuthorizeException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 权限异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class PreAuthorizeException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public PreAuthorizeException()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/UtilException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception;
2 |
3 | /**
4 | * 工具类异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class UtilException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 8247610319171014183L;
11 |
12 | public UtilException(Throwable e)
13 | {
14 | super(e.getMessage(), e);
15 | }
16 |
17 | public UtilException(String message)
18 | {
19 | super(message);
20 | }
21 |
22 | public UtilException(String message, Throwable throwable)
23 | {
24 | super(message, throwable);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotLoginException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.auth;
2 |
3 | /**
4 | * 未能通过的登录认证异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class NotLoginException extends RuntimeException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public NotLoginException(String message)
13 | {
14 | super(message);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotPermissionException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.auth;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 |
5 | /**
6 | * 未能通过的权限认证异常
7 | *
8 | * @author ruoyi
9 | */
10 | public class NotPermissionException extends RuntimeException
11 | {
12 | private static final long serialVersionUID = 1L;
13 |
14 | public NotPermissionException(String permission)
15 | {
16 | super(permission);
17 | }
18 |
19 | public NotPermissionException(String[] permissions)
20 | {
21 | super(StringUtils.join(permissions, ","));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotRoleException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.auth;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 |
5 | /**
6 | * 未能通过的角色认证异常
7 | *
8 | * @author ruoyi
9 | */
10 | public class NotRoleException extends RuntimeException
11 | {
12 | private static final long serialVersionUID = 1L;
13 |
14 | public NotRoleException(String role)
15 | {
16 | super(role);
17 | }
18 |
19 | public NotRoleException(String[] roles)
20 | {
21 | super(StringUtils.join(roles, ","));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.file;
2 |
3 | import com.ruoyi.common.core.exception.base.BaseException;
4 |
5 | /**
6 | * 文件信息异常类
7 | *
8 | * @author ruoyi
9 | */
10 | public class FileException extends BaseException
11 | {
12 | private static final long serialVersionUID = 1L;
13 |
14 | public FileException(String code, Object[] args, String msg)
15 | {
16 | super("file", code, args, msg);
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileNameLengthLimitExceededException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.file;
2 |
3 | /**
4 | * 文件名称超长限制异常类
5 | *
6 | * @author ruoyi
7 | */
8 | public class FileNameLengthLimitExceededException extends FileException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public FileNameLengthLimitExceededException(int defaultFileNameLength)
13 | {
14 | super("upload.filename.exceed.length", new Object[] { defaultFileNameLength }, "the filename is too long");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileSizeLimitExceededException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.file;
2 |
3 | /**
4 | * 文件名大小限制异常类
5 | *
6 | * @author ruoyi
7 | */
8 | public class FileSizeLimitExceededException extends FileException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public FileSizeLimitExceededException(long defaultMaxSize)
13 | {
14 | super("upload.exceed.maxSize", new Object[] { defaultMaxSize }, "the filesize is too large");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/job/TaskException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.job;
2 |
3 | /**
4 | * 计划策略异常
5 | *
6 | * @author ruoyi
7 | */
8 | public class TaskException extends Exception
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | private Code code;
13 |
14 | public TaskException(String msg, Code code)
15 | {
16 | this(msg, code, null);
17 | }
18 |
19 | public TaskException(String msg, Code code, Exception nestedEx)
20 | {
21 | super(msg, nestedEx);
22 | this.code = code;
23 | }
24 |
25 | public Code getCode()
26 | {
27 | return code;
28 | }
29 |
30 | public enum Code
31 | {
32 | TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE
33 | }
34 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/CaptchaExpireException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.user;
2 |
3 | /**
4 | * 验证码失效异常类
5 | *
6 | * @author ruoyi
7 | */
8 | public class CaptchaExpireException extends UserException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public CaptchaExpireException()
13 | {
14 | super("user.jcaptcha.expire", null);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.user;
2 |
3 | import com.ruoyi.common.core.exception.base.BaseException;
4 |
5 | /**
6 | * 用户信息异常类
7 | *
8 | * @author ruoyi
9 | */
10 | public class UserException extends BaseException
11 | {
12 | private static final long serialVersionUID = 1L;
13 |
14 | public UserException(String code, Object[] args)
15 | {
16 | super("user", code, args, null);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserPasswordNotMatchException.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.exception.user;
2 |
3 | /**
4 | * 用户密码不正确或不符合规范异常类
5 | *
6 | * @author ruoyi
7 | */
8 | public class UserPasswordNotMatchException extends UserException
9 | {
10 | private static final long serialVersionUID = 1L;
11 |
12 | public UserPasswordNotMatchException()
13 | {
14 | super("user.password.not.match", null);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ExceptionUtil.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.utils;
2 |
3 | import java.io.PrintWriter;
4 | import java.io.StringWriter;
5 | import org.apache.commons.lang3.exception.ExceptionUtils;
6 |
7 | /**
8 | * 错误信息处理类。
9 | *
10 | * @author ruoyi
11 | */
12 | public class ExceptionUtil
13 | {
14 | /**
15 | * 获取exception的详细错误信息。
16 | */
17 | public static String getExceptionMessage(Throwable e)
18 | {
19 | StringWriter sw = new StringWriter();
20 | e.printStackTrace(new PrintWriter(sw, true));
21 | return sw.toString();
22 | }
23 |
24 | public static String getRootErrorMessage(Exception e)
25 | {
26 | Throwable root = ExceptionUtils.getRootCause(e);
27 | root = (root == null ? e : root);
28 | if (root == null)
29 | {
30 | return "";
31 | }
32 | String msg = root.getMessage();
33 | if (msg == null)
34 | {
35 | return "null";
36 | }
37 | return StringUtils.defaultString(msg);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.utils;
2 |
3 | import com.github.pagehelper.PageHelper;
4 | import com.ruoyi.common.core.utils.sql.SqlUtil;
5 | import com.ruoyi.common.core.web.page.PageDomain;
6 | import com.ruoyi.common.core.web.page.TableSupport;
7 |
8 | /**
9 | * 分页工具类
10 | *
11 | * @author ruoyi
12 | */
13 | public class PageUtils extends PageHelper
14 | {
15 | /**
16 | * 设置请求分页数据
17 | */
18 | public static void startPage()
19 | {
20 | PageDomain pageDomain = TableSupport.buildPageRequest();
21 | Integer pageNum = pageDomain.getPageNum();
22 | Integer pageSize = pageDomain.getPageSize();
23 | String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
24 | Boolean reasonable = pageDomain.getReasonable();
25 | PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
26 | }
27 |
28 | /**
29 | * 清理分页的线程变量
30 | */
31 | public static void clearPage()
32 | {
33 | PageHelper.clearPage();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/bean/BeanValidators.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.utils.bean;
2 |
3 | import java.util.Set;
4 | import javax.validation.ConstraintViolation;
5 | import javax.validation.ConstraintViolationException;
6 | import javax.validation.Validator;
7 |
8 | /**
9 | * bean对象属性验证
10 | *
11 | * @author ruoyi
12 | */
13 | public class BeanValidators
14 | {
15 | public static void validateWithException(Validator validator, Object object, Class>... groups)
16 | throws ConstraintViolationException
17 | {
18 | Set> constraintViolations = validator.validate(object, groups);
19 | if (!constraintViolations.isEmpty())
20 | {
21 | throw new ConstraintViolationException(constraintViolations);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelHandlerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.utils.poi;
2 |
3 | /**
4 | * Excel数据格式处理适配器
5 | *
6 | * @author ruoyi
7 | */
8 | public interface ExcelHandlerAdapter
9 | {
10 | /**
11 | * 格式化
12 | *
13 | * @param value 单元格数据值
14 | * @param args excel注解args参数组
15 | *
16 | * @return 处理后的值
17 | */
18 | Object format(Object value, String[] args);
19 | }
20 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/uuid/IdUtils.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.utils.uuid;
2 |
3 | /**
4 | * ID生成器工具类
5 | *
6 | * @author ruoyi
7 | */
8 | public class IdUtils
9 | {
10 | /**
11 | * 获取随机UUID
12 | *
13 | * @return 随机UUID
14 | */
15 | public static String randomUUID()
16 | {
17 | return UUID.randomUUID().toString();
18 | }
19 |
20 | /**
21 | * 简化的UUID,去掉了横线
22 | *
23 | * @return 简化的UUID,去掉了横线
24 | */
25 | public static String simpleUUID()
26 | {
27 | return UUID.randomUUID().toString(true);
28 | }
29 |
30 | /**
31 | * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
32 | *
33 | * @return 随机UUID
34 | */
35 | public static String fastUUID()
36 | {
37 | return UUID.fastUUID().toString();
38 | }
39 |
40 | /**
41 | * 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID
42 | *
43 | * @return 简化的UUID,去掉了横线
44 | */
45 | public static String fastSimpleUUID()
46 | {
47 | return UUID.fastUUID().toString(true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/xss/Xss.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.xss;
2 |
3 | import javax.validation.Constraint;
4 | import javax.validation.Payload;
5 | import java.lang.annotation.ElementType;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | /**
11 | * 自定义xss校验注解
12 | *
13 | * @author ruoyi
14 | */
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
17 | @Constraint(validatedBy = { XssValidator.class })
18 | public @interface Xss
19 | {
20 | String message()
21 |
22 | default "不允许任何脚本运行";
23 |
24 | Class>[] groups() default {};
25 |
26 | Class extends Payload>[] payload() default {};
27 | }
28 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/xss/XssValidator.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.core.xss;
2 |
3 | import java.util.regex.Matcher;
4 | import java.util.regex.Pattern;
5 | import javax.validation.ConstraintValidator;
6 | import javax.validation.ConstraintValidatorContext;
7 | import com.ruoyi.common.core.utils.StringUtils;
8 |
9 | /**
10 | * 自定义xss校验注解实现
11 | *
12 | * @author ruoyi
13 | */
14 | public class XssValidator implements ConstraintValidator
15 | {
16 | private static final String HTML_PATTERN = "<(\\S*?)[^>]*>.*?|<.*? />";
17 |
18 | @Override
19 | public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext)
20 | {
21 | if (StringUtils.isBlank(value))
22 | {
23 | return true;
24 | }
25 | return !containsHtml(value);
26 | }
27 |
28 | public static boolean containsHtml(String value)
29 | {
30 | Pattern pattern = Pattern.compile(HTML_PATTERN);
31 | Matcher matcher = pattern.matcher(value);
32 | return matcher.matches();
33 | }
34 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.common.core.utils.SpringUtils
2 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datascope/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-datascope
13 |
14 |
15 | ruoyi-common-datascope权限范围
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.ruoyi
23 | ruoyi-common-security
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/annotation/DataScope.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.datascope.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | /**
10 | * 数据权限过滤注解
11 | *
12 | * @author ruoyi
13 | */
14 | @Target(ElementType.METHOD)
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Documented
17 | public @interface DataScope
18 | {
19 | /**
20 | * 部门表的别名
21 | */
22 | public String deptAlias() default "";
23 |
24 | /**
25 | * 用户表的别名
26 | */
27 | public String userAlias() default "";
28 |
29 | /**
30 | * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@RequiresPermissions获取,多个权限用逗号分隔开来
31 | */
32 | public String permission() default "";
33 | }
34 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datascope/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.common.datascope.aspect.DataScopeAspect
2 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datasource/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-datasource
13 |
14 |
15 | ruoyi-common-datasource多数据源
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.alibaba
23 | druid-spring-boot-starter
24 | ${druid.version}
25 |
26 |
27 |
28 |
29 | com.baomidou
30 | dynamic-datasource-spring-boot-starter
31 | ${dynamic-ds.version}
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/annotation/Master.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.datasource.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 | import com.baomidou.dynamic.datasource.annotation.DS;
9 |
10 | /**
11 | * 主库数据源
12 | *
13 | * @author ruoyi
14 | */
15 | @Target({ ElementType.TYPE, ElementType.METHOD })
16 | @Retention(RetentionPolicy.RUNTIME)
17 | @Documented
18 | @DS("master")
19 | public @interface Master
20 | {
21 |
22 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/annotation/Slave.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.datasource.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 | import com.baomidou.dynamic.datasource.annotation.DS;
9 |
10 | /**
11 | * 从库数据源
12 | *
13 | * @author ruoyi
14 | */
15 | @Target({ ElementType.TYPE, ElementType.METHOD })
16 | @Retention(RetentionPolicy.RUNTIME)
17 | @Documented
18 | @DS("slave")
19 | public @interface Slave
20 | {
21 |
22 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-log
13 |
14 |
15 | ruoyi-common-log日志记录
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.ruoyi
23 | ruoyi-common-security
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/annotation/Log.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 | import com.ruoyi.common.log.enums.BusinessType;
9 | import com.ruoyi.common.log.enums.OperatorType;
10 |
11 | /**
12 | * 自定义操作日志记录注解
13 | *
14 | * @author ruoyi
15 | *
16 | */
17 | @Target({ ElementType.PARAMETER, ElementType.METHOD })
18 | @Retention(RetentionPolicy.RUNTIME)
19 | @Documented
20 | public @interface Log
21 | {
22 | /**
23 | * 模块
24 | */
25 | public String title() default "";
26 |
27 | /**
28 | * 功能
29 | */
30 | public BusinessType businessType() default BusinessType.OTHER;
31 |
32 | /**
33 | * 操作人类别
34 | */
35 | public OperatorType operatorType() default OperatorType.MANAGE;
36 |
37 | /**
38 | * 是否保存请求的参数
39 | */
40 | public boolean isSaveRequestData() default true;
41 |
42 | /**
43 | * 是否保存响应的参数
44 | */
45 | public boolean isSaveResponseData() default true;
46 |
47 | /**
48 | * 排除指定的请求参数
49 | */
50 | public String[] excludeParamNames() default {};
51 | }
52 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/enums/BusinessStatus.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.enums;
2 |
3 | /**
4 | * 操作状态
5 | *
6 | * @author ruoyi
7 | *
8 | */
9 | public enum BusinessStatus
10 | {
11 | /**
12 | * 成功
13 | */
14 | SUCCESS,
15 |
16 | /**
17 | * 失败
18 | */
19 | FAIL,
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/enums/BusinessType.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.enums;
2 |
3 | /**
4 | * 业务操作类型
5 | *
6 | * @author ruoyi
7 | */
8 | public enum BusinessType
9 | {
10 | /**
11 | * 其它
12 | */
13 | OTHER,
14 |
15 | /**
16 | * 新增
17 | */
18 | INSERT,
19 |
20 | /**
21 | * 修改
22 | */
23 | UPDATE,
24 |
25 | /**
26 | * 删除
27 | */
28 | DELETE,
29 |
30 | /**
31 | * 授权
32 | */
33 | GRANT,
34 |
35 | /**
36 | * 导出
37 | */
38 | EXPORT,
39 |
40 | /**
41 | * 导入
42 | */
43 | IMPORT,
44 |
45 | /**
46 | * 强退
47 | */
48 | FORCE,
49 |
50 | /**
51 | * 生成代码
52 | */
53 | GENCODE,
54 |
55 | /**
56 | * 清空数据
57 | */
58 | CLEAN,
59 | }
60 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/enums/OperatorType.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.enums;
2 |
3 | /**
4 | * 操作人类别
5 | *
6 | * @author ruoyi
7 | */
8 | public enum OperatorType
9 | {
10 | /**
11 | * 其它
12 | */
13 | OTHER,
14 |
15 | /**
16 | * 后台用户
17 | */
18 | MANAGE,
19 |
20 | /**
21 | * 手机端用户
22 | */
23 | MOBILE
24 | }
25 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/filter/PropertyPreExcludeFilter.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.filter;
2 |
3 | import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
4 |
5 | /**
6 | * 排除JSON敏感属性
7 | *
8 | * @author ruoyi
9 | */
10 | public class PropertyPreExcludeFilter extends SimplePropertyPreFilter
11 | {
12 | public PropertyPreExcludeFilter()
13 | {
14 | }
15 |
16 | public PropertyPreExcludeFilter addExcludes(String... filters)
17 | {
18 | for (int i = 0; i < filters.length; i++)
19 | {
20 | this.getExcludes().add(filters[i]);
21 | }
22 | return this;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.log.service;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.scheduling.annotation.Async;
5 | import org.springframework.stereotype.Service;
6 | import com.ruoyi.common.core.constant.SecurityConstants;
7 | import com.ruoyi.system.api.RemoteLogService;
8 | import com.ruoyi.system.api.domain.SysOperLog;
9 |
10 | /**
11 | * 异步调用日志服务
12 | *
13 | * @author ruoyi
14 | */
15 | @Service
16 | public class AsyncLogService
17 | {
18 | @Autowired
19 | private RemoteLogService remoteLogService;
20 |
21 | /**
22 | * 保存系统日志记录
23 | */
24 | @Async
25 | public void saveSysLog(SysOperLog sysOperLog) throws Exception
26 | {
27 | remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.common.log.service.AsyncLogService
2 | com.ruoyi.common.log.aspect.LogAspect
3 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-redis/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-redis
13 |
14 |
15 | ruoyi-common-redis缓存服务
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-data-redis
24 |
25 |
26 |
27 |
28 | com.ruoyi
29 | ruoyi-common-core
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-redis/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.common.redis.configure.RedisConfig
2 | com.ruoyi.common.redis.service.RedisService
3 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-seata/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-seata
13 |
14 |
15 | ruoyi-common-seata分布式事务
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.alibaba.cloud
23 | spring-cloud-starter-alibaba-seata
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.ruoyi
6 | ruoyi-common
7 | 3.6.3
8 |
9 | 4.0.0
10 |
11 | ruoyi-common-security
12 |
13 |
14 | ruoyi-common-security安全模块
15 |
16 |
17 |
18 |
19 |
20 |
21 | org.springframework
22 | spring-webmvc
23 |
24 |
25 |
26 |
27 | com.ruoyi
28 | ruoyi-api-system
29 |
30 |
31 |
32 |
33 | com.ruoyi
34 | ruoyi-common-redis
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/EnableCustomConfig.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 | import org.mybatis.spring.annotation.MapperScan;
10 | import org.springframework.context.annotation.EnableAspectJAutoProxy;
11 | import org.springframework.context.annotation.Import;
12 | import org.springframework.scheduling.annotation.EnableAsync;
13 | import com.ruoyi.common.security.config.ApplicationConfig;
14 | import com.ruoyi.common.security.feign.FeignAutoConfiguration;
15 |
16 | @Target(ElementType.TYPE)
17 | @Retention(RetentionPolicy.RUNTIME)
18 | @Documented
19 | @Inherited
20 | // 表示通过aop框架暴露该代理对象,AopContext能够访问
21 | @EnableAspectJAutoProxy(exposeProxy = true)
22 | // 指定要扫描的Mapper类的包的路径
23 | @MapperScan("com.ruoyi.**.mapper")
24 | // 开启线程异步执行
25 | @EnableAsync
26 | // 自动加载类
27 | @Import({ ApplicationConfig.class, FeignAutoConfiguration.class })
28 | public @interface EnableCustomConfig
29 | {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/EnableRyFeignClients.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import org.springframework.cloud.openfeign.EnableFeignClients;
4 | import java.lang.annotation.*;
5 |
6 | /**
7 | * 自定义feign注解
8 | * 添加basePackages路径
9 | *
10 | * @author ruoyi
11 | */
12 | @Target(ElementType.TYPE)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | @Documented
15 | @EnableFeignClients
16 | public @interface EnableRyFeignClients
17 | {
18 | String[] value() default {};
19 |
20 | String[] basePackages() default { "com.ruoyi" };
21 |
22 | Class>[] basePackageClasses() default {};
23 |
24 | Class>[] defaultConfiguration() default {};
25 |
26 | Class>[] clients() default {};
27 | }
28 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/InnerAuth.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import java.lang.annotation.*;
4 |
5 | /**
6 | * 内部认证注解
7 | *
8 | * @author ruoyi
9 | */
10 | @Target(ElementType.METHOD)
11 | @Retention(RetentionPolicy.RUNTIME)
12 | @Documented
13 | public @interface InnerAuth
14 | {
15 | /**
16 | * 是否校验用户信息
17 | */
18 | boolean isUser() default false;
19 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/Logical.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | /**
4 | * 权限注解的验证模式
5 | *
6 | * @author ruoyi
7 | *
8 | */
9 | public enum Logical
10 | {
11 | /**
12 | * 必须具有所有的元素
13 | */
14 | AND,
15 |
16 | /**
17 | * 只需具有其中一个元素
18 | */
19 | OR
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/RequiresLogin.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 登录认证:只有登录之后才能进入该方法
10 | *
11 | * @author ruoyi
12 | *
13 | */
14 | @Retention(RetentionPolicy.RUNTIME)
15 | @Target({ ElementType.METHOD, ElementType.TYPE })
16 | public @interface RequiresLogin
17 | {
18 | }
19 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/RequiresPermissions.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 权限认证:必须具有指定权限才能进入该方法
10 | *
11 | * @author ruoyi
12 | *
13 | */
14 | @Retention(RetentionPolicy.RUNTIME)
15 | @Target({ ElementType.METHOD, ElementType.TYPE })
16 | public @interface RequiresPermissions
17 | {
18 | /**
19 | * 需要校验的权限码
20 | */
21 | String[] value() default {};
22 |
23 | /**
24 | * 验证模式:AND | OR,默认AND
25 | */
26 | Logical logical() default Logical.AND;
27 | }
28 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/annotation/RequiresRoles.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 角色认证:必须具有指定角色标识才能进入该方法
10 | *
11 | * @author ruoyi
12 | */
13 | @Retention(RetentionPolicy.RUNTIME)
14 | @Target({ ElementType.METHOD, ElementType.TYPE })
15 | public @interface RequiresRoles
16 | {
17 | /**
18 | * 需要校验的角色标识
19 | */
20 | String[] value() default {};
21 |
22 | /**
23 | * 验证逻辑:AND | OR,默认AND
24 | */
25 | Logical logical() default Logical.AND;
26 | }
27 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/config/ApplicationConfig.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.config;
2 |
3 | import java.util.TimeZone;
4 | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
5 | import org.springframework.context.annotation.Bean;
6 |
7 | /**
8 | * 系统配置
9 | *
10 | * @author ruoyi
11 | */
12 | public class ApplicationConfig
13 | {
14 | /**
15 | * 时区配置
16 | */
17 | @Bean
18 | public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
19 | {
20 | return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/config/WebMvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.config;
2 |
3 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
5 | import com.ruoyi.common.security.interceptor.HeaderInterceptor;
6 |
7 | /**
8 | * 拦截器配置
9 | *
10 | * @author ruoyi
11 | */
12 | public class WebMvcConfig implements WebMvcConfigurer
13 | {
14 | /** 不需要拦截地址 */
15 | public static final String[] excludeUrls = { "/login", "/logout", "/refresh" };
16 |
17 | @Override
18 | public void addInterceptors(InterceptorRegistry registry)
19 | {
20 | registry.addInterceptor(getHeaderInterceptor())
21 | .addPathPatterns("/**")
22 | .excludePathPatterns(excludeUrls)
23 | .order(-10);
24 | }
25 |
26 | /**
27 | * 自定义请求头拦截器
28 | */
29 | public HeaderInterceptor getHeaderInterceptor()
30 | {
31 | return new HeaderInterceptor();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/feign/FeignAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.security.feign;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 | import feign.RequestInterceptor;
6 |
7 | /**
8 | * Feign 配置注册
9 | *
10 | * @author ruoyi
11 | **/
12 | @Configuration
13 | public class FeignAutoConfiguration
14 | {
15 | @Bean
16 | public RequestInterceptor requestInterceptor()
17 | {
18 | return new FeignRequestInterceptor();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-security/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.ruoyi.common.security.config.WebMvcConfig
2 | com.ruoyi.common.security.service.TokenService
3 | com.ruoyi.common.security.aspect.PreAuthorizeAspect
4 | com.ruoyi.common.security.aspect.InnerAuthAspect
5 | com.ruoyi.common.security.handler.GlobalExceptionHandler
6 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-swagger/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ruoyi
7 | ruoyi-common
8 | 3.6.3
9 |
10 | 4.0.0
11 |
12 | ruoyi-common-swagger
13 |
14 |
15 | ruoyi-common-swagger系统接口
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-web
24 |
25 |
26 |
27 |
28 | io.springfox
29 | springfox-swagger2
30 | ${swagger.fox.version}
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/annotation/EnableCustomSwagger2.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.swagger.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 | import org.springframework.context.annotation.Import;
10 | import com.ruoyi.common.swagger.config.SwaggerAutoConfiguration;
11 |
12 | @Target({ ElementType.TYPE })
13 | @Retention(RetentionPolicy.RUNTIME)
14 | @Documented
15 | @Inherited
16 | @Import({ SwaggerAutoConfiguration.class })
17 | public @interface EnableCustomSwagger2
18 | {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerWebConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.common.swagger.config;
2 |
3 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
5 |
6 | /**
7 | * swagger 资源映射路径
8 | *
9 | * @author ruoyi
10 | */
11 | public class SwaggerWebConfiguration implements WebMvcConfigurer
12 | {
13 | @Override
14 | public void addResourceHandlers(ResourceHandlerRegistry registry)
15 | {
16 | /** swagger-ui 地址 */
17 | registry.addResourceHandler("/swagger-ui/**")
18 | .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/");
19 | }
20 | }
--------------------------------------------------------------------------------
/ruoyi-common/ruoyi-common-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | # com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
2 | # com.ruoyi.common.swagger.config.SwaggerWebConfiguration
3 | # com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor
4 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/RuoYiGatewayApplication.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6 |
7 | /**
8 | * 网关启动程序
9 | *
10 | * @author ruoyi
11 | */
12 | @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
13 | public class RuoYiGatewayApplication
14 | {
15 | public static void main(String[] args)
16 | {
17 | SpringApplication.run(RuoYiGatewayApplication.class, args);
18 | System.out.println("(♥◠‿◠)ノ゙ 若依网关启动成功 ლ(´ڡ`ლ)゙ \n" +
19 | " .-------. ____ __ \n" +
20 | " | _ _ \\ \\ \\ / / \n" +
21 | " | ( ' ) | \\ _. / ' \n" +
22 | " |(_ o _) / _( )_ .' \n" +
23 | " | (_,_).' __ ___(_ o _)' \n" +
24 | " | |\\ \\ | || |(_,_)' \n" +
25 | " | | \\ `' /| `-' / \n" +
26 | " | | \\ / \\ / \n" +
27 | " ''-' `'-' `-..-' ");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/GatewayConfig.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.config;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 | import org.springframework.core.Ordered;
6 | import org.springframework.core.annotation.Order;
7 | import com.ruoyi.gateway.handler.SentinelFallbackHandler;
8 |
9 | /**
10 | * 网关限流配置
11 | *
12 | * @author ruoyi
13 | */
14 | @Configuration
15 | public class GatewayConfig
16 | {
17 | @Bean
18 | @Order(Ordered.HIGHEST_PRECEDENCE)
19 | public SentinelFallbackHandler sentinelGatewayExceptionHandler()
20 | {
21 | return new SentinelFallbackHandler();
22 | }
23 | }
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/RouterFunctionConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.config;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.http.MediaType;
7 | import org.springframework.web.reactive.function.server.RequestPredicates;
8 | import org.springframework.web.reactive.function.server.RouterFunction;
9 | import org.springframework.web.reactive.function.server.RouterFunctions;
10 | import com.ruoyi.gateway.handler.ValidateCodeHandler;
11 |
12 | /**
13 | * 路由配置信息
14 | *
15 | * @author ruoyi
16 | */
17 | @Configuration
18 | public class RouterFunctionConfiguration
19 | {
20 | @Autowired
21 | private ValidateCodeHandler validateCodeHandler;
22 |
23 | @SuppressWarnings("rawtypes")
24 | @Bean
25 | public RouterFunction routerFunction()
26 | {
27 | return RouterFunctions.route(
28 | RequestPredicates.GET("/code").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
29 | validateCodeHandler);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/CaptchaProperties.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.config.properties;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 | import org.springframework.cloud.context.config.annotation.RefreshScope;
5 | import org.springframework.context.annotation.Configuration;
6 |
7 | /**
8 | * 验证码配置
9 | *
10 | * @author ruoyi
11 | */
12 | @Configuration
13 | @RefreshScope
14 | @ConfigurationProperties(prefix = "security.captcha")
15 | public class CaptchaProperties
16 | {
17 | /**
18 | * 验证码开关
19 | */
20 | private Boolean enabled;
21 |
22 | /**
23 | * 验证码类型(math 数组计算 char 字符)
24 | */
25 | private String type;
26 |
27 | public Boolean getEnabled()
28 | {
29 | return enabled;
30 | }
31 |
32 | public void setEnabled(Boolean enabled)
33 | {
34 | this.enabled = enabled;
35 | }
36 |
37 | public String getType()
38 | {
39 | return type;
40 | }
41 |
42 | public void setType(String type)
43 | {
44 | this.type = type;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/IgnoreWhiteProperties.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.config.properties;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.cloud.context.config.annotation.RefreshScope;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | /**
10 | * 放行白名单配置
11 | *
12 | * @author ruoyi
13 | */
14 | @Configuration
15 | @RefreshScope
16 | @ConfigurationProperties(prefix = "security.ignore")
17 | public class IgnoreWhiteProperties
18 | {
19 | /**
20 | * 放行白名单配置,网关不校验此处的白名单
21 | */
22 | private List whites = new ArrayList<>();
23 |
24 | public List getWhites()
25 | {
26 | return whites;
27 | }
28 |
29 | public void setWhites(List whites)
30 | {
31 | this.whites = whites;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/XssProperties.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.config.properties;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.cloud.context.config.annotation.RefreshScope;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | /**
10 | * XSS跨站脚本配置
11 | *
12 | * @author ruoyi
13 | */
14 | @Configuration
15 | @RefreshScope
16 | @ConfigurationProperties(prefix = "security.xss")
17 | public class XssProperties
18 | {
19 | /**
20 | * Xss开关
21 | */
22 | private Boolean enabled;
23 |
24 | /**
25 | * 排除路径
26 | */
27 | private List excludeUrls = new ArrayList<>();
28 |
29 | public Boolean getEnabled()
30 | {
31 | return enabled;
32 | }
33 |
34 | public void setEnabled(Boolean enabled)
35 | {
36 | this.enabled = enabled;
37 | }
38 |
39 | public List getExcludeUrls()
40 | {
41 | return excludeUrls;
42 | }
43 |
44 | public void setExcludeUrls(List excludeUrls)
45 | {
46 | this.excludeUrls = excludeUrls;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/ValidateCodeService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gateway.service;
2 |
3 | import java.io.IOException;
4 | import com.ruoyi.common.core.exception.CaptchaException;
5 | import com.ruoyi.common.core.web.domain.AjaxResult;
6 |
7 | /**
8 | * 验证码处理
9 | *
10 | * @author ruoyi
11 | */
12 | public interface ValidateCodeService
13 | {
14 | /**
15 | * 生成验证码
16 | */
17 | public AjaxResult createCaptcha() throws IOException, CaptchaException;
18 |
19 | /**
20 | * 校验验证码
21 | */
22 | public void checkCaptcha(String key, String value) throws CaptchaException;
23 | }
24 |
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ _
4 | (_) | |
5 | _ __ _ _ ___ _ _ _ ______ __ _ __ _ | |_ ___ __ __ __ _ _ _
6 | | '__|| | | | / _ \ | | | || ||______| / _` | / _` || __| / _ \\ \ /\ / / / _` || | | |
7 | | | | |_| || (_) || |_| || | | (_| || (_| || |_ | __/ \ V V / | (_| || |_| |
8 | |_| \__,_| \___/ \__, ||_| \__, | \__,_| \__| \___| \_/\_/ \__,_| \__, |
9 | __/ | __/ | __/ |
10 | |___/ |___/ |___/
--------------------------------------------------------------------------------
/ruoyi-gateway/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 8080
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-gateway
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 | sentinel:
27 | # 取消控制台懒加载
28 | eager: true
29 | transport:
30 | # 控制台地址
31 | dashboard: 127.0.0.1:8718
32 | # nacos配置持久化
33 | datasource:
34 | ds1:
35 | nacos:
36 | server-addr: 127.0.0.1:8848
37 | dataId: sentinel-ruoyi-gateway
38 | groupId: DEFAULT_GROUP
39 | data-type: json
40 | rule-type: gw-flow
41 |
--------------------------------------------------------------------------------
/ruoyi-modules/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.ruoyi
6 | ruoyi
7 | 3.6.3
8 |
9 | 4.0.0
10 |
11 |
12 | ruoyi-system
13 | ruoyi-gen
14 | ruoyi-job
15 | ruoyi-file
16 |
17 |
18 | ruoyi-modules
19 | pom
20 |
21 |
22 | ruoyi-modules业务模块
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/RuoYiFileApplication.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.file;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6 | import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
7 |
8 | /**
9 | * 文件服务
10 | *
11 | * @author ruoyi
12 | */
13 | @EnableCustomSwagger2
14 | @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
15 | public class RuoYiFileApplication
16 | {
17 | public static void main(String[] args)
18 | {
19 | SpringApplication.run(RuoYiFileApplication.class, args);
20 | System.out.println("(♥◠‿◠)ノ゙ 文件服务模块启动成功 ლ(´ڡ`ლ)゙ \n" +
21 | " .-------. ____ __ \n" +
22 | " | _ _ \\ \\ \\ / / \n" +
23 | " | ( ' ) | \\ _. / ' \n" +
24 | " |(_ o _) / _( )_ .' \n" +
25 | " | (_,_).' __ ___(_ o _)' \n" +
26 | " | |\\ \\ | || |(_,_)' \n" +
27 | " | | \\ `' /| `-' / \n" +
28 | " | | \\ / \\ / \n" +
29 | " ''-' `'-' `-..-' ");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/ISysFileService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.file.service;
2 |
3 | import org.springframework.web.multipart.MultipartFile;
4 |
5 | /**
6 | * 文件上传接口
7 | *
8 | * @author ruoyi
9 | */
10 | public interface ISysFileService
11 | {
12 | /**
13 | * 文件上传接口
14 | *
15 | * @param file 上传的文件
16 | * @return 访问地址
17 | * @throws Exception
18 | */
19 | public String uploadFile(MultipartFile file) throws Exception;
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.file.service;
2 |
3 | import org.springframework.beans.factory.annotation.Value;
4 | import org.springframework.context.annotation.Primary;
5 | import org.springframework.stereotype.Service;
6 | import org.springframework.web.multipart.MultipartFile;
7 | import com.ruoyi.file.utils.FileUploadUtils;
8 |
9 | /**
10 | * 本地文件存储
11 | *
12 | * @author ruoyi
13 | */
14 | @Primary
15 | @Service
16 | public class LocalSysFileServiceImpl implements ISysFileService
17 | {
18 | /**
19 | * 资源映射路径 前缀
20 | */
21 | @Value("${file.prefix}")
22 | public String localFilePrefix;
23 |
24 | /**
25 | * 域名或本机访问地址
26 | */
27 | @Value("${file.domain}")
28 | public String domain;
29 |
30 | /**
31 | * 上传文件存储在本地的根路径
32 | */
33 | @Value("${file.path}")
34 | private String localFilePath;
35 |
36 | /**
37 | * 本地文件上传接口
38 | *
39 | * @param file 上传的文件
40 | * @return 访问地址
41 | * @throws Exception
42 | */
43 | @Override
44 | public String uploadFile(MultipartFile file) throws Exception
45 | {
46 | String name = FileUploadUtils.upload(localFilePath, file);
47 | String url = domain + localFilePrefix + name;
48 | return url;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-file/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ __ _ _
4 | (_) / _|(_)| |
5 | _ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
6 | | '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
7 | | | | |_| || (_) || |_| || | | | | || || __/
8 | |_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
9 | __/ |
10 | |___/
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9300
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-file
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/IGenTableColumnService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gen.service;
2 |
3 | import java.util.List;
4 | import com.ruoyi.gen.domain.GenTableColumn;
5 |
6 | /**
7 | * 业务字段 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface IGenTableColumnService
12 | {
13 | /**
14 | * 查询业务字段列表
15 | *
16 | * @param tableId 业务字段编号
17 | * @return 业务字段集合
18 | */
19 | public List selectGenTableColumnListByTableId(Long tableId);
20 |
21 | /**
22 | * 新增业务字段
23 | *
24 | * @param genTableColumn 业务字段信息
25 | * @return 结果
26 | */
27 | public int insertGenTableColumn(GenTableColumn genTableColumn);
28 |
29 | /**
30 | * 修改业务字段
31 | *
32 | * @param genTableColumn 业务字段信息
33 | * @return 结果
34 | */
35 | public int updateGenTableColumn(GenTableColumn genTableColumn);
36 |
37 | /**
38 | * 删除业务字段信息
39 | *
40 | * @param ids 需要删除的数据ID
41 | * @return 结果
42 | */
43 | public int deleteGenTableColumnByIds(String ids);
44 | }
45 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.gen.util;
2 |
3 | import java.util.Properties;
4 | import org.apache.velocity.app.Velocity;
5 | import com.ruoyi.common.core.constant.Constants;
6 |
7 | /**
8 | * VelocityEngine工厂
9 | *
10 | * @author ruoyi
11 | */
12 | public class VelocityInitializer
13 | {
14 | /**
15 | * 初始化vm方法
16 | */
17 | public static void initVelocity()
18 | {
19 | Properties p = new Properties();
20 | try
21 | {
22 | // 加载classpath目录下的vm文件
23 | p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
24 | // 定义字符集
25 | p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
26 | // 初始化Velocity引擎,指定配置Properties
27 | Velocity.init(p);
28 | }
29 | catch (Exception e)
30 | {
31 | throw new RuntimeException(e);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _
4 | (_)
5 | _ __ _ _ ___ _ _ _ ______ __ _ ___ _ __
6 | | '__|| | | | / _ \ | | | || ||______| / _` | / _ \| '_ \
7 | | | | |_| || (_) || |_| || | | (_| || __/| | | |
8 | |_| \__,_| \___/ \__, ||_| \__, | \___||_| |_|
9 | __/ | __/ |
10 | |___/ |___/
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9202
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-gen
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/resources/vm/js/api.js.vm:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询${functionName}列表
4 | export function list${BusinessName}(query) {
5 | return request({
6 | url: '/${moduleName}/${businessName}/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询${functionName}详细
13 | export function get${BusinessName}(${pkColumn.javaField}) {
14 | return request({
15 | url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增${functionName}
21 | export function add${BusinessName}(data) {
22 | return request({
23 | url: '/${moduleName}/${businessName}',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改${functionName}
30 | export function update${BusinessName}(data) {
31 | return request({
32 | url: '/${moduleName}/${businessName}',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除${functionName}
39 | export function del${BusinessName}(${pkColumn.javaField}) {
40 | return request({
41 | url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
42 | method: 'delete'
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whiteshader/Spring-Cloud-React-Admin/81d3bfe2f5d2e51bbbd700cfc9fcc31548372f6d/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/readme.txt
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/service/ISysJobLogService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.job.service;
2 |
3 | import java.util.List;
4 | import com.ruoyi.job.domain.SysJobLog;
5 |
6 | /**
7 | * 定时任务调度日志信息信息 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface ISysJobLogService
12 | {
13 | /**
14 | * 获取quartz调度器日志的计划任务
15 | *
16 | * @param jobLog 调度日志信息
17 | * @return 调度任务日志集合
18 | */
19 | public List selectJobLogList(SysJobLog jobLog);
20 |
21 | /**
22 | * 通过调度任务日志ID查询调度信息
23 | *
24 | * @param jobLogId 调度任务日志ID
25 | * @return 调度任务日志对象信息
26 | */
27 | public SysJobLog selectJobLogById(Long jobLogId);
28 |
29 | /**
30 | * 新增任务日志
31 | *
32 | * @param jobLog 调度日志信息
33 | */
34 | public void addJobLog(SysJobLog jobLog);
35 |
36 | /**
37 | * 批量删除调度日志信息
38 | *
39 | * @param logIds 需要删除的日志ID
40 | * @return 结果
41 | */
42 | public int deleteJobLogByIds(Long[] logIds);
43 |
44 | /**
45 | * 删除任务日志
46 | *
47 | * @param jobId 调度日志ID
48 | * @return 结果
49 | */
50 | public int deleteJobLogById(Long jobId);
51 |
52 | /**
53 | * 清空任务日志
54 | */
55 | public void cleanJobLog();
56 | }
57 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/RyTask.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.job.task;
2 |
3 | import org.springframework.stereotype.Component;
4 | import com.ruoyi.common.core.utils.StringUtils;
5 |
6 | /**
7 | * 定时任务调度测试
8 | *
9 | * @author ruoyi
10 | */
11 | @Component("ryTask")
12 | public class RyTask
13 | {
14 | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
15 | {
16 | System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
17 | }
18 |
19 | public void ryParams(String params)
20 | {
21 | System.out.println("执行有参方法:" + params);
22 | }
23 |
24 | public void ryNoParams()
25 | {
26 | System.out.println("执行无参方法");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/QuartzDisallowConcurrentExecution.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.job.util;
2 |
3 | import org.quartz.DisallowConcurrentExecution;
4 | import org.quartz.JobExecutionContext;
5 |
6 | import com.ruoyi.job.domain.SysJob;
7 |
8 | /**
9 | * 定时任务处理(禁止并发执行)
10 | *
11 | * @author ruoyi
12 | *
13 | */
14 | @DisallowConcurrentExecution
15 | public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob
16 | {
17 | @Override
18 | protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception
19 | {
20 | JobInvokeUtil.invokeMethod(sysJob);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/QuartzJobExecution.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.job.util;
2 |
3 | import org.quartz.JobExecutionContext;
4 |
5 | import com.ruoyi.job.domain.SysJob;
6 |
7 | /**
8 | * 定时任务处理(允许并发执行)
9 | *
10 | * @author ruoyi
11 | *
12 | */
13 | public class QuartzJobExecution extends AbstractQuartzJob
14 | {
15 | @Override
16 | protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception
17 | {
18 | JobInvokeUtil.invokeMethod(sysJob);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ _ _
4 | (_) (_) | |
5 | _ __ _ _ ___ _ _ _ ______ _ ___ | |__
6 | | '__|| | | | / _ \ | | | || ||______| | | / _ \ | '_ \
7 | | | | |_| || (_) || |_| || | | || (_) || |_) |
8 | |_| \__,_| \___/ \__, ||_| | | \___/ |_.__/
9 | __/ | _/ |
10 | |___/ |__/
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9203
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-job
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 角色和部门关联 sys_role_dept
8 | *
9 | * @author ruoyi
10 | */
11 | public class SysRoleDept
12 | {
13 | /** 角色ID */
14 | private Long roleId;
15 |
16 | /** 部门ID */
17 | private Long deptId;
18 |
19 | public Long getRoleId()
20 | {
21 | return roleId;
22 | }
23 |
24 | public void setRoleId(Long roleId)
25 | {
26 | this.roleId = roleId;
27 | }
28 |
29 | public Long getDeptId()
30 | {
31 | return deptId;
32 | }
33 |
34 | public void setDeptId(Long deptId)
35 | {
36 | this.deptId = deptId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("roleId", getRoleId())
43 | .append("deptId", getDeptId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 角色和菜单关联 sys_role_menu
8 | *
9 | * @author ruoyi
10 | */
11 | public class SysRoleMenu
12 | {
13 | /** 角色ID */
14 | private Long roleId;
15 |
16 | /** 菜单ID */
17 | private Long menuId;
18 |
19 | public Long getRoleId()
20 | {
21 | return roleId;
22 | }
23 |
24 | public void setRoleId(Long roleId)
25 | {
26 | this.roleId = roleId;
27 | }
28 |
29 | public Long getMenuId()
30 | {
31 | return menuId;
32 | }
33 |
34 | public void setMenuId(Long menuId)
35 | {
36 | this.menuId = menuId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("roleId", getRoleId())
43 | .append("menuId", getMenuId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 用户和岗位关联 sys_user_post
8 | *
9 | * @author ruoyi
10 | */
11 | public class SysUserPost
12 | {
13 | /** 用户ID */
14 | private Long userId;
15 |
16 | /** 岗位ID */
17 | private Long postId;
18 |
19 | public Long getUserId()
20 | {
21 | return userId;
22 | }
23 |
24 | public void setUserId(Long userId)
25 | {
26 | this.userId = userId;
27 | }
28 |
29 | public Long getPostId()
30 | {
31 | return postId;
32 | }
33 |
34 | public void setPostId(Long postId)
35 | {
36 | this.postId = postId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("userId", getUserId())
43 | .append("postId", getPostId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 用户和角色关联 sys_user_role
8 | *
9 | * @author ruoyi
10 | */
11 | public class SysUserRole
12 | {
13 | /** 用户ID */
14 | private Long userId;
15 |
16 | /** 角色ID */
17 | private Long roleId;
18 |
19 | public Long getUserId()
20 | {
21 | return userId;
22 | }
23 |
24 | public void setUserId(Long userId)
25 | {
26 | this.userId = userId;
27 | }
28 |
29 | public Long getRoleId()
30 | {
31 | return roleId;
32 | }
33 |
34 | public void setRoleId(Long roleId)
35 | {
36 | this.roleId = roleId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("userId", getUserId())
43 | .append("roleId", getRoleId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.api.domain.SysLogininfor;
5 |
6 | /**
7 | * 系统访问日志情况信息 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysLogininforMapper
12 | {
13 | /**
14 | * 新增系统登录日志
15 | *
16 | * @param logininfor 访问日志对象
17 | */
18 | public int insertLogininfor(SysLogininfor logininfor);
19 |
20 | /**
21 | * 查询系统登录日志集合
22 | *
23 | * @param logininfor 访问日志对象
24 | * @return 登录记录集合
25 | */
26 | public List selectLogininforList(SysLogininfor logininfor);
27 |
28 | /**
29 | * 批量删除系统登录日志
30 | *
31 | * @param infoIds 需要删除的登录日志ID
32 | * @return 结果
33 | */
34 | public int deleteLogininforByIds(Long[] infoIds);
35 |
36 | /**
37 | * 清空系统登录日志
38 | *
39 | * @return 结果
40 | */
41 | public int cleanLogininfor();
42 | }
43 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.domain.SysNotice;
5 |
6 | /**
7 | * 通知公告表 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysNoticeMapper
12 | {
13 | /**
14 | * 查询公告信息
15 | *
16 | * @param noticeId 公告ID
17 | * @return 公告信息
18 | */
19 | public SysNotice selectNoticeById(Long noticeId);
20 |
21 | /**
22 | * 查询公告列表
23 | *
24 | * @param notice 公告信息
25 | * @return 公告集合
26 | */
27 | public List selectNoticeList(SysNotice notice);
28 |
29 | /**
30 | * 新增公告
31 | *
32 | * @param notice 公告信息
33 | * @return 结果
34 | */
35 | public int insertNotice(SysNotice notice);
36 |
37 | /**
38 | * 修改公告
39 | *
40 | * @param notice 公告信息
41 | * @return 结果
42 | */
43 | public int updateNotice(SysNotice notice);
44 |
45 | /**
46 | * 批量删除公告
47 | *
48 | * @param noticeId 公告ID
49 | * @return 结果
50 | */
51 | public int deleteNoticeById(Long noticeId);
52 |
53 | /**
54 | * 批量删除公告信息
55 | *
56 | * @param noticeIds 需要删除的公告ID
57 | * @return 结果
58 | */
59 | public int deleteNoticeByIds(Long[] noticeIds);
60 | }
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.api.domain.SysOperLog;
5 |
6 | /**
7 | * 操作日志 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysOperLogMapper
12 | {
13 | /**
14 | * 新增操作日志
15 | *
16 | * @param operLog 操作日志对象
17 | */
18 | public int insertOperlog(SysOperLog operLog);
19 |
20 | /**
21 | * 查询系统操作日志集合
22 | *
23 | * @param operLog 操作日志对象
24 | * @return 操作日志集合
25 | */
26 | public List selectOperLogList(SysOperLog operLog);
27 |
28 | /**
29 | * 批量删除系统操作日志
30 | *
31 | * @param operIds 需要删除的操作日志ID
32 | * @return 结果
33 | */
34 | public int deleteOperLogByIds(Long[] operIds);
35 |
36 | /**
37 | * 查询操作日志详细
38 | *
39 | * @param operId 操作ID
40 | * @return 操作日志对象
41 | */
42 | public SysOperLog selectOperLogById(Long operId);
43 |
44 | /**
45 | * 清空操作日志
46 | */
47 | public void cleanOperLog();
48 | }
49 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.domain.SysRoleDept;
5 |
6 | /**
7 | * 角色与部门关联表 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysRoleDeptMapper
12 | {
13 | /**
14 | * 通过角色ID删除角色和部门关联
15 | *
16 | * @param roleId 角色ID
17 | * @return 结果
18 | */
19 | public int deleteRoleDeptByRoleId(Long roleId);
20 |
21 | /**
22 | * 批量删除角色部门关联信息
23 | *
24 | * @param ids 需要删除的数据ID
25 | * @return 结果
26 | */
27 | public int deleteRoleDept(Long[] ids);
28 |
29 | /**
30 | * 查询部门使用数量
31 | *
32 | * @param deptId 部门ID
33 | * @return 结果
34 | */
35 | public int selectCountRoleDeptByDeptId(Long deptId);
36 |
37 | /**
38 | * 批量新增角色部门信息
39 | *
40 | * @param roleDeptList 角色部门列表
41 | * @return 结果
42 | */
43 | public int batchRoleDept(List roleDeptList);
44 | }
45 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.domain.SysRoleMenu;
5 |
6 | /**
7 | * 角色与菜单关联表 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysRoleMenuMapper
12 | {
13 | /**
14 | * 查询菜单使用数量
15 | *
16 | * @param menuId 菜单ID
17 | * @return 结果
18 | */
19 | public int checkMenuExistRole(Long menuId);
20 |
21 | /**
22 | * 通过角色ID删除角色和菜单关联
23 | *
24 | * @param roleId 角色ID
25 | * @return 结果
26 | */
27 | public int deleteRoleMenuByRoleId(Long roleId);
28 |
29 | /**
30 | * 批量删除角色菜单关联信息
31 | *
32 | * @param ids 需要删除的数据ID
33 | * @return 结果
34 | */
35 | public int deleteRoleMenu(Long[] ids);
36 |
37 | /**
38 | * 批量新增角色菜单信息
39 | *
40 | * @param roleMenuList 角色菜单列表
41 | * @return 结果
42 | */
43 | public int batchRoleMenu(List roleMenuList);
44 | }
45 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.mapper;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.domain.SysUserPost;
5 |
6 | /**
7 | * 用户与岗位关联表 数据层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface SysUserPostMapper
12 | {
13 | /**
14 | * 通过用户ID删除用户和岗位关联
15 | *
16 | * @param userId 用户ID
17 | * @return 结果
18 | */
19 | public int deleteUserPostByUserId(Long userId);
20 |
21 | /**
22 | * 通过岗位ID查询岗位使用数量
23 | *
24 | * @param postId 岗位ID
25 | * @return 结果
26 | */
27 | public int countUserPostById(Long postId);
28 |
29 | /**
30 | * 批量删除用户和岗位关联
31 | *
32 | * @param ids 需要删除的数据ID
33 | * @return 结果
34 | */
35 | public int deleteUserPost(Long[] ids);
36 |
37 | /**
38 | * 批量新增用户岗位信息
39 | *
40 | * @param userPostList 用户角色列表
41 | * @return 结果
42 | */
43 | public int batchUserPost(List userPostList);
44 | }
45 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.service;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.api.domain.SysLogininfor;
5 |
6 | /**
7 | * 系统访问日志情况信息 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface ISysLogininforService
12 | {
13 | /**
14 | * 新增系统登录日志
15 | *
16 | * @param logininfor 访问日志对象
17 | */
18 | public int insertLogininfor(SysLogininfor logininfor);
19 |
20 | /**
21 | * 查询系统登录日志集合
22 | *
23 | * @param logininfor 访问日志对象
24 | * @return 登录记录集合
25 | */
26 | public List selectLogininforList(SysLogininfor logininfor);
27 |
28 | /**
29 | * 批量删除系统登录日志
30 | *
31 | * @param infoIds 需要删除的登录日志ID
32 | * @return 结果
33 | */
34 | public int deleteLogininforByIds(Long[] infoIds);
35 |
36 | /**
37 | * 清空系统登录日志
38 | */
39 | public void cleanLogininfor();
40 | }
41 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.service;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.domain.SysNotice;
5 |
6 | /**
7 | * 公告 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface ISysNoticeService
12 | {
13 | /**
14 | * 查询公告信息
15 | *
16 | * @param noticeId 公告ID
17 | * @return 公告信息
18 | */
19 | public SysNotice selectNoticeById(Long noticeId);
20 |
21 | /**
22 | * 查询公告列表
23 | *
24 | * @param notice 公告信息
25 | * @return 公告集合
26 | */
27 | public List selectNoticeList(SysNotice notice);
28 |
29 | /**
30 | * 新增公告
31 | *
32 | * @param notice 公告信息
33 | * @return 结果
34 | */
35 | public int insertNotice(SysNotice notice);
36 |
37 | /**
38 | * 修改公告
39 | *
40 | * @param notice 公告信息
41 | * @return 结果
42 | */
43 | public int updateNotice(SysNotice notice);
44 |
45 | /**
46 | * 删除公告信息
47 | *
48 | * @param noticeId 公告ID
49 | * @return 结果
50 | */
51 | public int deleteNoticeById(Long noticeId);
52 |
53 | /**
54 | * 批量删除公告信息
55 | *
56 | * @param noticeIds 需要删除的公告ID
57 | * @return 结果
58 | */
59 | public int deleteNoticeByIds(Long[] noticeIds);
60 | }
61 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.service;
2 |
3 | import java.util.List;
4 | import com.ruoyi.system.api.domain.SysOperLog;
5 |
6 | /**
7 | * 操作日志 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface ISysOperLogService
12 | {
13 | /**
14 | * 新增操作日志
15 | *
16 | * @param operLog 操作日志对象
17 | * @return 结果
18 | */
19 | public int insertOperlog(SysOperLog operLog);
20 |
21 | /**
22 | * 查询系统操作日志集合
23 | *
24 | * @param operLog 操作日志对象
25 | * @return 操作日志集合
26 | */
27 | public List selectOperLogList(SysOperLog operLog);
28 |
29 | /**
30 | * 批量删除系统操作日志
31 | *
32 | * @param operIds 需要删除的操作日志ID
33 | * @return 结果
34 | */
35 | public int deleteOperLogByIds(Long[] operIds);
36 |
37 | /**
38 | * 查询操作日志详细
39 | *
40 | * @param operId 操作ID
41 | * @return 操作日志对象
42 | */
43 | public SysOperLog selectOperLogById(Long operId);
44 |
45 | /**
46 | * 清空操作日志
47 | */
48 | public void cleanOperLog();
49 | }
50 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPermissionService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.service;
2 |
3 | import java.util.Set;
4 |
5 | import com.ruoyi.system.api.domain.SysUser;
6 |
7 | /**
8 | * 权限信息 服务层
9 | *
10 | * @author ruoyi
11 | */
12 | public interface ISysPermissionService
13 | {
14 | /**
15 | * 获取角色数据权限
16 | *
17 | * @param userId 用户Id
18 | * @return 角色权限信息
19 | */
20 | public Set getRolePermission(SysUser user);
21 |
22 | /**
23 | * 获取菜单数据权限
24 | *
25 | * @param userId 用户Id
26 | * @return 菜单权限信息
27 | */
28 | public Set getMenuPermission(SysUser user);
29 | }
30 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.system.service;
2 |
3 | import com.ruoyi.system.api.model.LoginUser;
4 | import com.ruoyi.system.domain.SysUserOnline;
5 |
6 | /**
7 | * 在线用户 服务层
8 | *
9 | * @author ruoyi
10 | */
11 | public interface ISysUserOnlineService
12 | {
13 | /**
14 | * 通过登录地址查询信息
15 | *
16 | * @param ipaddr 登录地址
17 | * @param user 用户信息
18 | * @return 在线用户信息
19 | */
20 | public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user);
21 |
22 | /**
23 | * 通过用户名称查询信息
24 | *
25 | * @param userName 用户名称
26 | * @param user 用户信息
27 | * @return 在线用户信息
28 | */
29 | public SysUserOnline selectOnlineByUserName(String userName, LoginUser user);
30 |
31 | /**
32 | * 通过登录地址/用户名称查询信息
33 | *
34 | * @param ipaddr 登录地址
35 | * @param userName 用户名称
36 | * @param user 用户信息
37 | * @return 在线用户信息
38 | */
39 | public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user);
40 |
41 | /**
42 | * 设置在线用户信息
43 | *
44 | * @param user 用户信息
45 | * @return 在线用户
46 | */
47 | public SysUserOnline loginUserToUserOnline(LoginUser user);
48 | }
49 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ _
4 | (_) | |
5 | _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
6 | | '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
7 | | | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
8 | |_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
9 | __/ | __/ |
10 | |___/ |___/
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9201
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-system
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | delete from sys_role_dept where role_id=#{roleId}
14 |
15 |
16 |
19 |
20 |
21 | delete from sys_role_dept where role_id in
22 |
23 | #{roleId}
24 |
25 |
26 |
27 |
28 | insert into sys_role_dept(role_id, dept_id) values
29 |
30 | (#{item.roleId},#{item.deptId})
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
11 |
12 |
15 |
16 |
19 |
20 |
26 |
27 |
33 |
34 |
--------------------------------------------------------------------------------
/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | delete from sys_user_post where user_id=#{userId}
14 |
15 |
16 |
19 |
20 |
21 | delete from sys_user_post where user_id in
22 |
23 | #{userId}
24 |
25 |
26 |
27 |
28 | insert into sys_user_post(user_id, post_id) values
29 |
30 | (#{item.userId},#{item.postId})
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/ruoyi-visual/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.ruoyi
6 | ruoyi
7 | 3.6.3
8 |
9 | 4.0.0
10 |
11 |
12 | ruoyi-monitor
13 |
14 |
15 | ruoyi-visual
16 | pom
17 |
18 |
19 | ruoyi-visual图形化管理模块
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ruoyi-visual/ruoyi-monitor/src/main/java/com/ruoyi/modules/monitor/RuoYiMonitorApplication.java:
--------------------------------------------------------------------------------
1 | package com.ruoyi.modules.monitor;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import de.codecentric.boot.admin.server.config.EnableAdminServer;
6 |
7 | /**
8 | * 监控中心
9 | *
10 | * @author ruoyi
11 | */
12 | @EnableAdminServer
13 | @SpringBootApplication
14 | public class RuoYiMonitorApplication
15 | {
16 | public static void main(String[] args)
17 | {
18 | SpringApplication.run(RuoYiMonitorApplication.class, args);
19 | System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" +
20 | " .-------. ____ __ \n" +
21 | " | _ _ \\ \\ \\ / / \n" +
22 | " | ( ' ) | \\ _. / ' \n" +
23 | " |(_ o _) / _( )_ .' \n" +
24 | " | (_,_).' __ ___(_ o _)' \n" +
25 | " | |\\ \\ | || |(_,_)' \n" +
26 | " | | \\ `' /| `-' / \n" +
27 | " | | \\ / \\ / \n" +
28 | " ''-' `'-' `-..-' ");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ruoyi-visual/ruoyi-monitor/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | Spring Boot Version: ${spring-boot.version}
2 | Spring Application Name: ${spring.application.name}
3 | _ _ _
4 | (_) (_)| |
5 | _ __ _ _ ___ _ _ _ ______ _ __ ___ ___ _ __ _ | |_ ___ _ __
6 | | '__|| | | | / _ \ | | | || ||______|| '_ ` _ \ / _ \ | '_ \ | || __| / _ \ | '__|
7 | | | | |_| || (_) || |_| || | | | | | | || (_) || | | || || |_ | (_) || |
8 | |_| \__,_| \___/ \__, ||_| |_| |_| |_| \___/ |_| |_||_| \__| \___/ |_|
9 | __/ |
10 | |___/
--------------------------------------------------------------------------------
/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 9100
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: ruoyi-monitor
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 127.0.0.1:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 127.0.0.1:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 |
--------------------------------------------------------------------------------