├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── bin ├── clean.bat ├── package.bat └── run.bat ├── doc └── 若依环境使用手册.docx ├── pom.xml ├── ruoyi-admin ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── ruoyi │ │ ├── RuoYiApplication.java │ │ ├── RuoYiServletInitializer.java │ │ └── web │ │ ├── controller │ │ ├── common │ │ │ ├── CaptchaController.java │ │ │ └── CommonController.java │ │ ├── monitor │ │ │ ├── CacheController.java │ │ │ ├── ServerController.java │ │ │ ├── SysLogininforController.java │ │ │ ├── SysOperlogController.java │ │ │ └── SysUserOnlineController.java │ │ ├── system │ │ │ ├── SysConfigController.java │ │ │ ├── SysDeptController.java │ │ │ ├── SysDictDataController.java │ │ │ ├── SysDictTypeController.java │ │ │ ├── SysIndexController.java │ │ │ ├── SysLoginController.java │ │ │ ├── SysMenuController.java │ │ │ ├── SysNoticeController.java │ │ │ ├── SysPostController.java │ │ │ ├── SysProfileController.java │ │ │ ├── SysRegisterController.java │ │ │ ├── SysRoleController.java │ │ │ └── SysUserController.java │ │ └── tool │ │ │ └── TestController.java │ │ └── core │ │ └── config │ │ └── SwaggerConfig.java │ └── resources │ ├── META-INF │ └── spring-devtools.properties │ ├── application-druid.yml │ ├── application.yml │ ├── banner.txt │ ├── i18n │ └── messages.properties │ ├── logback.xml │ └── mybatis │ └── mybatis-config.xml ├── ruoyi-common ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── ruoyi │ └── common │ ├── annotation │ ├── Anonymous.java │ ├── DataScope.java │ ├── DataSource.java │ ├── Excel.java │ ├── Excels.java │ ├── Log.java │ ├── RateLimiter.java │ └── RepeatSubmit.java │ ├── config │ └── RuoYiConfig.java │ ├── constant │ ├── CacheConstants.java │ ├── Constants.java │ ├── GenConstants.java │ ├── HttpStatus.java │ ├── ScheduleConstants.java │ └── UserConstants.java │ ├── core │ ├── controller │ │ └── BaseController.java │ ├── domain │ │ ├── AjaxResult.java │ │ ├── BaseEntity.java │ │ ├── R.java │ │ ├── TreeEntity.java │ │ ├── TreeSelect.java │ │ ├── entity │ │ │ ├── SysDept.java │ │ │ ├── SysDictData.java │ │ │ ├── SysDictType.java │ │ │ ├── SysMenu.java │ │ │ ├── SysRole.java │ │ │ └── SysUser.java │ │ └── model │ │ │ ├── LoginBody.java │ │ │ ├── LoginUser.java │ │ │ └── RegisterBody.java │ ├── page │ │ ├── PageDomain.java │ │ ├── TableDataInfo.java │ │ └── TableSupport.java │ ├── redis │ │ └── RedisCache.java │ └── text │ │ ├── CharsetKit.java │ │ ├── Convert.java │ │ └── StrFormatter.java │ ├── enums │ ├── BusinessStatus.java │ ├── BusinessType.java │ ├── DataSourceType.java │ ├── HttpMethod.java │ ├── LimitType.java │ ├── OperatorType.java │ └── UserStatus.java │ ├── exception │ ├── DemoModeException.java │ ├── GlobalException.java │ ├── ServiceException.java │ ├── UtilException.java │ ├── base │ │ └── BaseException.java │ ├── file │ │ ├── FileException.java │ │ ├── FileNameLengthLimitExceededException.java │ │ ├── FileSizeLimitExceededException.java │ │ ├── FileUploadException.java │ │ └── InvalidExtensionException.java │ ├── job │ │ └── TaskException.java │ └── user │ │ ├── BlackListException.java │ │ ├── CaptchaException.java │ │ ├── CaptchaExpireException.java │ │ ├── UserException.java │ │ ├── UserNotExistsException.java │ │ ├── UserPasswordNotMatchException.java │ │ └── UserPasswordRetryLimitExceedException.java │ ├── filter │ ├── PropertyPreExcludeFilter.java │ ├── RepeatableFilter.java │ ├── RepeatedlyRequestWrapper.java │ ├── XssFilter.java │ └── XssHttpServletRequestWrapper.java │ ├── utils │ ├── Arith.java │ ├── DateUtils.java │ ├── DictUtils.java │ ├── ExceptionUtil.java │ ├── LogUtils.java │ ├── MessageUtils.java │ ├── PageUtils.java │ ├── SecurityUtils.java │ ├── ServletUtils.java │ ├── StringUtils.java │ ├── Threads.java │ ├── bean │ │ ├── BeanUtils.java │ │ └── BeanValidators.java │ ├── file │ │ ├── FileTypeUtils.java │ │ ├── FileUploadUtils.java │ │ ├── FileUtils.java │ │ ├── ImageUtils.java │ │ └── MimeTypeUtils.java │ ├── html │ │ ├── EscapeUtil.java │ │ └── HTMLFilter.java │ ├── http │ │ ├── HttpHelper.java │ │ └── HttpUtils.java │ ├── ip │ │ ├── AddressUtils.java │ │ └── IpUtils.java │ ├── poi │ │ ├── ExcelHandlerAdapter.java │ │ └── ExcelUtil.java │ ├── reflect │ │ └── ReflectUtils.java │ ├── sign │ │ ├── Base64.java │ │ └── Md5Utils.java │ ├── spring │ │ └── SpringUtils.java │ ├── sql │ │ └── SqlUtil.java │ └── uuid │ │ ├── IdUtils.java │ │ ├── Seq.java │ │ └── UUID.java │ └── xss │ ├── Xss.java │ └── XssValidator.java ├── ruoyi-framework ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── ruoyi │ └── framework │ ├── aspectj │ ├── DataScopeAspect.java │ ├── DataSourceAspect.java │ ├── LogAspect.java │ └── RateLimiterAspect.java │ ├── config │ ├── ApplicationConfig.java │ ├── CaptchaConfig.java │ ├── DruidConfig.java │ ├── FastJson2JsonRedisSerializer.java │ ├── FilterConfig.java │ ├── KaptchaTextCreator.java │ ├── MyBatisConfig.java │ ├── RedisConfig.java │ ├── ResourcesConfig.java │ ├── SecurityConfig.java │ ├── ServerConfig.java │ ├── ThreadPoolConfig.java │ └── properties │ │ ├── DruidProperties.java │ │ └── PermitAllUrlProperties.java │ ├── datasource │ ├── DynamicDataSource.java │ └── DynamicDataSourceContextHolder.java │ ├── interceptor │ ├── RepeatSubmitInterceptor.java │ └── impl │ │ └── SameUrlDataInterceptor.java │ ├── manager │ ├── AsyncManager.java │ ├── ShutdownManager.java │ └── factory │ │ └── AsyncFactory.java │ ├── security │ ├── context │ │ ├── AuthenticationContextHolder.java │ │ └── PermissionContextHolder.java │ ├── filter │ │ └── JwtAuthenticationTokenFilter.java │ └── handle │ │ ├── AuthenticationEntryPointImpl.java │ │ └── LogoutSuccessHandlerImpl.java │ └── web │ ├── domain │ ├── Server.java │ └── server │ │ ├── Cpu.java │ │ ├── Jvm.java │ │ ├── Mem.java │ │ ├── Sys.java │ │ └── SysFile.java │ ├── exception │ └── GlobalExceptionHandler.java │ └── service │ ├── PermissionService.java │ ├── SysLoginService.java │ ├── SysPasswordService.java │ ├── SysPermissionService.java │ ├── SysRegisterService.java │ ├── TokenService.java │ └── UserDetailsServiceImpl.java ├── ruoyi-generator ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── ruoyi │ │ └── generator │ │ ├── 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 │ ├── generator.yml │ ├── 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 │ └── xml │ └── mapper.xml.vm ├── ruoyi-quartz ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── ruoyi │ │ └── quartz │ │ ├── config │ │ └── ScheduleConfig.java │ │ ├── controller │ │ ├── SysJobController.java │ │ └── SysJobLogController.java │ │ ├── domain │ │ ├── SysJob.java │ │ └── SysJobLog.java │ │ ├── mapper │ │ ├── SysJobLogMapper.java │ │ └── SysJobMapper.java │ │ ├── service │ │ ├── ISysJobLogService.java │ │ ├── ISysJobService.java │ │ └── impl │ │ │ ├── SysJobLogServiceImpl.java │ │ │ └── SysJobServiceImpl.java │ │ ├── task │ │ └── RyTask.java │ │ └── util │ │ ├── AbstractQuartzJob.java │ │ ├── CronUtils.java │ │ ├── JobInvokeUtil.java │ │ ├── QuartzDisallowConcurrentExecution.java │ │ ├── QuartzJobExecution.java │ │ └── ScheduleUtils.java │ └── resources │ └── mapper │ └── quartz │ ├── SysJobLogMapper.xml │ └── SysJobMapper.xml ├── ruoyi-system ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── ruoyi │ │ └── system │ │ ├── domain │ │ ├── SysCache.java │ │ ├── SysConfig.java │ │ ├── SysLogininfor.java │ │ ├── SysNotice.java │ │ ├── SysOperLog.java │ │ ├── SysPost.java │ │ ├── SysRoleDept.java │ │ ├── SysRoleMenu.java │ │ ├── SysUserOnline.java │ │ ├── SysUserPost.java │ │ ├── SysUserRole.java │ │ └── vo │ │ │ ├── MetaVo.java │ │ │ └── RouterVo.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 │ │ ├── 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 │ │ ├── SysPostServiceImpl.java │ │ ├── SysRoleServiceImpl.java │ │ ├── SysUserOnlineServiceImpl.java │ │ └── SysUserServiceImpl.java │ └── resources │ └── 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-ui ├── .editorconfig ├── .env.development ├── .env.production ├── .env.staging ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── babel.config.js ├── bin │ ├── build.bat │ ├── package.bat │ └── run-web.bat ├── build │ └── index.js ├── package.json ├── public │ ├── favicon.ico │ ├── html │ │ └── ie.html │ ├── index.html │ └── robots.txt ├── src │ ├── App.vue │ ├── api │ │ ├── login.js │ │ ├── menu.js │ │ ├── monitor │ │ │ ├── cache.js │ │ │ ├── job.js │ │ │ ├── jobLog.js │ │ │ ├── logininfor.js │ │ │ ├── online.js │ │ │ ├── operlog.js │ │ │ └── server.js │ │ ├── system │ │ │ ├── config.js │ │ │ ├── dept.js │ │ │ ├── dict │ │ │ │ ├── data.js │ │ │ │ └── type.js │ │ │ ├── menu.js │ │ │ ├── notice.js │ │ │ ├── post.js │ │ │ ├── role.js │ │ │ └── user.js │ │ └── tool │ │ │ └── gen.js │ ├── assets │ │ ├── 401_images │ │ │ └── 401.gif │ │ ├── 404_images │ │ │ ├── 404.png │ │ │ └── 404_cloud.png │ │ ├── icons │ │ │ ├── index.js │ │ │ ├── svg │ │ │ │ ├── 404.svg │ │ │ │ ├── bug.svg │ │ │ │ ├── build.svg │ │ │ │ ├── button.svg │ │ │ │ ├── cascader.svg │ │ │ │ ├── chart.svg │ │ │ │ ├── checkbox.svg │ │ │ │ ├── clipboard.svg │ │ │ │ ├── code.svg │ │ │ │ ├── color.svg │ │ │ │ ├── component.svg │ │ │ │ ├── dashboard.svg │ │ │ │ ├── date-range.svg │ │ │ │ ├── date.svg │ │ │ │ ├── dict.svg │ │ │ │ ├── documentation.svg │ │ │ │ ├── download.svg │ │ │ │ ├── drag.svg │ │ │ │ ├── druid.svg │ │ │ │ ├── edit.svg │ │ │ │ ├── education.svg │ │ │ │ ├── email.svg │ │ │ │ ├── example.svg │ │ │ │ ├── excel.svg │ │ │ │ ├── exit-fullscreen.svg │ │ │ │ ├── eye-open.svg │ │ │ │ ├── eye.svg │ │ │ │ ├── form.svg │ │ │ │ ├── fullscreen.svg │ │ │ │ ├── github.svg │ │ │ │ ├── guide.svg │ │ │ │ ├── icon.svg │ │ │ │ ├── input.svg │ │ │ │ ├── international.svg │ │ │ │ ├── job.svg │ │ │ │ ├── language.svg │ │ │ │ ├── link.svg │ │ │ │ ├── list.svg │ │ │ │ ├── lock.svg │ │ │ │ ├── log.svg │ │ │ │ ├── logininfor.svg │ │ │ │ ├── message.svg │ │ │ │ ├── money.svg │ │ │ │ ├── monitor.svg │ │ │ │ ├── nested.svg │ │ │ │ ├── number.svg │ │ │ │ ├── online.svg │ │ │ │ ├── password.svg │ │ │ │ ├── pdf.svg │ │ │ │ ├── people.svg │ │ │ │ ├── peoples.svg │ │ │ │ ├── phone.svg │ │ │ │ ├── post.svg │ │ │ │ ├── qq.svg │ │ │ │ ├── question.svg │ │ │ │ ├── radio.svg │ │ │ │ ├── rate.svg │ │ │ │ ├── redis-list.svg │ │ │ │ ├── redis.svg │ │ │ │ ├── row.svg │ │ │ │ ├── search.svg │ │ │ │ ├── select.svg │ │ │ │ ├── server.svg │ │ │ │ ├── shopping.svg │ │ │ │ ├── size.svg │ │ │ │ ├── skill.svg │ │ │ │ ├── slider.svg │ │ │ │ ├── star.svg │ │ │ │ ├── swagger.svg │ │ │ │ ├── switch.svg │ │ │ │ ├── system.svg │ │ │ │ ├── tab.svg │ │ │ │ ├── table.svg │ │ │ │ ├── textarea.svg │ │ │ │ ├── theme.svg │ │ │ │ ├── time-range.svg │ │ │ │ ├── time.svg │ │ │ │ ├── tool.svg │ │ │ │ ├── tree-table.svg │ │ │ │ ├── tree.svg │ │ │ │ ├── upload.svg │ │ │ │ ├── user.svg │ │ │ │ ├── validCode.svg │ │ │ │ ├── wechat.svg │ │ │ │ └── zip.svg │ │ │ └── svgo.yml │ │ ├── images │ │ │ ├── dark.svg │ │ │ ├── light.svg │ │ │ ├── login-background.jpg │ │ │ ├── pay.png │ │ │ └── profile.jpg │ │ ├── logo │ │ │ └── logo.png │ │ └── styles │ │ │ ├── btn.scss │ │ │ ├── element-ui.scss │ │ │ ├── element-variables.scss │ │ │ ├── index.scss │ │ │ ├── mixin.scss │ │ │ ├── ruoyi.scss │ │ │ ├── sidebar.scss │ │ │ ├── transition.scss │ │ │ └── variables.scss │ ├── components │ │ ├── Breadcrumb │ │ │ └── index.vue │ │ ├── Crontab │ │ │ ├── day.vue │ │ │ ├── hour.vue │ │ │ ├── index.vue │ │ │ ├── min.vue │ │ │ ├── month.vue │ │ │ ├── result.vue │ │ │ ├── second.vue │ │ │ ├── week.vue │ │ │ └── year.vue │ │ ├── DictData │ │ │ └── index.js │ │ ├── DictTag │ │ │ └── index.vue │ │ ├── Editor │ │ │ └── index.vue │ │ ├── FileUpload │ │ │ └── index.vue │ │ ├── Hamburger │ │ │ └── index.vue │ │ ├── HeaderSearch │ │ │ └── index.vue │ │ ├── IconSelect │ │ │ ├── index.vue │ │ │ └── requireIcons.js │ │ ├── ImagePreview │ │ │ └── index.vue │ │ ├── ImageUpload │ │ │ └── index.vue │ │ ├── Pagination │ │ │ └── index.vue │ │ ├── PanThumb │ │ │ └── index.vue │ │ ├── ParentView │ │ │ └── index.vue │ │ ├── RightPanel │ │ │ └── index.vue │ │ ├── RightToolbar │ │ │ └── index.vue │ │ ├── RuoYi │ │ │ ├── Doc │ │ │ │ └── index.vue │ │ │ └── Git │ │ │ │ └── index.vue │ │ ├── Screenfull │ │ │ └── index.vue │ │ ├── SizeSelect │ │ │ └── index.vue │ │ ├── SvgIcon │ │ │ └── index.vue │ │ ├── ThemePicker │ │ │ └── index.vue │ │ ├── TopNav │ │ │ └── index.vue │ │ └── iFrame │ │ │ └── index.vue │ ├── directive │ │ ├── dialog │ │ │ ├── drag.js │ │ │ ├── dragHeight.js │ │ │ └── dragWidth.js │ │ ├── index.js │ │ ├── module │ │ │ └── clipboard.js │ │ └── permission │ │ │ ├── hasPermi.js │ │ │ └── hasRole.js │ ├── layout │ │ ├── components │ │ │ ├── AppMain.vue │ │ │ ├── IframeToggle │ │ │ │ └── index.vue │ │ │ ├── InnerLink │ │ │ │ └── index.vue │ │ │ ├── Navbar.vue │ │ │ ├── Settings │ │ │ │ └── index.vue │ │ │ ├── Sidebar │ │ │ │ ├── FixiOSBug.js │ │ │ │ ├── Item.vue │ │ │ │ ├── Link.vue │ │ │ │ ├── Logo.vue │ │ │ │ ├── SidebarItem.vue │ │ │ │ └── index.vue │ │ │ ├── TagsView │ │ │ │ ├── ScrollPane.vue │ │ │ │ └── index.vue │ │ │ └── index.js │ │ ├── index.vue │ │ └── mixin │ │ │ └── ResizeHandler.js │ ├── main.js │ ├── permission.js │ ├── plugins │ │ ├── auth.js │ │ ├── cache.js │ │ ├── download.js │ │ ├── index.js │ │ ├── modal.js │ │ └── tab.js │ ├── router │ │ └── index.js │ ├── settings.js │ ├── store │ │ ├── getters.js │ │ ├── index.js │ │ └── modules │ │ │ ├── app.js │ │ │ ├── dict.js │ │ │ ├── permission.js │ │ │ ├── settings.js │ │ │ ├── tagsView.js │ │ │ └── user.js │ ├── utils │ │ ├── auth.js │ │ ├── dict │ │ │ ├── Dict.js │ │ │ ├── DictConverter.js │ │ │ ├── DictData.js │ │ │ ├── DictMeta.js │ │ │ ├── DictOptions.js │ │ │ └── index.js │ │ ├── errorCode.js │ │ ├── generator │ │ │ ├── config.js │ │ │ ├── css.js │ │ │ ├── drawingDefault.js │ │ │ ├── html.js │ │ │ ├── icon.json │ │ │ ├── js.js │ │ │ └── render.js │ │ ├── index.js │ │ ├── jsencrypt.js │ │ ├── permission.js │ │ ├── request.js │ │ ├── ruoyi.js │ │ ├── scroll-to.js │ │ └── validate.js │ └── views │ │ ├── dashboard │ │ ├── BarChart.vue │ │ ├── LineChart.vue │ │ ├── PanelGroup.vue │ │ ├── PieChart.vue │ │ ├── RaddarChart.vue │ │ └── mixins │ │ │ └── resize.js │ │ ├── error │ │ ├── 401.vue │ │ └── 404.vue │ │ ├── index.vue │ │ ├── index_v1.vue │ │ ├── login.vue │ │ ├── monitor │ │ ├── cache │ │ │ ├── index.vue │ │ │ └── list.vue │ │ ├── druid │ │ │ └── index.vue │ │ ├── job │ │ │ ├── index.vue │ │ │ └── log.vue │ │ ├── logininfor │ │ │ └── index.vue │ │ ├── online │ │ │ └── index.vue │ │ ├── operlog │ │ │ └── index.vue │ │ └── server │ │ │ └── index.vue │ │ ├── redirect.vue │ │ ├── register.vue │ │ ├── system │ │ ├── config │ │ │ └── index.vue │ │ ├── dept │ │ │ └── index.vue │ │ ├── dict │ │ │ ├── data.vue │ │ │ └── index.vue │ │ ├── menu │ │ │ └── index.vue │ │ ├── notice │ │ │ └── index.vue │ │ ├── post │ │ │ └── index.vue │ │ ├── role │ │ │ ├── authUser.vue │ │ │ ├── index.vue │ │ │ └── selectUser.vue │ │ └── user │ │ │ ├── authRole.vue │ │ │ ├── index.vue │ │ │ └── profile │ │ │ ├── index.vue │ │ │ ├── resetPwd.vue │ │ │ ├── userAvatar.vue │ │ │ └── userInfo.vue │ │ └── tool │ │ ├── build │ │ ├── CodeTypeDialog.vue │ │ ├── DraggableItem.vue │ │ ├── IconsDialog.vue │ │ ├── RightPanel.vue │ │ ├── TreeNodeDialog.vue │ │ └── index.vue │ │ ├── gen │ │ ├── basicInfoForm.vue │ │ ├── createTable.vue │ │ ├── editTable.vue │ │ ├── genInfoForm.vue │ │ ├── importTable.vue │ │ └── index.vue │ │ └── swagger │ │ └── index.vue └── vue.config.js ├── ry.bat ├── ry.sh └── sql ├── quartz.sql └── ry_20231130.sql /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html 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 | 31 | ### NetBeans ### 32 | nbproject/private/ 33 | build/* 34 | nbbuild/ 35 | dist/ 36 | nbdist/ 37 | .nb-gradle/ 38 | 39 | ###################################################################### 40 | # Others 41 | *.log 42 | *.xml.versionsBackup 43 | *.swp 44 | 45 | !*/build/*.java 46 | !*/build/*.html 47 | !*/build/*.xml 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 RuoYi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /bin/clean.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/bin/clean.bat -------------------------------------------------------------------------------- /bin/package.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/bin/package.bat -------------------------------------------------------------------------------- /bin/run.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/bin/run.bat -------------------------------------------------------------------------------- /doc/若依环境使用手册.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/doc/若依环境使用手册.docx -------------------------------------------------------------------------------- /ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi; 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 RuoYiApplication 14 | { 15 | public static void main(String[] args) 16 | { 17 | // System.setProperty("spring.devtools.restart.enabled", "false"); 18 | SpringApplication.run(RuoYiApplication.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-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | 6 | /** 7 | * web容器中进行部署 8 | * 9 | * @author ruoyi 10 | */ 11 | public class RuoYiServletInitializer extends SpringBootServletInitializer 12 | { 13 | @Override 14 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) 15 | { 16 | return application.sources(RuoYiApplication.class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.web.controller.monitor; 2 | 3 | import org.springframework.security.access.prepost.PreAuthorize; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | import com.ruoyi.common.core.domain.AjaxResult; 8 | import com.ruoyi.framework.web.domain.Server; 9 | 10 | /** 11 | * 服务器监控 12 | * 13 | * @author ruoyi 14 | */ 15 | @RestController 16 | @RequestMapping("/monitor/server") 17 | public class ServerController 18 | { 19 | @PreAuthorize("@ss.hasPermi('monitor:server:list')") 20 | @GetMapping() 21 | public AjaxResult getInfo() throws Exception 22 | { 23 | Server server = new Server(); 24 | server.copyTo(); 25 | return AjaxResult.success(server); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.web.controller.system; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | import com.ruoyi.common.config.RuoYiConfig; 7 | import com.ruoyi.common.utils.StringUtils; 8 | 9 | /** 10 | * 首页 11 | * 12 | * @author ruoyi 13 | */ 14 | @RestController 15 | public class SysIndexController 16 | { 17 | /** 系统基础配置 */ 18 | @Autowired 19 | private RuoYiConfig ruoyiConfig; 20 | 21 | /** 22 | * 访问首页,提示语 23 | */ 24 | @RequestMapping("/") 25 | public String index() 26 | { 27 | return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRegisterController.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.web.controller.system; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestBody; 6 | import org.springframework.web.bind.annotation.RestController; 7 | import com.ruoyi.common.core.controller.BaseController; 8 | import com.ruoyi.common.core.domain.AjaxResult; 9 | import com.ruoyi.common.core.domain.model.RegisterBody; 10 | import com.ruoyi.common.utils.StringUtils; 11 | import com.ruoyi.framework.web.service.SysRegisterService; 12 | import com.ruoyi.system.service.ISysConfigService; 13 | 14 | /** 15 | * 注册验证 16 | * 17 | * @author ruoyi 18 | */ 19 | @RestController 20 | public class SysRegisterController extends BaseController 21 | { 22 | @Autowired 23 | private SysRegisterService registerService; 24 | 25 | @Autowired 26 | private ISysConfigService configService; 27 | 28 | @PostMapping("/register") 29 | public AjaxResult register(@RequestBody RegisterBody user) 30 | { 31 | if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) 32 | { 33 | return error("当前系统没有开启注册功能!"); 34 | } 35 | String msg = registerService.register(user); 36 | return StringUtils.isEmpty(msg) ? success() : error(msg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties: -------------------------------------------------------------------------------- 1 | restart.include.json=/com.alibaba.fastjson2.*.jar -------------------------------------------------------------------------------- /ruoyi-admin/src/main/resources/i18n/messages.properties: -------------------------------------------------------------------------------- 1 | #错误消息 2 | not.null=* 必须填写 3 | user.jcaptcha.error=验证码错误 4 | user.jcaptcha.expire=验证码已失效 5 | user.not.exists=用户不存在/密码错误 6 | user.password.not.match=用户不存在/密码错误 7 | user.password.retry.limit.count=密码输入错误{0}次 8 | user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟 9 | user.password.delete=对不起,您的账号已被删除 10 | user.blocked=用户已封禁,请联系管理员 11 | role.blocked=角色已封禁,请联系管理员 12 | login.blocked=很遗憾,访问IP已被列入系统黑名单 13 | user.logout.success=退出成功 14 | 15 | length.not.valid=长度必须在{min}到{max}个字符之间 16 | 17 | user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 18 | user.password.not.valid=* 5-50个字符 19 | 20 | user.email.not.valid=邮箱格式错误 21 | user.mobile.phone.number.not.valid=手机号格式错误 22 | user.login.success=登录成功 23 | user.register.success=注册成功 24 | user.notfound=请重新登录 25 | user.forcelogout=管理员强制退出,请重新登录 26 | user.unknown.error=未知错误,请重新登录 27 | 28 | ##文件上传消息 29 | upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! 30 | upload.filename.exceed.length=上传的文件名最长{0}个字符 31 | 32 | ##权限 33 | no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] 34 | no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] 35 | no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] 36 | no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] 37 | no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] 38 | no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] 39 | -------------------------------------------------------------------------------- /ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/Anonymous.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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, ElementType.TYPE }) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Documented 17 | public @interface Anonymous 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 | * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来 31 | */ 32 | public String permission() default ""; 33 | } 34 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 com.ruoyi.common.enums.DataSourceType; 10 | 11 | /** 12 | * 自定义多数据源切换注解 13 | * 14 | * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准 15 | * 16 | * @author ruoyi 17 | */ 18 | @Target({ ElementType.METHOD, ElementType.TYPE }) 19 | @Retention(RetentionPolicy.RUNTIME) 20 | @Documented 21 | @Inherited 22 | public @interface DataSource 23 | { 24 | /** 25 | * 切换数据源名称 26 | */ 27 | public DataSourceType value() default DataSourceType.MASTER; 28 | } 29 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 | public Excel[] value(); 18 | } 19 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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.enums.BusinessType; 9 | import com.ruoyi.common.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/src/main/java/com/ruoyi/common/annotation/RateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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.constant.CacheConstants; 9 | import com.ruoyi.common.enums.LimitType; 10 | 11 | /** 12 | * 限流注解 13 | * 14 | * @author ruoyi 15 | */ 16 | @Target(ElementType.METHOD) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Documented 19 | public @interface RateLimiter 20 | { 21 | /** 22 | * 限流key 23 | */ 24 | public String key() default CacheConstants.RATE_LIMIT_KEY; 25 | 26 | /** 27 | * 限流时间,单位秒 28 | */ 29 | public int time() default 60; 30 | 31 | /** 32 | * 限流次数 33 | */ 34 | public int count() default 100; 35 | 36 | /** 37 | * 限流类型 38 | */ 39 | public LimitType limitType() default LimitType.DEFAULT; 40 | } 41 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 | 10 | /** 11 | * 自定义注解防止表单重复提交 12 | * 13 | * @author ruoyi 14 | * 15 | */ 16 | @Inherited 17 | @Target(ElementType.METHOD) 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Documented 20 | public @interface RepeatSubmit 21 | { 22 | /** 23 | * 间隔时间(ms),小于此时间视为重复提交 24 | */ 25 | public int interval() default 5000; 26 | 27 | /** 28 | * 提示消息 29 | */ 30 | public String message() default "不允许重复提交,请稍候再试"; 31 | } 32 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.constant; 2 | 3 | /** 4 | * 缓存的key 常量 5 | * 6 | * @author ruoyi 7 | */ 8 | public class CacheConstants 9 | { 10 | /** 11 | * 登录用户 redis key 12 | */ 13 | public static final String LOGIN_TOKEN_KEY = "login_tokens:"; 14 | 15 | /** 16 | * 验证码 redis key 17 | */ 18 | public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; 19 | 20 | /** 21 | * 参数管理 cache key 22 | */ 23 | public static final String SYS_CONFIG_KEY = "sys_config:"; 24 | 25 | /** 26 | * 字典管理 cache key 27 | */ 28 | public static final String SYS_DICT_KEY = "sys_dict:"; 29 | 30 | /** 31 | * 防重提交 redis key 32 | */ 33 | public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; 34 | 35 | /** 36 | * 限流 redis key 37 | */ 38 | public static final String RATE_LIMIT_KEY = "rate_limit:"; 39 | 40 | /** 41 | * 登录账户密码错误次数 redis key 42 | */ 43 | public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:"; 44 | } 45 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.core.domain.model; 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 | /** 21 | * 验证码 22 | */ 23 | private String code; 24 | 25 | /** 26 | * 唯一标识 27 | */ 28 | private String uuid; 29 | 30 | public String getUsername() 31 | { 32 | return username; 33 | } 34 | 35 | public void setUsername(String username) 36 | { 37 | this.username = username; 38 | } 39 | 40 | public String getPassword() 41 | { 42 | return password; 43 | } 44 | 45 | public void setPassword(String password) 46 | { 47 | this.password = password; 48 | } 49 | 50 | public String getCode() 51 | { 52 | return code; 53 | } 54 | 55 | public void setCode(String code) 56 | { 57 | this.code = code; 58 | } 59 | 60 | public String getUuid() 61 | { 62 | return uuid; 63 | } 64 | 65 | public void setUuid(String uuid) 66 | { 67 | this.uuid = uuid; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/RegisterBody.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.core.domain.model; 2 | 3 | /** 4 | * 用户注册对象 5 | * 6 | * @author ruoyi 7 | */ 8 | public class RegisterBody extends LoginBody 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/enums/BusinessType.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/enums/DataSourceType.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.enums; 2 | 3 | /** 4 | * 数据源 5 | * 6 | * @author ruoyi 7 | */ 8 | public enum DataSourceType 9 | { 10 | /** 11 | * 主库 12 | */ 13 | MASTER, 14 | 15 | /** 16 | * 从库 17 | */ 18 | SLAVE 19 | } 20 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import org.springframework.lang.Nullable; 6 | 7 | /** 8 | * 请求方式 9 | * 10 | * @author ruoyi 11 | */ 12 | public enum HttpMethod 13 | { 14 | GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE; 15 | 16 | private static final Map mappings = new HashMap<>(16); 17 | 18 | static 19 | { 20 | for (HttpMethod httpMethod : values()) 21 | { 22 | mappings.put(httpMethod.name(), httpMethod); 23 | } 24 | } 25 | 26 | @Nullable 27 | public static HttpMethod resolve(@Nullable String method) 28 | { 29 | return (method != null ? mappings.get(method) : null); 30 | } 31 | 32 | public boolean matches(String method) 33 | { 34 | return (this == resolve(method)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/enums/LimitType.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.enums; 2 | 3 | /** 4 | * 限流类型 5 | * 6 | * @author ruoyi 7 | */ 8 | 9 | public enum LimitType 10 | { 11 | /** 12 | * 默认策略全局限流 13 | */ 14 | DEFAULT, 15 | 16 | /** 17 | * 根据请求者IP进行限流 18 | */ 19 | IP 20 | } 21 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/enums/UserStatus.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/DemoModeException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/GlobalException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/UtilException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/file/FileException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.file; 2 | 3 | import com.ruoyi.common.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) 15 | { 16 | super("file", code, args, null); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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 }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileUploadException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.file; 2 | 3 | import java.io.PrintStream; 4 | import java.io.PrintWriter; 5 | 6 | /** 7 | * 文件上传异常类 8 | * 9 | * @author ruoyi 10 | */ 11 | public class FileUploadException extends Exception 12 | { 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | private final Throwable cause; 17 | 18 | public FileUploadException() 19 | { 20 | this(null, null); 21 | } 22 | 23 | public FileUploadException(final String msg) 24 | { 25 | this(msg, null); 26 | } 27 | 28 | public FileUploadException(String msg, Throwable cause) 29 | { 30 | super(msg); 31 | this.cause = cause; 32 | } 33 | 34 | @Override 35 | public void printStackTrace(PrintStream stream) 36 | { 37 | super.printStackTrace(stream); 38 | if (cause != null) 39 | { 40 | stream.println("Caused by:"); 41 | cause.printStackTrace(stream); 42 | } 43 | } 44 | 45 | @Override 46 | public void printStackTrace(PrintWriter writer) 47 | { 48 | super.printStackTrace(writer); 49 | if (cause != null) 50 | { 51 | writer.println("Caused by:"); 52 | cause.printStackTrace(writer); 53 | } 54 | } 55 | 56 | @Override 57 | public Throwable getCause() 58 | { 59 | return cause; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/user/BlackListException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.user; 2 | 3 | /** 4 | * 黑名单IP异常类 5 | * 6 | * @author ruoyi 7 | */ 8 | public class BlackListException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public BlackListException() 13 | { 14 | super("login.blocked", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.user; 2 | 3 | /** 4 | * 验证码错误异常类 5 | * 6 | * @author ruoyi 7 | */ 8 | public class CaptchaException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public CaptchaException() 13 | { 14 | super("user.jcaptcha.error", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/user/UserException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.user; 2 | 3 | import com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/user/UserNotExistsException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.user; 2 | 3 | /** 4 | * 用户不存在异常类 5 | * 6 | * @author ruoyi 7 | */ 8 | public class UserNotExistsException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserNotExistsException() 13 | { 14 | super("user.not.exists", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/exception/user/UserPasswordRetryLimitExceedException.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.exception.user; 2 | 3 | /** 4 | * 用户错误最大次数异常类 5 | * 6 | * @author ruoyi 7 | */ 8 | public class UserPasswordRetryLimitExceedException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserPasswordRetryLimitExceedException(int retryLimitCount, int lockTime) 13 | { 14 | super("user.password.retry.limit.exceed", new Object[] { retryLimitCount, lockTime }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/filter/PropertyPreExcludeFilter.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/utils/LogUtils.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.utils; 2 | 3 | /** 4 | * 处理并记录日志文件 5 | * 6 | * @author ruoyi 7 | */ 8 | public class LogUtils 9 | { 10 | public static String getBlock(Object msg) 11 | { 12 | if (msg == null) 13 | { 14 | msg = ""; 15 | } 16 | return "[" + msg.toString() + "]"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.utils; 2 | 3 | import org.springframework.context.MessageSource; 4 | import org.springframework.context.i18n.LocaleContextHolder; 5 | import com.ruoyi.common.utils.spring.SpringUtils; 6 | 7 | /** 8 | * 获取i18n资源文件 9 | * 10 | * @author ruoyi 11 | */ 12 | public class MessageUtils 13 | { 14 | /** 15 | * 根据消息键和参数 获取消息 委托给spring messageSource 16 | * 17 | * @param code 消息键 18 | * @param args 参数 19 | * @return 获取国际化翻译值 20 | */ 21 | public static String message(String code, Object... args) 22 | { 23 | MessageSource messageSource = SpringUtils.getBean(MessageSource.class); 24 | return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.utils; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.ruoyi.common.core.page.PageDomain; 5 | import com.ruoyi.common.core.page.TableSupport; 6 | import com.ruoyi.common.utils.sql.SqlUtil; 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/src/main/java/com/ruoyi/common/utils/bean/BeanValidators.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/utils/poi/ExcelHandlerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.utils.poi; 2 | 3 | import org.apache.poi.ss.usermodel.Cell; 4 | import org.apache.poi.ss.usermodel.Workbook; 5 | 6 | /** 7 | * Excel数据格式处理适配器 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface ExcelHandlerAdapter 12 | { 13 | /** 14 | * 格式化 15 | * 16 | * @param value 单元格数据值 17 | * @param args excel注解args参数组 18 | * @param cell 单元格对象 19 | * @param wb 工作簿对象 20 | * 21 | * @return 处理后的值 22 | */ 23 | Object format(Object value, String[] args, Cell cell, Workbook wb); 24 | } 25 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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/src/main/java/com/ruoyi/common/xss/Xss.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.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[] payload() default {}; 27 | } 28 | -------------------------------------------------------------------------------- /ruoyi-common/src/main/java/com/ruoyi/common/xss/XssValidator.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.common.xss; 2 | 3 | import com.ruoyi.common.utils.StringUtils; 4 | import javax.validation.ConstraintValidator; 5 | import javax.validation.ConstraintValidatorContext; 6 | import java.util.regex.Matcher; 7 | import java.util.regex.Pattern; 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 | StringBuilder sHtml = new StringBuilder(); 31 | Pattern pattern = Pattern.compile(HTML_PATTERN); 32 | Matcher matcher = pattern.matcher(value); 33 | while (matcher.find()) 34 | { 35 | sHtml.append(matcher.group()); 36 | } 37 | return pattern.matcher(sHtml).matches(); 38 | } 39 | } -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.config; 2 | 3 | import java.util.TimeZone; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 9 | 10 | /** 11 | * 程序注解配置 12 | * 13 | * @author ruoyi 14 | */ 15 | @Configuration 16 | // 表示通过aop框架暴露该代理对象,AopContext能够访问 17 | @EnableAspectJAutoProxy(exposeProxy = true) 18 | // 指定要扫描的Mapper类的包的路径 19 | @MapperScan("com.ruoyi.**.mapper") 20 | public class ApplicationConfig 21 | { 22 | /** 23 | * 时区配置 24 | */ 25 | @Bean 26 | public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() 27 | { 28 | return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.config; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import org.springframework.stereotype.Component; 5 | import com.ruoyi.common.utils.ServletUtils; 6 | 7 | /** 8 | * 服务相关配置 9 | * 10 | * @author ruoyi 11 | */ 12 | @Component 13 | public class ServerConfig 14 | { 15 | /** 16 | * 获取完整的请求路径,包括:域名,端口,上下文访问路径 17 | * 18 | * @return 服务地址 19 | */ 20 | public String getUrl() 21 | { 22 | HttpServletRequest request = ServletUtils.getRequest(); 23 | return getDomain(request); 24 | } 25 | 26 | public static String getDomain(HttpServletRequest request) 27 | { 28 | StringBuffer url = request.getRequestURL(); 29 | String contextPath = request.getServletContext().getContextPath(); 30 | return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.datasource; 2 | 3 | import java.util.Map; 4 | import javax.sql.DataSource; 5 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 6 | 7 | /** 8 | * 动态数据源 9 | * 10 | * @author ruoyi 11 | */ 12 | public class DynamicDataSource extends AbstractRoutingDataSource 13 | { 14 | public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) 15 | { 16 | super.setDefaultTargetDataSource(defaultTargetDataSource); 17 | super.setTargetDataSources(targetDataSources); 18 | super.afterPropertiesSet(); 19 | } 20 | 21 | @Override 22 | protected Object determineCurrentLookupKey() 23 | { 24 | return DynamicDataSourceContextHolder.getDataSourceType(); 25 | } 26 | } -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.datasource; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | /** 7 | * 数据源切换处理 8 | * 9 | * @author ruoyi 10 | */ 11 | public class DynamicDataSourceContextHolder 12 | { 13 | public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); 14 | 15 | /** 16 | * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, 17 | * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 18 | */ 19 | private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); 20 | 21 | /** 22 | * 设置数据源的变量 23 | */ 24 | public static void setDataSourceType(String dsType) 25 | { 26 | log.info("切换到{}数据源", dsType); 27 | CONTEXT_HOLDER.set(dsType); 28 | } 29 | 30 | /** 31 | * 获得数据源的变量 32 | */ 33 | public static String getDataSourceType() 34 | { 35 | return CONTEXT_HOLDER.get(); 36 | } 37 | 38 | /** 39 | * 清空数据源变量 40 | */ 41 | public static void clearDataSourceType() 42 | { 43 | CONTEXT_HOLDER.remove(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.manager; 2 | 3 | import java.util.TimerTask; 4 | import java.util.concurrent.ScheduledExecutorService; 5 | import java.util.concurrent.TimeUnit; 6 | import com.ruoyi.common.utils.Threads; 7 | import com.ruoyi.common.utils.spring.SpringUtils; 8 | 9 | /** 10 | * 异步任务管理器 11 | * 12 | * @author ruoyi 13 | */ 14 | public class AsyncManager 15 | { 16 | /** 17 | * 操作延迟10毫秒 18 | */ 19 | private final int OPERATE_DELAY_TIME = 10; 20 | 21 | /** 22 | * 异步操作任务调度线程池 23 | */ 24 | private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); 25 | 26 | /** 27 | * 单例模式 28 | */ 29 | private AsyncManager(){} 30 | 31 | private static AsyncManager me = new AsyncManager(); 32 | 33 | public static AsyncManager me() 34 | { 35 | return me; 36 | } 37 | 38 | /** 39 | * 执行任务 40 | * 41 | * @param task 任务 42 | */ 43 | public void execute(TimerTask task) 44 | { 45 | executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); 46 | } 47 | 48 | /** 49 | * 停止任务线程池 50 | */ 51 | public void shutdown() 52 | { 53 | Threads.shutdownAndAwaitTermination(executor); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/manager/ShutdownManager.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.manager; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.stereotype.Component; 6 | import javax.annotation.PreDestroy; 7 | 8 | /** 9 | * 确保应用退出时能关闭后台线程 10 | * 11 | * @author ruoyi 12 | */ 13 | @Component 14 | public class ShutdownManager 15 | { 16 | private static final Logger logger = LoggerFactory.getLogger("sys-user"); 17 | 18 | @PreDestroy 19 | public void destroy() 20 | { 21 | shutdownAsyncManager(); 22 | } 23 | 24 | /** 25 | * 停止异步执行任务 26 | */ 27 | private void shutdownAsyncManager() 28 | { 29 | try 30 | { 31 | logger.info("====关闭后台任务任务线程池===="); 32 | AsyncManager.me().shutdown(); 33 | } 34 | catch (Exception e) 35 | { 36 | logger.error(e.getMessage(), e); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/security/context/AuthenticationContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.security.context; 2 | 3 | import org.springframework.security.core.Authentication; 4 | 5 | /** 6 | * 身份验证信息 7 | * 8 | * @author ruoyi 9 | */ 10 | public class AuthenticationContextHolder 11 | { 12 | private static final ThreadLocal contextHolder = new ThreadLocal<>(); 13 | 14 | public static Authentication getContext() 15 | { 16 | return contextHolder.get(); 17 | } 18 | 19 | public static void setContext(Authentication context) 20 | { 21 | contextHolder.set(context); 22 | } 23 | 24 | public static void clearContext() 25 | { 26 | contextHolder.remove(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/security/context/PermissionContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.security.context; 2 | 3 | import org.springframework.web.context.request.RequestAttributes; 4 | import org.springframework.web.context.request.RequestContextHolder; 5 | import com.ruoyi.common.core.text.Convert; 6 | 7 | /** 8 | * 权限信息 9 | * 10 | * @author ruoyi 11 | */ 12 | public class PermissionContextHolder 13 | { 14 | private static final String PERMISSION_CONTEXT_ATTRIBUTES = "PERMISSION_CONTEXT"; 15 | 16 | public static void setContext(String permission) 17 | { 18 | RequestContextHolder.currentRequestAttributes().setAttribute(PERMISSION_CONTEXT_ATTRIBUTES, permission, 19 | RequestAttributes.SCOPE_REQUEST); 20 | } 21 | 22 | public static String getContext() 23 | { 24 | return Convert.toStr(RequestContextHolder.currentRequestAttributes().getAttribute(PERMISSION_CONTEXT_ATTRIBUTES, 25 | RequestAttributes.SCOPE_REQUEST)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/AuthenticationEntryPointImpl.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.security.handle; 2 | 3 | import java.io.IOException; 4 | import java.io.Serializable; 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import org.springframework.security.core.AuthenticationException; 8 | import org.springframework.security.web.AuthenticationEntryPoint; 9 | import org.springframework.stereotype.Component; 10 | import com.alibaba.fastjson2.JSON; 11 | import com.ruoyi.common.constant.HttpStatus; 12 | import com.ruoyi.common.core.domain.AjaxResult; 13 | import com.ruoyi.common.utils.ServletUtils; 14 | import com.ruoyi.common.utils.StringUtils; 15 | 16 | /** 17 | * 认证失败处理类 返回未授权 18 | * 19 | * @author ruoyi 20 | */ 21 | @Component 22 | public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable 23 | { 24 | private static final long serialVersionUID = -8970718410437077606L; 25 | 26 | @Override 27 | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) 28 | throws IOException 29 | { 30 | int code = HttpStatus.UNAUTHORIZED; 31 | String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI()); 32 | ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg))); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.framework.web.domain.server; 2 | 3 | import com.ruoyi.common.utils.Arith; 4 | 5 | /** 6 | * 內存相关信息 7 | * 8 | * @author ruoyi 9 | */ 10 | public class Mem 11 | { 12 | /** 13 | * 内存总量 14 | */ 15 | private double total; 16 | 17 | /** 18 | * 已用内存 19 | */ 20 | private double used; 21 | 22 | /** 23 | * 剩余内存 24 | */ 25 | private double free; 26 | 27 | public double getTotal() 28 | { 29 | return Arith.div(total, (1024 * 1024 * 1024), 2); 30 | } 31 | 32 | public void setTotal(long total) 33 | { 34 | this.total = total; 35 | } 36 | 37 | public double getUsed() 38 | { 39 | return Arith.div(used, (1024 * 1024 * 1024), 2); 40 | } 41 | 42 | public void setUsed(long used) 43 | { 44 | this.used = used; 45 | } 46 | 47 | public double getFree() 48 | { 49 | return Arith.div(free, (1024 * 1024 * 1024), 2); 50 | } 51 | 52 | public void setFree(long free) 53 | { 54 | this.free = free; 55 | } 56 | 57 | public double getUsage() 58 | { 59 | return Arith.mul(Arith.div(used, total, 4), 100); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ruoyi-generator/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | ruoyi 7 | com.ruoyi 8 | 3.8.7 9 | 10 | 4.0.0 11 | 12 | ruoyi-generator 13 | 14 | 15 | generator代码生成 16 | 17 | 18 | 19 | 20 | 21 | 22 | org.apache.velocity 23 | velocity-engine-core 24 | 25 | 26 | 27 | 28 | com.ruoyi 29 | ruoyi-common 30 | 31 | 32 | 33 | 34 | com.alibaba 35 | druid-spring-boot-starter 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.generator.mapper; 2 | 3 | import java.util.List; 4 | import com.ruoyi.generator.domain.GenTableColumn; 5 | 6 | /** 7 | * 业务字段 数据层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface GenTableColumnMapper 12 | { 13 | /** 14 | * 根据表名称查询列信息 15 | * 16 | * @param tableName 表名称 17 | * @return 列信息 18 | */ 19 | public List selectDbTableColumnsByName(String tableName); 20 | 21 | /** 22 | * 查询业务字段列表 23 | * 24 | * @param tableId 业务字段编号 25 | * @return 业务字段集合 26 | */ 27 | public List selectGenTableColumnListByTableId(Long tableId); 28 | 29 | /** 30 | * 新增业务字段 31 | * 32 | * @param genTableColumn 业务字段信息 33 | * @return 结果 34 | */ 35 | public int insertGenTableColumn(GenTableColumn genTableColumn); 36 | 37 | /** 38 | * 修改业务字段 39 | * 40 | * @param genTableColumn 业务字段信息 41 | * @return 结果 42 | */ 43 | public int updateGenTableColumn(GenTableColumn genTableColumn); 44 | 45 | /** 46 | * 删除业务字段 47 | * 48 | * @param genTableColumns 列数据 49 | * @return 结果 50 | */ 51 | public int deleteGenTableColumns(List genTableColumns); 52 | 53 | /** 54 | * 批量删除业务字段 55 | * 56 | * @param ids 需要删除的数据ID 57 | * @return 结果 58 | */ 59 | public int deleteGenTableColumnByIds(Long[] ids); 60 | } 61 | -------------------------------------------------------------------------------- /ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.generator.service; 2 | 3 | import java.util.List; 4 | import com.ruoyi.generator.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-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.generator.util; 2 | 3 | import java.util.Properties; 4 | import org.apache.velocity.app.Velocity; 5 | import com.ruoyi.common.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-generator/src/main/resources/generator.yml: -------------------------------------------------------------------------------- 1 | # 代码生成 2 | gen: 3 | # 作者 4 | author: ruoyi 5 | # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool 6 | packageName: com.ruoyi.system 7 | # 自动去除表前缀,默认是false 8 | autoRemovePre: false 9 | # 表前缀(生成类名不会包含表前缀,多个用逗号分隔) 10 | tablePrefix: sys_ -------------------------------------------------------------------------------- /ruoyi-generator/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-quartz/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | ruoyi 7 | com.ruoyi 8 | 3.8.7 9 | 10 | 4.0.0 11 | 12 | ruoyi-quartz 13 | 14 | 15 | quartz定时任务 16 | 17 | 18 | 19 | 20 | 21 | 22 | org.quartz-scheduler 23 | quartz 24 | 25 | 26 | com.mchange 27 | c3p0 28 | 29 | 30 | 31 | 32 | 33 | 34 | com.ruoyi 35 | ruoyi-common 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.mapper; 2 | 3 | import java.util.List; 4 | import com.ruoyi.quartz.domain.SysJobLog; 5 | 6 | /** 7 | * 调度任务日志信息 数据层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface SysJobLogMapper 12 | { 13 | /** 14 | * 获取quartz调度器日志的计划任务 15 | * 16 | * @param jobLog 调度日志信息 17 | * @return 调度任务日志集合 18 | */ 19 | public List selectJobLogList(SysJobLog jobLog); 20 | 21 | /** 22 | * 查询所有调度任务日志 23 | * 24 | * @return 调度任务日志列表 25 | */ 26 | public List selectJobLogAll(); 27 | 28 | /** 29 | * 通过调度任务日志ID查询调度信息 30 | * 31 | * @param jobLogId 调度任务日志ID 32 | * @return 调度任务日志对象信息 33 | */ 34 | public SysJobLog selectJobLogById(Long jobLogId); 35 | 36 | /** 37 | * 新增任务日志 38 | * 39 | * @param jobLog 调度日志信息 40 | * @return 结果 41 | */ 42 | public int insertJobLog(SysJobLog jobLog); 43 | 44 | /** 45 | * 批量删除调度日志信息 46 | * 47 | * @param logIds 需要删除的数据ID 48 | * @return 结果 49 | */ 50 | public int deleteJobLogByIds(Long[] logIds); 51 | 52 | /** 53 | * 删除任务日志 54 | * 55 | * @param jobId 调度日志ID 56 | * @return 结果 57 | */ 58 | public int deleteJobLogById(Long jobId); 59 | 60 | /** 61 | * 清空任务日志 62 | */ 63 | public void cleanJobLog(); 64 | } 65 | -------------------------------------------------------------------------------- /ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.mapper; 2 | 3 | import java.util.List; 4 | import com.ruoyi.quartz.domain.SysJob; 5 | 6 | /** 7 | * 调度任务信息 数据层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface SysJobMapper 12 | { 13 | /** 14 | * 查询调度任务日志集合 15 | * 16 | * @param job 调度信息 17 | * @return 操作日志集合 18 | */ 19 | public List selectJobList(SysJob job); 20 | 21 | /** 22 | * 查询所有调度任务 23 | * 24 | * @return 调度任务列表 25 | */ 26 | public List selectJobAll(); 27 | 28 | /** 29 | * 通过调度ID查询调度任务信息 30 | * 31 | * @param jobId 调度ID 32 | * @return 角色对象信息 33 | */ 34 | public SysJob selectJobById(Long jobId); 35 | 36 | /** 37 | * 通过调度ID删除调度任务信息 38 | * 39 | * @param jobId 调度ID 40 | * @return 结果 41 | */ 42 | public int deleteJobById(Long jobId); 43 | 44 | /** 45 | * 批量删除调度任务信息 46 | * 47 | * @param ids 需要删除的数据ID 48 | * @return 结果 49 | */ 50 | public int deleteJobByIds(Long[] ids); 51 | 52 | /** 53 | * 修改调度任务信息 54 | * 55 | * @param job 调度任务信息 56 | * @return 结果 57 | */ 58 | public int updateJob(SysJob job); 59 | 60 | /** 61 | * 新增调度任务信息 62 | * 63 | * @param job 调度任务信息 64 | * @return 结果 65 | */ 66 | public int insertJob(SysJob job); 67 | } 68 | -------------------------------------------------------------------------------- /ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.service; 2 | 3 | import java.util.List; 4 | import com.ruoyi.quartz.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-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.task; 2 | 3 | import org.springframework.stereotype.Component; 4 | import com.ruoyi.common.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-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.util; 2 | 3 | import org.quartz.DisallowConcurrentExecution; 4 | import org.quartz.JobExecutionContext; 5 | import com.ruoyi.quartz.domain.SysJob; 6 | 7 | /** 8 | * 定时任务处理(禁止并发执行) 9 | * 10 | * @author ruoyi 11 | * 12 | */ 13 | @DisallowConcurrentExecution 14 | public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob 15 | { 16 | @Override 17 | protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception 18 | { 19 | JobInvokeUtil.invokeMethod(sysJob); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.quartz.util; 2 | 3 | import org.quartz.JobExecutionContext; 4 | import com.ruoyi.quartz.domain.SysJob; 5 | 6 | /** 7 | * 定时任务处理(允许并发执行) 8 | * 9 | * @author ruoyi 10 | * 11 | */ 12 | public class QuartzJobExecution extends AbstractQuartzJob 13 | { 14 | @Override 15 | protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception 16 | { 17 | JobInvokeUtil.invokeMethod(sysJob); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ruoyi-system/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | ruoyi 7 | com.ruoyi 8 | 3.8.7 9 | 10 | 4.0.0 11 | 12 | ruoyi-system 13 | 14 | 15 | system系统模块 16 | 17 | 18 | 19 | 20 | 21 | 22 | com.ruoyi 23 | ruoyi-common 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /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-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-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-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-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.domain.SysLogininfor; 5 | 6 | /** 7 | * 系统访问日志情况信息 数据层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface SysLogininforMapper 12 | { 13 | /** 14 | * 新增系统登录日志 15 | * 16 | * @param logininfor 访问日志对象 17 | */ 18 | public void 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-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 | } 61 | -------------------------------------------------------------------------------- /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.domain.SysOperLog; 5 | 6 | /** 7 | * 操作日志 数据层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface SysOperLogMapper 12 | { 13 | /** 14 | * 新增操作日志 15 | * 16 | * @param operLog 操作日志对象 17 | */ 18 | public void 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-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-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-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-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.system.service; 2 | 3 | import java.util.List; 4 | import com.ruoyi.common.core.domain.entity.SysDictData; 5 | 6 | /** 7 | * 字典 业务层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface ISysDictDataService 12 | { 13 | /** 14 | * 根据条件分页查询字典数据 15 | * 16 | * @param dictData 字典数据信息 17 | * @return 字典数据集合信息 18 | */ 19 | public List selectDictDataList(SysDictData dictData); 20 | 21 | /** 22 | * 根据字典类型和字典键值查询字典数据信息 23 | * 24 | * @param dictType 字典类型 25 | * @param dictValue 字典键值 26 | * @return 字典标签 27 | */ 28 | public String selectDictLabel(String dictType, String dictValue); 29 | 30 | /** 31 | * 根据字典数据ID查询信息 32 | * 33 | * @param dictCode 字典数据ID 34 | * @return 字典数据 35 | */ 36 | public SysDictData selectDictDataById(Long dictCode); 37 | 38 | /** 39 | * 批量删除字典数据信息 40 | * 41 | * @param dictCodes 需要删除的字典数据ID 42 | */ 43 | public void deleteDictDataByIds(Long[] dictCodes); 44 | 45 | /** 46 | * 新增保存字典数据信息 47 | * 48 | * @param dictData 字典数据信息 49 | * @return 结果 50 | */ 51 | public int insertDictData(SysDictData dictData); 52 | 53 | /** 54 | * 修改保存字典数据信息 55 | * 56 | * @param dictData 字典数据信息 57 | * @return 结果 58 | */ 59 | public int updateDictData(SysDictData dictData); 60 | } 61 | -------------------------------------------------------------------------------- /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.domain.SysLogininfor; 5 | 6 | /** 7 | * 系统访问日志情况信息 服务层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface ISysLogininforService 12 | { 13 | /** 14 | * 新增系统登录日志 15 | * 16 | * @param logininfor 访问日志对象 17 | */ 18 | public void 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-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-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.domain.SysOperLog; 5 | 6 | /** 7 | * 操作日志 服务层 8 | * 9 | * @author ruoyi 10 | */ 11 | public interface ISysOperLogService 12 | { 13 | /** 14 | * 新增操作日志 15 | * 16 | * @param operLog 操作日志对象 17 | */ 18 | public void 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-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java: -------------------------------------------------------------------------------- 1 | package com.ruoyi.system.service; 2 | 3 | import com.ruoyi.common.core.domain.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-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-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | delete from sys_role_menu where role_id=#{roleId} 18 | 19 | 20 | 21 | delete from sys_role_menu where role_id in 22 | 23 | #{roleId} 24 | 25 | 26 | 27 | 28 | insert into sys_role_menu(role_id, menu_id) values 29 | 30 | (#{item.roleId},#{item.menuId}) 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /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-ui/.editorconfig: -------------------------------------------------------------------------------- 1 | # 告诉EditorConfig插件,这是根文件,不用继续往上查找 2 | root = true 3 | 4 | # 匹配全部文件 5 | [*] 6 | # 设置字符集 7 | charset = utf-8 8 | # 缩进风格,可选space、tab 9 | indent_style = space 10 | # 缩进的空格数 11 | indent_size = 2 12 | # 结尾换行符,可选lf、cr、crlf 13 | end_of_line = lf 14 | # 在文件结尾插入新行 15 | insert_final_newline = true 16 | # 删除一行中的前后空格 17 | trim_trailing_whitespace = true 18 | 19 | # 匹配md结尾的文件 20 | [*.md] 21 | insert_final_newline = false 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /ruoyi-ui/.env.development: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VUE_APP_TITLE = 若依管理系统 3 | 4 | # 开发环境配置 5 | ENV = 'development' 6 | 7 | # 若依管理系统/开发环境 8 | VUE_APP_BASE_API = '/dev-api' 9 | 10 | # 路由懒加载 11 | VUE_CLI_BABEL_TRANSPILE_MODULES = true 12 | -------------------------------------------------------------------------------- /ruoyi-ui/.env.production: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VUE_APP_TITLE = 若依管理系统 3 | 4 | # 生产环境配置 5 | ENV = 'production' 6 | 7 | # 若依管理系统/生产环境 8 | VUE_APP_BASE_API = '/prod-api' 9 | -------------------------------------------------------------------------------- /ruoyi-ui/.env.staging: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VUE_APP_TITLE = 若依管理系统 3 | 4 | NODE_ENV = production 5 | 6 | # 测试环境配置 7 | ENV = 'staging' 8 | 9 | # 若依管理系统/测试环境 10 | VUE_APP_BASE_API = '/stage-api' 11 | -------------------------------------------------------------------------------- /ruoyi-ui/.eslintignore: -------------------------------------------------------------------------------- 1 | # 忽略build目录下类型为js的文件的语法检查 2 | build/*.js 3 | # 忽略src/assets目录下文件的语法检查 4 | src/assets 5 | # 忽略public目录下文件的语法检查 6 | public 7 | # 忽略当前目录下为js的文件的语法检查 8 | *.js 9 | # 忽略当前目录下为vue的文件的语法检查 10 | *.vue -------------------------------------------------------------------------------- /ruoyi-ui/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | **/*.log 8 | 9 | tests/**/coverage/ 10 | tests/e2e/reports 11 | selenium-debug.log 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.local 21 | 22 | package-lock.json 23 | yarn.lock 24 | -------------------------------------------------------------------------------- /ruoyi-ui/README.md: -------------------------------------------------------------------------------- 1 | ## 开发 2 | 3 | ```bash 4 | # 克隆项目 5 | git clone https://gitee.com/y_project/RuoYi-Vue 6 | 7 | # 进入项目目录 8 | cd ruoyi-ui 9 | 10 | # 安装依赖 11 | npm install 12 | 13 | # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 14 | npm install --registry=https://registry.npmmirror.com 15 | 16 | # 启动服务 17 | npm run dev 18 | ``` 19 | 20 | 浏览器访问 http://localhost:80 21 | 22 | ## 发布 23 | 24 | ```bash 25 | # 构建测试环境 26 | npm run build:stage 27 | 28 | # 构建生产环境 29 | npm run build:prod 30 | ``` -------------------------------------------------------------------------------- /ruoyi-ui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app 4 | '@vue/cli-plugin-babel/preset' 5 | ], 6 | 'env': { 7 | 'development': { 8 | // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). 9 | // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. 10 | 'plugins': ['dynamic-import-node'] 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /ruoyi-ui/bin/build.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/bin/build.bat -------------------------------------------------------------------------------- /ruoyi-ui/bin/package.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/bin/package.bat -------------------------------------------------------------------------------- /ruoyi-ui/bin/run-web.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/bin/run-web.bat -------------------------------------------------------------------------------- /ruoyi-ui/build/index.js: -------------------------------------------------------------------------------- 1 | const { run } = require('runjs') 2 | const chalk = require('chalk') 3 | const config = require('../vue.config.js') 4 | const rawArgv = process.argv.slice(2) 5 | const args = rawArgv.join(' ') 6 | 7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) { 8 | const report = rawArgv.includes('--report') 9 | 10 | run(`vue-cli-service build ${args}`) 11 | 12 | const port = 9526 13 | const publicPath = config.publicPath 14 | 15 | var connect = require('connect') 16 | var serveStatic = require('serve-static') 17 | const app = connect() 18 | 19 | app.use( 20 | publicPath, 21 | serveStatic('./dist', { 22 | index: ['index.html', '/'] 23 | }) 24 | ) 25 | 26 | app.listen(port, function () { 27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) 28 | if (report) { 29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) 30 | } 31 | 32 | }) 33 | } else { 34 | run(`vue-cli-service build ${args}`) 35 | } 36 | -------------------------------------------------------------------------------- /ruoyi-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/public/favicon.ico -------------------------------------------------------------------------------- /ruoyi-ui/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /ruoyi-ui/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 24 | 29 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/login.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 登录方法 4 | export function login(username, password, code, uuid) { 5 | const data = { 6 | username, 7 | password, 8 | code, 9 | uuid 10 | } 11 | return request({ 12 | url: '/login', 13 | headers: { 14 | isToken: false, 15 | repeatSubmit: false 16 | }, 17 | method: 'post', 18 | data: data 19 | }) 20 | } 21 | 22 | // 注册方法 23 | export function register(data) { 24 | return request({ 25 | url: '/register', 26 | headers: { 27 | isToken: false 28 | }, 29 | method: 'post', 30 | data: data 31 | }) 32 | } 33 | 34 | // 获取用户详细信息 35 | export function getInfo() { 36 | return request({ 37 | url: '/getInfo', 38 | method: 'get' 39 | }) 40 | } 41 | 42 | // 退出方法 43 | export function logout() { 44 | return request({ 45 | url: '/logout', 46 | method: 'post' 47 | }) 48 | } 49 | 50 | // 获取验证码 51 | export function getCodeImg() { 52 | return request({ 53 | url: '/captchaImage', 54 | headers: { 55 | isToken: false 56 | }, 57 | method: 'get', 58 | timeout: 20000 59 | }) 60 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/menu.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 获取路由 4 | export const getRouters = () => { 5 | return request({ 6 | url: '/getRouters', 7 | method: 'get' 8 | }) 9 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/cache.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询缓存详细 4 | export function getCache() { 5 | return request({ 6 | url: '/monitor/cache', 7 | method: 'get' 8 | }) 9 | } 10 | 11 | // 查询缓存名称列表 12 | export function listCacheName() { 13 | return request({ 14 | url: '/monitor/cache/getNames', 15 | method: 'get' 16 | }) 17 | } 18 | 19 | // 查询缓存键名列表 20 | export function listCacheKey(cacheName) { 21 | return request({ 22 | url: '/monitor/cache/getKeys/' + cacheName, 23 | method: 'get' 24 | }) 25 | } 26 | 27 | // 查询缓存内容 28 | export function getCacheValue(cacheName, cacheKey) { 29 | return request({ 30 | url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, 31 | method: 'get' 32 | }) 33 | } 34 | 35 | // 清理指定名称缓存 36 | export function clearCacheName(cacheName) { 37 | return request({ 38 | url: '/monitor/cache/clearCacheName/' + cacheName, 39 | method: 'delete' 40 | }) 41 | } 42 | 43 | // 清理指定键名缓存 44 | export function clearCacheKey(cacheKey) { 45 | return request({ 46 | url: '/monitor/cache/clearCacheKey/' + cacheKey, 47 | method: 'delete' 48 | }) 49 | } 50 | 51 | // 清理全部缓存 52 | export function clearCacheAll() { 53 | return request({ 54 | url: '/monitor/cache/clearCacheAll', 55 | method: 'delete' 56 | }) 57 | } 58 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/job.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询定时任务调度列表 4 | export function listJob(query) { 5 | return request({ 6 | url: '/monitor/job/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询定时任务调度详细 13 | export function getJob(jobId) { 14 | return request({ 15 | url: '/monitor/job/' + jobId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 新增定时任务调度 21 | export function addJob(data) { 22 | return request({ 23 | url: '/monitor/job', 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | // 修改定时任务调度 30 | export function updateJob(data) { 31 | return request({ 32 | url: '/monitor/job', 33 | method: 'put', 34 | data: data 35 | }) 36 | } 37 | 38 | // 删除定时任务调度 39 | export function delJob(jobId) { 40 | return request({ 41 | url: '/monitor/job/' + jobId, 42 | method: 'delete' 43 | }) 44 | } 45 | 46 | // 任务状态修改 47 | export function changeJobStatus(jobId, status) { 48 | const data = { 49 | jobId, 50 | status 51 | } 52 | return request({ 53 | url: '/monitor/job/changeStatus', 54 | method: 'put', 55 | data: data 56 | }) 57 | } 58 | 59 | 60 | // 定时任务立即执行一次 61 | export function runJob(jobId, jobGroup) { 62 | const data = { 63 | jobId, 64 | jobGroup 65 | } 66 | return request({ 67 | url: '/monitor/job/run', 68 | method: 'put', 69 | data: data 70 | }) 71 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/jobLog.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询调度日志列表 4 | export function listJobLog(query) { 5 | return request({ 6 | url: '/monitor/jobLog/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除调度日志 13 | export function delJobLog(jobLogId) { 14 | return request({ 15 | url: '/monitor/jobLog/' + jobLogId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 清空调度日志 21 | export function cleanJobLog() { 22 | return request({ 23 | url: '/monitor/jobLog/clean', 24 | method: 'delete' 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/logininfor.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询登录日志列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/logininfor/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除登录日志 13 | export function delLogininfor(infoId) { 14 | return request({ 15 | url: '/monitor/logininfor/' + infoId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 解锁用户登录状态 21 | export function unlockLogininfor(userName) { 22 | return request({ 23 | url: '/monitor/logininfor/unlock/' + userName, 24 | method: 'get' 25 | }) 26 | } 27 | 28 | // 清空登录日志 29 | export function cleanLogininfor() { 30 | return request({ 31 | url: '/monitor/logininfor/clean', 32 | method: 'delete' 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/online.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询在线用户列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/online/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 强退用户 13 | export function forceLogout(tokenId) { 14 | return request({ 15 | url: '/monitor/online/' + tokenId, 16 | method: 'delete' 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/operlog.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询操作日志列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/operlog/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除操作日志 13 | export function delOperlog(operId) { 14 | return request({ 15 | url: '/monitor/operlog/' + operId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 清空操作日志 21 | export function cleanOperlog() { 22 | return request({ 23 | url: '/monitor/operlog/clean', 24 | method: 'delete' 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/monitor/server.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 获取服务信息 4 | export function getServer() { 5 | return request({ 6 | url: '/monitor/server', 7 | method: 'get' 8 | }) 9 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/config.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询参数列表 4 | export function listConfig(query) { 5 | return request({ 6 | url: '/system/config/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询参数详细 13 | export function getConfig(configId) { 14 | return request({ 15 | url: '/system/config/' + configId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 根据参数键名查询参数值 21 | export function getConfigKey(configKey) { 22 | return request({ 23 | url: '/system/config/configKey/' + configKey, 24 | method: 'get' 25 | }) 26 | } 27 | 28 | // 新增参数配置 29 | export function addConfig(data) { 30 | return request({ 31 | url: '/system/config', 32 | method: 'post', 33 | data: data 34 | }) 35 | } 36 | 37 | // 修改参数配置 38 | export function updateConfig(data) { 39 | return request({ 40 | url: '/system/config', 41 | method: 'put', 42 | data: data 43 | }) 44 | } 45 | 46 | // 删除参数配置 47 | export function delConfig(configId) { 48 | return request({ 49 | url: '/system/config/' + configId, 50 | method: 'delete' 51 | }) 52 | } 53 | 54 | // 刷新参数缓存 55 | export function refreshCache() { 56 | return request({ 57 | url: '/system/config/refreshCache', 58 | method: 'delete' 59 | }) 60 | } 61 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/dept.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询部门列表 4 | export function listDept(query) { 5 | return request({ 6 | url: '/system/dept/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询部门列表(排除节点) 13 | export function listDeptExcludeChild(deptId) { 14 | return request({ 15 | url: '/system/dept/list/exclude/' + deptId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 查询部门详细 21 | export function getDept(deptId) { 22 | return request({ 23 | url: '/system/dept/' + deptId, 24 | method: 'get' 25 | }) 26 | } 27 | 28 | // 新增部门 29 | export function addDept(data) { 30 | return request({ 31 | url: '/system/dept', 32 | method: 'post', 33 | data: data 34 | }) 35 | } 36 | 37 | // 修改部门 38 | export function updateDept(data) { 39 | return request({ 40 | url: '/system/dept', 41 | method: 'put', 42 | data: data 43 | }) 44 | } 45 | 46 | // 删除部门 47 | export function delDept(deptId) { 48 | return request({ 49 | url: '/system/dept/' + deptId, 50 | method: 'delete' 51 | }) 52 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/dict/data.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询字典数据列表 4 | export function listData(query) { 5 | return request({ 6 | url: '/system/dict/data/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询字典数据详细 13 | export function getData(dictCode) { 14 | return request({ 15 | url: '/system/dict/data/' + dictCode, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 根据字典类型查询字典数据信息 21 | export function getDicts(dictType) { 22 | return request({ 23 | url: '/system/dict/data/type/' + dictType, 24 | method: 'get' 25 | }) 26 | } 27 | 28 | // 新增字典数据 29 | export function addData(data) { 30 | return request({ 31 | url: '/system/dict/data', 32 | method: 'post', 33 | data: data 34 | }) 35 | } 36 | 37 | // 修改字典数据 38 | export function updateData(data) { 39 | return request({ 40 | url: '/system/dict/data', 41 | method: 'put', 42 | data: data 43 | }) 44 | } 45 | 46 | // 删除字典数据 47 | export function delData(dictCode) { 48 | return request({ 49 | url: '/system/dict/data/' + dictCode, 50 | method: 'delete' 51 | }) 52 | } 53 | -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/dict/type.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询字典类型列表 4 | export function listType(query) { 5 | return request({ 6 | url: '/system/dict/type/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询字典类型详细 13 | export function getType(dictId) { 14 | return request({ 15 | url: '/system/dict/type/' + dictId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 新增字典类型 21 | export function addType(data) { 22 | return request({ 23 | url: '/system/dict/type', 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | // 修改字典类型 30 | export function updateType(data) { 31 | return request({ 32 | url: '/system/dict/type', 33 | method: 'put', 34 | data: data 35 | }) 36 | } 37 | 38 | // 删除字典类型 39 | export function delType(dictId) { 40 | return request({ 41 | url: '/system/dict/type/' + dictId, 42 | method: 'delete' 43 | }) 44 | } 45 | 46 | // 刷新字典缓存 47 | export function refreshCache() { 48 | return request({ 49 | url: '/system/dict/type/refreshCache', 50 | method: 'delete' 51 | }) 52 | } 53 | 54 | // 获取字典选择框列表 55 | export function optionselect() { 56 | return request({ 57 | url: '/system/dict/type/optionselect', 58 | method: 'get' 59 | }) 60 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/menu.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询菜单列表 4 | export function listMenu(query) { 5 | return request({ 6 | url: '/system/menu/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询菜单详细 13 | export function getMenu(menuId) { 14 | return request({ 15 | url: '/system/menu/' + menuId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 查询菜单下拉树结构 21 | export function treeselect() { 22 | return request({ 23 | url: '/system/menu/treeselect', 24 | method: 'get' 25 | }) 26 | } 27 | 28 | // 根据角色ID查询菜单下拉树结构 29 | export function roleMenuTreeselect(roleId) { 30 | return request({ 31 | url: '/system/menu/roleMenuTreeselect/' + roleId, 32 | method: 'get' 33 | }) 34 | } 35 | 36 | // 新增菜单 37 | export function addMenu(data) { 38 | return request({ 39 | url: '/system/menu', 40 | method: 'post', 41 | data: data 42 | }) 43 | } 44 | 45 | // 修改菜单 46 | export function updateMenu(data) { 47 | return request({ 48 | url: '/system/menu', 49 | method: 'put', 50 | data: data 51 | }) 52 | } 53 | 54 | // 删除菜单 55 | export function delMenu(menuId) { 56 | return request({ 57 | url: '/system/menu/' + menuId, 58 | method: 'delete' 59 | }) 60 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/notice.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询公告列表 4 | export function listNotice(query) { 5 | return request({ 6 | url: '/system/notice/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询公告详细 13 | export function getNotice(noticeId) { 14 | return request({ 15 | url: '/system/notice/' + noticeId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 新增公告 21 | export function addNotice(data) { 22 | return request({ 23 | url: '/system/notice', 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | // 修改公告 30 | export function updateNotice(data) { 31 | return request({ 32 | url: '/system/notice', 33 | method: 'put', 34 | data: data 35 | }) 36 | } 37 | 38 | // 删除公告 39 | export function delNotice(noticeId) { 40 | return request({ 41 | url: '/system/notice/' + noticeId, 42 | method: 'delete' 43 | }) 44 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/api/system/post.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询岗位列表 4 | export function listPost(query) { 5 | return request({ 6 | url: '/system/post/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 查询岗位详细 13 | export function getPost(postId) { 14 | return request({ 15 | url: '/system/post/' + postId, 16 | method: 'get' 17 | }) 18 | } 19 | 20 | // 新增岗位 21 | export function addPost(data) { 22 | return request({ 23 | url: '/system/post', 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | // 修改岗位 30 | export function updatePost(data) { 31 | return request({ 32 | url: '/system/post', 33 | method: 'put', 34 | data: data 35 | }) 36 | } 37 | 38 | // 删除岗位 39 | export function delPost(postId) { 40 | return request({ 41 | url: '/system/post/' + postId, 42 | method: 'delete' 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/401_images/401.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/401_images/401.gif -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/404_images/404.png -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon'// svg component 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const req = require.context('./svg', false, /\.svg$/) 8 | const requireAll = requireContext => requireContext.keys().map(requireContext) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/404.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/build.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/checkbox.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/clipboard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/documentation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/drag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/druid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/education.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/excel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/eye-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/fullscreen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/guide.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/input.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/international.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/language.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/list.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/log.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/money.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/monitor.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/people.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/peoples.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/phone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/post.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/question.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/radio.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/row.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/select.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/server.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/size.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/skill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/slider.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/switch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/tab.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/textarea.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/theme.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/time.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/tree-table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/validCode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svg/zip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/images/login-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/images/login-background.jpg -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/images/pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/images/pay.png -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/images/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/images/profile.jpg -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ruoyi-ui/src/assets/logo/logo.png -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/styles/element-variables.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * I think element-ui's default theme color is too light for long-term use. 3 | * So I modified the default color and you can modify it to your liking. 4 | **/ 5 | 6 | /* theme color */ 7 | $--color-primary: #1890ff; 8 | $--color-success: #13ce66; 9 | $--color-warning: #ffba00; 10 | $--color-danger: #ff4949; 11 | // $--color-info: #1E1E1E; 12 | 13 | $--button-font-weight: 400; 14 | 15 | // $--color-text-regular: #1f2d3d; 16 | 17 | $--border-color-light: #dfe4ed; 18 | $--border-color-lighter: #e6ebf5; 19 | 20 | $--table-border: 1px solid #dfe6ec; 21 | 22 | /* icon font path, required */ 23 | $--font-path: '~element-ui/lib/theme-chalk/fonts'; 24 | 25 | @import "~element-ui/packages/theme-chalk/src/index"; 26 | 27 | // the :export directive is the magic sauce for webpack 28 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass 29 | :export { 30 | theme: $--color-primary; 31 | } 32 | -------------------------------------------------------------------------------- /ruoyi-ui/src/assets/styles/transition.scss: -------------------------------------------------------------------------------- 1 | // global transition css 2 | 3 | /* fade */ 4 | .fade-enter-active, 5 | .fade-leave-active { 6 | transition: opacity 0.28s; 7 | } 8 | 9 | .fade-enter, 10 | .fade-leave-active { 11 | opacity: 0; 12 | } 13 | 14 | /* fade-transform */ 15 | .fade-transform--move, 16 | .fade-transform-leave-active, 17 | .fade-transform-enter-active { 18 | transition: all .5s; 19 | } 20 | 21 | .fade-transform-enter { 22 | opacity: 0; 23 | transform: translateX(-30px); 24 | } 25 | 26 | .fade-transform-leave-to { 27 | opacity: 0; 28 | transform: translateX(30px); 29 | } 30 | 31 | /* breadcrumb transition */ 32 | .breadcrumb-enter-active, 33 | .breadcrumb-leave-active { 34 | transition: all .5s; 35 | } 36 | 37 | .breadcrumb-enter, 38 | .breadcrumb-leave-active { 39 | opacity: 0; 40 | transform: translateX(20px); 41 | } 42 | 43 | .breadcrumb-move { 44 | transition: all .5s; 45 | } 46 | 47 | .breadcrumb-leave-active { 48 | position: absolute; 49 | } 50 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/DictData/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import store from '@/store' 3 | import DataDict from '@/utils/dict' 4 | import { getDicts as getDicts } from '@/api/system/dict/data' 5 | 6 | function searchDictByKey(dict, key) { 7 | if (key == null && key == "") { 8 | return null 9 | } 10 | try { 11 | for (let i = 0; i < dict.length; i++) { 12 | if (dict[i].key == key) { 13 | return dict[i].value 14 | } 15 | } 16 | } catch (e) { 17 | return null 18 | } 19 | } 20 | 21 | function install() { 22 | Vue.use(DataDict, { 23 | metas: { 24 | '*': { 25 | labelField: 'dictLabel', 26 | valueField: 'dictValue', 27 | request(dictMeta) { 28 | const storeDict = searchDictByKey(store.getters.dict, dictMeta.type) 29 | if (storeDict) { 30 | return new Promise(resolve => { resolve(storeDict) }) 31 | } else { 32 | return new Promise((resolve, reject) => { 33 | getDicts(dictMeta.type).then(res => { 34 | store.dispatch('dict/setDict', { key: dictMeta.type, value: res.data }) 35 | resolve(res.data) 36 | }).catch(error => { 37 | reject(error) 38 | }) 39 | }) 40 | } 41 | }, 42 | }, 43 | }, 44 | }) 45 | } 46 | 47 | export default { 48 | install, 49 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/components/Hamburger/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 32 | 33 | 45 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/IconSelect/requireIcons.js: -------------------------------------------------------------------------------- 1 | 2 | const req = require.context('../../assets/icons/svg', false, /\.svg$/) 3 | const requireAll = requireContext => requireContext.keys() 4 | 5 | const re = /\.\/(.*)\.svg/ 6 | 7 | const icons = requireAll(req).map(i => { 8 | return i.match(re)[1] 9 | }) 10 | 11 | export default icons 12 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/ParentView/index.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/RuoYi/Doc/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/RuoYi/Git/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/Screenfull/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 47 | 48 | 58 | -------------------------------------------------------------------------------- /ruoyi-ui/src/components/iFrame/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 48 | -------------------------------------------------------------------------------- /ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js: -------------------------------------------------------------------------------- 1 | export default { 2 | computed: { 3 | device() { 4 | return this.$store.state.app.device 5 | } 6 | }, 7 | mounted() { 8 | // In order to fix the click on menu on the ios device will trigger the mouseleave bug 9 | this.fixBugIniOS() 10 | }, 11 | methods: { 12 | fixBugIniOS() { 13 | const $subMenu = this.$refs.subMenu 14 | if ($subMenu) { 15 | const handleMouseleave = $subMenu.handleMouseleave 16 | $subMenu.handleMouseleave = (e) => { 17 | if (this.device === 'mobile') { 18 | return 19 | } 20 | handleMouseleave(e) 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ruoyi-ui/src/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /ruoyi-ui/src/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 44 | -------------------------------------------------------------------------------- /ruoyi-ui/src/layout/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as AppMain } from './AppMain' 2 | export { default as Navbar } from './Navbar' 3 | export { default as Settings } from './Settings' 4 | export { default as Sidebar } from './Sidebar/index.vue' 5 | export { default as TagsView } from './TagsView/index.vue' 6 | -------------------------------------------------------------------------------- /ruoyi-ui/src/layout/mixin/ResizeHandler.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | 3 | const { body } = document 4 | const WIDTH = 992 // refer to Bootstrap's responsive design 5 | 6 | export default { 7 | watch: { 8 | $route(route) { 9 | if (this.device === 'mobile' && this.sidebar.opened) { 10 | store.dispatch('app/closeSideBar', { withoutAnimation: false }) 11 | } 12 | } 13 | }, 14 | beforeMount() { 15 | window.addEventListener('resize', this.$_resizeHandler) 16 | }, 17 | beforeDestroy() { 18 | window.removeEventListener('resize', this.$_resizeHandler) 19 | }, 20 | mounted() { 21 | const isMobile = this.$_isMobile() 22 | if (isMobile) { 23 | store.dispatch('app/toggleDevice', 'mobile') 24 | store.dispatch('app/closeSideBar', { withoutAnimation: true }) 25 | } 26 | }, 27 | methods: { 28 | // use $_ for mixins properties 29 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential 30 | $_isMobile() { 31 | const rect = body.getBoundingClientRect() 32 | return rect.width - 1 < WIDTH 33 | }, 34 | $_resizeHandler() { 35 | if (!document.hidden) { 36 | const isMobile = this.$_isMobile() 37 | store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') 38 | 39 | if (isMobile) { 40 | store.dispatch('app/closeSideBar', { withoutAnimation: true }) 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ruoyi-ui/src/plugins/index.js: -------------------------------------------------------------------------------- 1 | import tab from './tab' 2 | import auth from './auth' 3 | import cache from './cache' 4 | import modal from './modal' 5 | import download from './download' 6 | 7 | export default { 8 | install(Vue) { 9 | // 页签操作 10 | Vue.prototype.$tab = tab 11 | // 认证对象 12 | Vue.prototype.$auth = auth 13 | // 缓存对象 14 | Vue.prototype.$cache = cache 15 | // 模态框对象 16 | Vue.prototype.$modal = modal 17 | // 下载文件 18 | Vue.prototype.$download = download 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ruoyi-ui/src/settings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * 侧边栏主题 深色主题theme-dark,浅色主题theme-light 4 | */ 5 | sideTheme: 'theme-dark', 6 | 7 | /** 8 | * 是否系统布局配置 9 | */ 10 | showSettings: false, 11 | 12 | /** 13 | * 是否显示顶部导航 14 | */ 15 | topNav: false, 16 | 17 | /** 18 | * 是否显示 tagsView 19 | */ 20 | tagsView: true, 21 | 22 | /** 23 | * 是否固定头部 24 | */ 25 | fixedHeader: false, 26 | 27 | /** 28 | * 是否显示logo 29 | */ 30 | sidebarLogo: true, 31 | 32 | /** 33 | * 是否显示动态标题 34 | */ 35 | dynamicTitle: false, 36 | 37 | /** 38 | * @type {string | array} 'production' | ['production', 'development'] 39 | * @description Need show err logs component. 40 | * The default is only used in the production env 41 | * If you want to also use it in dev, you can pass ['production', 'development'] 42 | */ 43 | errorLog: 'production' 44 | } 45 | -------------------------------------------------------------------------------- /ruoyi-ui/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | size: state => state.app.size, 4 | device: state => state.app.device, 5 | dict: state => state.dict.dict, 6 | visitedViews: state => state.tagsView.visitedViews, 7 | cachedViews: state => state.tagsView.cachedViews, 8 | token: state => state.user.token, 9 | avatar: state => state.user.avatar, 10 | name: state => state.user.name, 11 | introduction: state => state.user.introduction, 12 | roles: state => state.user.roles, 13 | permissions: state => state.user.permissions, 14 | permission_routes: state => state.permission.routes, 15 | topbarRouters:state => state.permission.topbarRouters, 16 | defaultRoutes:state => state.permission.defaultRoutes, 17 | sidebarRouters:state => state.permission.sidebarRouters, 18 | } 19 | export default getters 20 | -------------------------------------------------------------------------------- /ruoyi-ui/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import app from './modules/app' 4 | import dict from './modules/dict' 5 | import user from './modules/user' 6 | import tagsView from './modules/tagsView' 7 | import permission from './modules/permission' 8 | import settings from './modules/settings' 9 | import getters from './getters' 10 | 11 | Vue.use(Vuex) 12 | 13 | const store = new Vuex.Store({ 14 | modules: { 15 | app, 16 | dict, 17 | user, 18 | tagsView, 19 | permission, 20 | settings 21 | }, 22 | getters 23 | }) 24 | 25 | export default store 26 | -------------------------------------------------------------------------------- /ruoyi-ui/src/store/modules/dict.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | dict: new Array() 3 | } 4 | const mutations = { 5 | SET_DICT: (state, { key, value }) => { 6 | if (key !== null && key !== "") { 7 | state.dict.push({ 8 | key: key, 9 | value: value 10 | }) 11 | } 12 | }, 13 | REMOVE_DICT: (state, key) => { 14 | try { 15 | for (let i = 0; i < state.dict.length; i++) { 16 | if (state.dict[i].key == key) { 17 | state.dict.splice(i, 1) 18 | return true 19 | } 20 | } 21 | } catch (e) { 22 | } 23 | }, 24 | CLEAN_DICT: (state) => { 25 | state.dict = new Array() 26 | } 27 | } 28 | 29 | const actions = { 30 | // 设置字典 31 | setDict({ commit }, data) { 32 | commit('SET_DICT', data) 33 | }, 34 | // 删除字典 35 | removeDict({ commit }, key) { 36 | commit('REMOVE_DICT', key) 37 | }, 38 | // 清空字典 39 | cleanDict({ commit }) { 40 | commit('CLEAN_DICT') 41 | } 42 | } 43 | 44 | export default { 45 | namespaced: true, 46 | state, 47 | mutations, 48 | actions 49 | } 50 | 51 | -------------------------------------------------------------------------------- /ruoyi-ui/src/store/modules/settings.js: -------------------------------------------------------------------------------- 1 | import defaultSettings from '@/settings' 2 | 3 | const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings 4 | 5 | const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '' 6 | const state = { 7 | title: '', 8 | theme: storageSetting.theme || '#409EFF', 9 | sideTheme: storageSetting.sideTheme || sideTheme, 10 | showSettings: showSettings, 11 | topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav, 12 | tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView, 13 | fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, 14 | sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, 15 | dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle 16 | } 17 | const mutations = { 18 | CHANGE_SETTING: (state, { key, value }) => { 19 | if (state.hasOwnProperty(key)) { 20 | state[key] = value 21 | } 22 | } 23 | } 24 | 25 | const actions = { 26 | // 修改布局设置 27 | changeSetting({ commit }, data) { 28 | commit('CHANGE_SETTING', data) 29 | }, 30 | // 设置网页标题 31 | setTitle({ commit }, title) { 32 | state.title = title 33 | } 34 | } 35 | 36 | export default { 37 | namespaced: true, 38 | state, 39 | mutations, 40 | actions 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'Admin-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/dict/DictConverter.js: -------------------------------------------------------------------------------- 1 | import DictOptions from './DictOptions' 2 | import DictData from './DictData' 3 | 4 | export default function(dict, dictMeta) { 5 | const label = determineDictField(dict, dictMeta.labelField, ...DictOptions.DEFAULT_LABEL_FIELDS) 6 | const value = determineDictField(dict, dictMeta.valueField, ...DictOptions.DEFAULT_VALUE_FIELDS) 7 | return new DictData(dict[label], dict[value], dict) 8 | } 9 | 10 | /** 11 | * 确定字典字段 12 | * @param {DictData} dict 13 | * @param {...String} fields 14 | */ 15 | function determineDictField(dict, ...fields) { 16 | return fields.find(f => Object.prototype.hasOwnProperty.call(dict, f)) 17 | } 18 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/dict/DictData.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @classdesc 字典数据 3 | * @property {String} label 标签 4 | * @property {*} value 标签 5 | * @property {Object} raw 原始数据 6 | */ 7 | export default class DictData { 8 | constructor(label, value, raw) { 9 | this.label = label 10 | this.value = value 11 | this.raw = raw 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/dict/DictMeta.js: -------------------------------------------------------------------------------- 1 | import { mergeRecursive } from "@/utils/ruoyi"; 2 | import DictOptions from './DictOptions' 3 | 4 | /** 5 | * @classdesc 字典元数据 6 | * @property {String} type 类型 7 | * @property {Function} request 请求 8 | * @property {String} label 标签字段 9 | * @property {String} value 值字段 10 | */ 11 | export default class DictMeta { 12 | constructor(options) { 13 | this.type = options.type 14 | this.request = options.request 15 | this.responseConverter = options.responseConverter 16 | this.labelField = options.labelField 17 | this.valueField = options.valueField 18 | this.lazy = options.lazy === true 19 | } 20 | } 21 | 22 | 23 | /** 24 | * 解析字典元数据 25 | * @param {Object} options 26 | * @returns {DictMeta} 27 | */ 28 | DictMeta.parse= function(options) { 29 | let opts = null 30 | if (typeof options === 'string') { 31 | opts = DictOptions.metas[options] || {} 32 | opts.type = options 33 | } else if (typeof options === 'object') { 34 | opts = options 35 | } 36 | opts = mergeRecursive(DictOptions.metas['*'], opts) 37 | return new DictMeta(opts) 38 | } 39 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/dict/DictOptions.js: -------------------------------------------------------------------------------- 1 | import { mergeRecursive } from "@/utils/ruoyi"; 2 | import dictConverter from './DictConverter' 3 | 4 | export const options = { 5 | metas: { 6 | '*': { 7 | /** 8 | * 字典请求,方法签名为function(dictMeta: DictMeta): Promise 9 | */ 10 | request: (dictMeta) => { 11 | console.log(`load dict ${dictMeta.type}`) 12 | return Promise.resolve([]) 13 | }, 14 | /** 15 | * 字典响应数据转换器,方法签名为function(response: Object, dictMeta: DictMeta): DictData 16 | */ 17 | responseConverter, 18 | labelField: 'label', 19 | valueField: 'value', 20 | }, 21 | }, 22 | /** 23 | * 默认标签字段 24 | */ 25 | DEFAULT_LABEL_FIELDS: ['label', 'name', 'title'], 26 | /** 27 | * 默认值字段 28 | */ 29 | DEFAULT_VALUE_FIELDS: ['value', 'id', 'uid', 'key'], 30 | } 31 | 32 | /** 33 | * 映射字典 34 | * @param {Object} response 字典数据 35 | * @param {DictMeta} dictMeta 字典元数据 36 | * @returns {DictData} 37 | */ 38 | function responseConverter(response, dictMeta) { 39 | const dicts = response.content instanceof Array ? response.content : response 40 | if (dicts === undefined) { 41 | console.warn(`no dict data of "${dictMeta.type}" found in the response`) 42 | return [] 43 | } 44 | return dicts.map(d => dictConverter(d, dictMeta)) 45 | } 46 | 47 | export function mergeOptions(src) { 48 | mergeRecursive(options, src) 49 | } 50 | 51 | export default options 52 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/dict/index.js: -------------------------------------------------------------------------------- 1 | import Dict from './Dict' 2 | import { mergeOptions } from './DictOptions' 3 | 4 | export default function(Vue, options) { 5 | mergeOptions(options) 6 | Vue.mixin({ 7 | data() { 8 | if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) { 9 | return {} 10 | } 11 | const dict = new Dict() 12 | dict.owner = this 13 | return { 14 | dict 15 | } 16 | }, 17 | created() { 18 | if (!(this.dict instanceof Dict)) { 19 | return 20 | } 21 | options.onCreated && options.onCreated(this.dict) 22 | this.dict.init(this.$options.dicts).then(() => { 23 | options.onReady && options.onReady(this.dict) 24 | this.$nextTick(() => { 25 | this.$emit('dictReady', this.dict) 26 | if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) { 27 | this.$options.methods.onDictReady.call(this, this.dict) 28 | } 29 | }) 30 | }) 31 | }, 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/errorCode.js: -------------------------------------------------------------------------------- 1 | export default { 2 | '401': '认证失败,无法访问系统资源', 3 | '403': '当前操作没有权限', 4 | '404': '访问资源不存在', 5 | 'default': '系统未知错误,请反馈给管理员' 6 | } 7 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/generator/css.js: -------------------------------------------------------------------------------- 1 | const styles = { 2 | 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', 3 | 'el-upload': '.el-upload__tip{line-height: 1.2;}' 4 | } 5 | 6 | function addCss(cssList, el) { 7 | const css = styles[el.tag] 8 | css && cssList.indexOf(css) === -1 && cssList.push(css) 9 | if (el.children) { 10 | el.children.forEach(el2 => addCss(cssList, el2)) 11 | } 12 | } 13 | 14 | export function makeUpCss(conf) { 15 | const cssList = [] 16 | conf.fields.forEach(el => addCss(cssList, el)) 17 | return cssList.join('\n') 18 | } 19 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/generator/drawingDefault.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | layout: 'colFormItem', 4 | tagIcon: 'input', 5 | label: '手机号', 6 | vModel: 'mobile', 7 | formId: 6, 8 | tag: 'el-input', 9 | placeholder: '请输入手机号', 10 | defaultValue: '', 11 | span: 24, 12 | style: { width: '100%' }, 13 | clearable: true, 14 | prepend: '', 15 | append: '', 16 | 'prefix-icon': 'el-icon-mobile', 17 | 'suffix-icon': '', 18 | maxlength: 11, 19 | 'show-word-limit': true, 20 | readonly: false, 21 | disabled: false, 22 | required: true, 23 | changeTag: true, 24 | regList: [{ 25 | pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', 26 | message: '手机号格式错误' 27 | }] 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/jsencrypt.js: -------------------------------------------------------------------------------- 1 | import JSEncrypt from 'jsencrypt/bin/jsencrypt.min' 2 | 3 | // 密钥对生成 http://web.chacuo.net/netrsakeypair 4 | 5 | const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' + 6 | 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==' 7 | 8 | const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' + 9 | '7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' + 10 | 'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' + 11 | 'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' + 12 | 'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' + 13 | 'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' + 14 | 'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' + 15 | 'UP8iWi1Qw0Y=' 16 | 17 | // 加密 18 | export function encrypt(txt) { 19 | const encryptor = new JSEncrypt() 20 | encryptor.setPublicKey(publicKey) // 设置公钥 21 | return encryptor.encrypt(txt) // 对数据进行加密 22 | } 23 | 24 | // 解密 25 | export function decrypt(txt) { 26 | const encryptor = new JSEncrypt() 27 | encryptor.setPrivateKey(privateKey) // 设置私钥 28 | return encryptor.decrypt(txt) // 对数据进行解密 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ruoyi-ui/src/utils/permission.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | 3 | /** 4 | * 字符权限校验 5 | * @param {Array} value 校验值 6 | * @returns {Boolean} 7 | */ 8 | export function checkPermi(value) { 9 | if (value && value instanceof Array && value.length > 0) { 10 | const permissions = store.getters && store.getters.permissions 11 | const permissionDatas = value 12 | const all_permission = "*:*:*"; 13 | 14 | const hasPermission = permissions.some(permission => { 15 | return all_permission === permission || permissionDatas.includes(permission) 16 | }) 17 | 18 | return hasPermission; 19 | 20 | } else { 21 | console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) 22 | return false 23 | } 24 | } 25 | 26 | /** 27 | * 角色权限校验 28 | * @param {Array} value 校验值 29 | * @returns {Boolean} 30 | */ 31 | export function checkRole(value) { 32 | if (value && value instanceof Array && value.length > 0) { 33 | const roles = store.getters && store.getters.roles 34 | const permissionRoles = value 35 | const super_admin = "admin"; 36 | 37 | const hasRole = roles.some(role => { 38 | return super_admin === role || permissionRoles.includes(role) 39 | }) 40 | 41 | return hasRole; 42 | 43 | } else { 44 | console.error(`need roles! Like checkRole="['admin','editor']"`) 45 | return false 46 | } 47 | } -------------------------------------------------------------------------------- /ruoyi-ui/src/views/monitor/druid/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 16 | -------------------------------------------------------------------------------- /ruoyi-ui/src/views/redirect.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /ruoyi-ui/src/views/tool/gen/createTable.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 46 | -------------------------------------------------------------------------------- /ruoyi-ui/src/views/tool/swagger/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 16 | -------------------------------------------------------------------------------- /ry.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StormyTech317/AdminPanel_Vue/af8e7144e2aab225b2f383748c1c33b8859c3e53/ry.bat --------------------------------------------------------------------------------