├── .gitignore ├── LICENSE ├── README.md ├── docs ├── .vuepress │ ├── config.js │ └── public │ │ ├── favicon.ico │ │ └── logo.png ├── README.md ├── SUMMARY.md ├── action │ ├── cache.md │ ├── i18n.md │ ├── jpaauditing.md │ ├── sqlite.md │ └── task.md ├── base │ ├── jdkAndMaven.md │ ├── modules.md │ ├── preface.md │ └── zanshan.jpg ├── config │ ├── application.md │ ├── beetl.md │ ├── ehcache.md │ ├── logback.md │ ├── shiro.md │ └── swagger.md ├── demo.gif ├── donate.md ├── ecosystem │ ├── code-generator.md │ ├── database-doc-generator.md │ └── doc │ │ ├── boy.png │ │ ├── code-generate.png │ │ ├── doc.jpg │ │ ├── generate-result.png │ │ ├── menu-list.png │ │ ├── menu1.png │ │ ├── menu2.png │ │ ├── role.png │ │ ├── summary.jpg │ │ ├── table.jpg │ │ └── word.jpg ├── feature │ ├── dict.md │ ├── fileMgr.md │ ├── img │ │ ├── dict.jpg │ │ ├── guns-admin.jpg │ │ ├── guns-src.jpg │ │ ├── guns-web-js.jpg │ │ ├── guns-web-page.jpg │ │ ├── guns-web.jpg │ │ ├── loginLog.jpg │ │ ├── menu.jpg │ │ ├── menu_vue.jpg │ │ ├── modules.jpg │ │ ├── monitor.jpg │ │ ├── role_vue.jpg │ │ ├── sysConfig.jpg │ │ ├── user_role.jpg │ │ └── user_role_vue.jpg │ ├── log.md │ ├── menu.md │ ├── modules.md │ ├── monitor.md │ ├── permissionMgr.md │ └── sysConfig.md ├── hello_guns │ ├── account.jpg │ ├── add.md │ ├── base.md │ ├── create_table.md │ ├── delete.md │ ├── hello_guns.md │ ├── list.md │ ├── menu.jpg │ ├── menuAndPermission.md │ ├── role.jpg │ └── update.md ├── img │ ├── alipay.jpg │ ├── donate.jpg │ ├── resource │ │ └── menu_1.jpg │ ├── task_add.png │ ├── task_list.png │ ├── task_log.png │ └── wechat.jpg ├── other │ └── faq.md ├── package-lock.json ├── package.json ├── quickstart │ ├── clone.md │ ├── config.md │ ├── index.jpg │ ├── initDb.md │ ├── login.jpg │ ├── quickstart.md │ └── startup.md ├── resource.md └── yarn.lock ├── guns-admin ├── pom.xml └── src │ └── main │ ├── java │ └── cn │ │ └── enilu │ │ └── guns │ │ └── admin │ │ ├── AdminApplication.java │ │ ├── AdminServletInitializer.java │ │ ├── common │ │ └── constant │ │ │ ├── DatasourceEnum.java │ │ │ ├── enums │ │ │ └── Status.java │ │ │ └── state │ │ │ ├── ExpenseState.java │ │ │ ├── IsMenu.java │ │ │ └── MenuOpenStatus.java │ │ ├── config │ │ ├── DefaultFastjsonConfig.java │ │ ├── EhCacheConfig.java │ │ ├── SpringSessionConfig.java │ │ ├── SwaggerConfig.java │ │ ├── UserIDAuditorConfig.java │ │ ├── properties │ │ │ ├── BeetlProperties.java │ │ │ └── GunsProperties.java │ │ └── web │ │ │ ├── BeetlConfig.java │ │ │ ├── ShiroConfig.java │ │ │ └── WebConfig.java │ │ ├── core │ │ ├── CoreFlag.java │ │ ├── aop │ │ │ ├── BaseControllerExceptionHandler.java │ │ │ └── GlobalExceptionHandler.java │ │ ├── base │ │ │ ├── controller │ │ │ │ ├── BaseController.java │ │ │ │ ├── GlobalController.java │ │ │ │ └── GunsErrorView.java │ │ │ └── tips │ │ │ │ ├── ErrorTip.java │ │ │ │ ├── SuccessTip.java │ │ │ │ └── Tip.java │ │ ├── beetl │ │ │ ├── BeetlConfiguration.java │ │ │ └── ShiroExt.java │ │ ├── cache │ │ │ ├── BaseCacheFactory.java │ │ │ ├── CacheKit.java │ │ │ ├── EhcacheFactory.java │ │ │ ├── ICache.java │ │ │ └── ILoader.java │ │ ├── datascope │ │ │ └── DataScope.java │ │ ├── datasource │ │ │ └── DruidProperties.java │ │ ├── intercept │ │ │ ├── SessionInterceptor.java │ │ │ └── SessionTimeoutInterceptor.java │ │ ├── mutidatasource │ │ │ ├── DataSourceContextHolder.java │ │ │ ├── DynamicDataSource.java │ │ │ ├── annotion │ │ │ │ └── DataSource.java │ │ │ ├── aop │ │ │ │ └── MultiSourceExAop.java │ │ │ └── config │ │ │ │ └── MutiDataSourceProperties.java │ │ ├── page │ │ │ ├── PageBT.java │ │ │ └── PageInfoBT.java │ │ ├── qr │ │ │ ├── ImgQrTool.java │ │ │ ├── MatrixToImageConfig.java │ │ │ ├── MatrixToImageWriter.java │ │ │ └── QrImage.java │ │ ├── support │ │ │ ├── BasicType.java │ │ │ ├── BeanKit.java │ │ │ ├── ClassKit.java │ │ │ ├── CollectionKit.java │ │ │ ├── DateTime.java │ │ │ ├── DateTimeKit.java │ │ │ ├── HexKit.java │ │ │ ├── ObjectKit.java │ │ │ ├── PageKit.java │ │ │ └── exception │ │ │ │ └── ToolBoxException.java │ │ ├── util │ │ │ ├── ApiMenuFilter.java │ │ │ ├── FileUtil.java │ │ │ ├── HttpSessionHolder.java │ │ │ ├── KaptchaUtil.java │ │ │ ├── MD5Util.java │ │ │ ├── NumUtil.java │ │ │ ├── PingYinUtil.java │ │ │ ├── RenderUtil.java │ │ │ ├── ResKit.java │ │ │ └── SqlUtil.java │ │ └── xss │ │ │ ├── XssFilter.java │ │ │ └── XssHttpServletRequestWrapper.java │ │ ├── modular │ │ ├── message │ │ │ ├── MessageController.java │ │ │ ├── MessagesenderController.java │ │ │ └── MessagetemplateController.java │ │ └── system │ │ │ ├── controller │ │ │ ├── BlackboardController.java │ │ │ ├── CfgController.java │ │ │ ├── DeptController.java │ │ │ ├── DictController.java │ │ │ ├── KaptchaController.java │ │ │ ├── LogController.java │ │ │ ├── LoginController.java │ │ │ ├── LoginLogController.java │ │ │ ├── MenuController.java │ │ │ ├── NoticeController.java │ │ │ ├── RoleController.java │ │ │ ├── TaskController.java │ │ │ └── UserMgrController.java │ │ │ └── transfer │ │ │ ├── ManagerUser.java │ │ │ ├── ReqAddManager.java │ │ │ └── ReqEditManager.java │ │ └── runner │ │ └── StartJob.java │ ├── resources │ ├── META-INF │ │ └── spring-devtools.properties │ ├── application-dev.properties │ ├── application-prod.properties │ ├── application.properties │ ├── banner.txt │ ├── ehcache.xml │ ├── import.sql │ └── logback.xml │ └── webapp │ ├── WEB-INF │ └── view │ │ ├── 404.html │ │ ├── blackboard.html │ │ ├── common │ │ ├── _container.html │ │ ├── _right.html │ │ ├── _tab.html │ │ ├── _theme.html │ │ └── tags │ │ │ ├── NameCon.tag │ │ │ ├── SelectCon.tag │ │ │ ├── TimeCon.tag │ │ │ ├── avatar.tag │ │ │ ├── button.tag │ │ │ ├── input.tag │ │ │ ├── select.tag │ │ │ ├── table.tag │ │ │ └── textarea.tag │ │ ├── index.html │ │ ├── login.html │ │ ├── message │ │ ├── history │ │ │ ├── message.html │ │ │ └── message_view.html │ │ ├── sender │ │ │ ├── sender.html │ │ │ ├── sender_add.html │ │ │ └── sender_edit.html │ │ └── template │ │ │ ├── template.html │ │ │ ├── template_add.html │ │ │ └── template_edit.html │ │ └── system │ │ ├── cfg │ │ ├── cfg.html │ │ ├── cfg_add.html │ │ └── cfg_edit.html │ │ ├── code │ │ └── code.html │ │ ├── dept │ │ ├── dept.html │ │ ├── dept_add.html │ │ └── dept_edit.html │ │ ├── dict │ │ ├── dict.html │ │ ├── dict_add.html │ │ └── dict_edit.html │ │ ├── log │ │ ├── log.html │ │ └── login_log.html │ │ ├── menu │ │ ├── menu.html │ │ ├── menu_add.html │ │ └── menu_edit.html │ │ ├── notice │ │ ├── notice.html │ │ ├── notice_add.html │ │ └── notice_edit.html │ │ ├── role │ │ ├── role.html │ │ ├── role_add.html │ │ ├── role_assign.html │ │ └── role_edit.html │ │ ├── task │ │ ├── task.html │ │ ├── task_add.html │ │ ├── task_edit.html │ │ └── task_log.html │ │ └── user │ │ ├── user.html │ │ ├── user_add.html │ │ ├── user_chpwd.html │ │ ├── user_edit.html │ │ ├── user_roleassign.html │ │ └── user_view.html │ └── static │ ├── css │ ├── _fstyle.css │ ├── animate.css │ ├── bootstrap-rtl.css │ ├── bootstrap.min.css │ ├── edu-finance.css │ ├── font-awesome.css │ ├── font-awesome.min.css │ ├── login.css │ ├── patterns │ │ ├── header-profile-skin-1.png │ │ ├── header-profile-skin-3.png │ │ ├── header-profile.png │ │ └── shattered.png │ ├── plugins │ │ ├── awesome-bootstrap-checkbox │ │ │ └── awesome-bootstrap-checkbox.css │ │ ├── blueimp │ │ │ ├── css │ │ │ │ ├── blueimp-gallery-indicator.css │ │ │ │ ├── blueimp-gallery-video.css │ │ │ │ ├── blueimp-gallery.css │ │ │ │ ├── blueimp-gallery.min.css │ │ │ │ └── demo.css │ │ │ └── img │ │ │ │ ├── error.png │ │ │ │ ├── error.svg │ │ │ │ ├── loading.gif │ │ │ │ ├── play-pause.png │ │ │ │ ├── play-pause.svg │ │ │ │ ├── video-play.png │ │ │ │ └── video-play.svg │ │ ├── bootstrap-table │ │ │ └── bootstrap-table.min.css │ │ ├── chosen │ │ │ ├── chosen-sprite.png │ │ │ ├── chosen-sprite@2x.png │ │ │ └── chosen.css │ │ ├── clockpicker │ │ │ └── clockpicker.css │ │ ├── codemirror │ │ │ ├── ambiance.css │ │ │ └── codemirror.css │ │ ├── colorpicker │ │ │ ├── css │ │ │ │ └── bootstrap-colorpicker.min.css │ │ │ └── img │ │ │ │ └── bootstrap-colorpicker │ │ │ │ ├── alpha-horizontal.png │ │ │ │ ├── alpha.png │ │ │ │ ├── hue-horizontal.png │ │ │ │ ├── hue.png │ │ │ │ └── saturation.png │ │ ├── cropper │ │ │ └── cropper.min.css │ │ ├── dataTables │ │ │ └── dataTables.bootstrap.css │ │ ├── datapicker │ │ │ └── datepicker3.css │ │ ├── dropzone │ │ │ ├── basic.css │ │ │ └── dropzone.css │ │ ├── duallistbox │ │ │ └── bootstrap-duallistbox.css │ │ ├── footable │ │ │ ├── fonts │ │ │ │ ├── footable.eot │ │ │ │ ├── footable.svg │ │ │ │ ├── footable.ttf │ │ │ │ └── footable.woff │ │ │ └── footable.core.css │ │ ├── fullcalendar │ │ │ ├── fullcalendar.css │ │ │ └── fullcalendar.print.css │ │ ├── iCheck │ │ │ ├── custom.css │ │ │ ├── green.png │ │ │ └── green@2x.png │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_desc.png │ │ │ ├── sprite-skin-flat.png │ │ │ ├── spritemap.png │ │ │ └── spritemap@2x.png │ │ ├── ionRangeSlider │ │ │ ├── ion.rangeSlider.css │ │ │ └── ion.rangeSlider.skinFlat.css │ │ ├── jQueryUI │ │ │ ├── images │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ └── ui-icons_888888_256x240.png │ │ │ └── jquery-ui-1.10.4.custom.min.css │ │ ├── jasny │ │ │ └── jasny-bootstrap.min.css │ │ ├── jqgrid │ │ │ └── ui.jqgrid.css │ │ ├── jquery-treegrid │ │ │ ├── css │ │ │ │ └── jquery.treegrid.css │ │ │ └── img │ │ │ │ ├── collapse.png │ │ │ │ ├── expand.png │ │ │ │ ├── file.png │ │ │ │ └── folder.png │ │ ├── jsTree │ │ │ ├── 32px.png │ │ │ ├── style.min.css │ │ │ └── throbber.gif │ │ ├── markdown │ │ │ └── bootstrap-markdown.min.css │ │ ├── morris │ │ │ └── morris-0.4.3.min.css │ │ ├── multiselect │ │ │ └── bootstrap-multiselect.css │ │ ├── nouslider │ │ │ └── jquery.nouislider.css │ │ ├── plyr │ │ │ ├── plyr.css │ │ │ └── sprite.svg │ │ ├── simditor │ │ │ └── simditor.css │ │ ├── steps │ │ │ └── jquery.steps.css │ │ ├── summernote │ │ │ ├── summernote-bs3.css │ │ │ └── summernote.css │ │ ├── sweetalert │ │ │ └── sweetalert.css │ │ ├── switchery │ │ │ └── switchery.css │ │ ├── toastr │ │ │ └── toastr.min.css │ │ ├── treeview │ │ │ └── bootstrap-treeview.css │ │ ├── validate │ │ │ └── bootstrapValidator.min.css │ │ ├── webuploader │ │ │ └── webuploader.css │ │ └── ztree │ │ │ ├── demo.css │ │ │ ├── img │ │ │ ├── diy │ │ │ │ ├── 1_close.png │ │ │ │ ├── 1_open.png │ │ │ │ ├── 2.png │ │ │ │ ├── 3.png │ │ │ │ ├── 4.png │ │ │ │ ├── 5.png │ │ │ │ ├── 6.png │ │ │ │ ├── 7.png │ │ │ │ ├── 8.png │ │ │ │ └── 9.png │ │ │ ├── line_conn.gif │ │ │ ├── loading.gif │ │ │ ├── zTreeStandard.gif │ │ │ └── zTreeStandard.png │ │ │ └── zTreeStyle.css │ └── style.css │ ├── favicon.ico │ ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ ├── img │ ├── bg.png │ ├── bg │ │ └── bg.jpg │ ├── girl.png │ ├── icons.png │ ├── loading-upload.gif │ ├── locked.png │ ├── login-background.jpg │ └── user.png │ ├── js │ ├── bootstrap.min.js │ ├── common │ │ ├── Feng.js │ │ ├── ajax-object.js │ │ ├── bootstrap-table-object.js │ │ ├── select-list-object.js │ │ ├── tree-table-object.js │ │ ├── web-upload-object.js │ │ └── ztree-object.js │ ├── contabs.js │ ├── content.js │ ├── hplus.js │ ├── jquery-ui-1.10.4.min.js │ ├── jquery-ui.custom.min.js │ ├── jquery.min.js │ ├── jquery.min.map │ ├── plugins │ │ ├── beautifyhtml │ │ │ └── beautifyhtml.js │ │ ├── blueimp │ │ │ └── jquery.blueimp-gallery.min.js │ │ ├── bootstrap-magnify │ │ │ ├── css │ │ │ │ ├── bootstrap-magnify.css │ │ │ │ └── bootstrap-magnify.min.css │ │ │ └── js │ │ │ │ ├── bootstrap-magnify.js │ │ │ │ └── bootstrap-magnify.min.js │ │ ├── bootstrap-table │ │ │ ├── bootstrap-table-mobile.min.js │ │ │ ├── bootstrap-table.min.js │ │ │ └── locale │ │ │ │ ├── bootstrap-table-zh-CN.js │ │ │ │ └── bootstrap-table-zh-CN.min.js │ │ ├── chartJs │ │ │ └── Chart.min.js │ │ ├── chosen │ │ │ └── chosen.jquery.js │ │ ├── clockpicker │ │ │ └── clockpicker.js │ │ ├── codemirror │ │ │ ├── codemirror.js │ │ │ └── mode │ │ │ │ ├── apl │ │ │ │ ├── apl.js │ │ │ │ └── index.html │ │ │ │ ├── asterisk │ │ │ │ ├── asterisk.js │ │ │ │ └── index.html │ │ │ │ ├── clike │ │ │ │ ├── clike.js │ │ │ │ ├── index.html │ │ │ │ └── scala.html │ │ │ │ ├── clojure │ │ │ │ ├── clojure.js │ │ │ │ └── index.html │ │ │ │ ├── cobol │ │ │ │ ├── cobol.js │ │ │ │ └── index.html │ │ │ │ ├── coffeescript │ │ │ │ ├── coffeescript.js │ │ │ │ └── index.html │ │ │ │ ├── commonlisp │ │ │ │ ├── commonlisp.js │ │ │ │ └── index.html │ │ │ │ ├── css │ │ │ │ ├── css.js │ │ │ │ ├── index.html │ │ │ │ ├── less.html │ │ │ │ ├── less_test.js │ │ │ │ ├── scss.html │ │ │ │ ├── scss_test.js │ │ │ │ └── test.js │ │ │ │ ├── cypher │ │ │ │ ├── cypher.js │ │ │ │ └── index.html │ │ │ │ ├── d │ │ │ │ ├── d.js │ │ │ │ └── index.html │ │ │ │ ├── dart │ │ │ │ ├── dart.js │ │ │ │ └── index.html │ │ │ │ ├── diff │ │ │ │ ├── diff.js │ │ │ │ └── index.html │ │ │ │ ├── django │ │ │ │ ├── django.js │ │ │ │ └── index.html │ │ │ │ ├── dockerfile │ │ │ │ ├── dockerfile.js │ │ │ │ └── index.html │ │ │ │ ├── dtd │ │ │ │ ├── dtd.js │ │ │ │ └── index.html │ │ │ │ ├── dylan │ │ │ │ ├── dylan.js │ │ │ │ └── index.html │ │ │ │ ├── ebnf │ │ │ │ ├── ebnf.js │ │ │ │ └── index.html │ │ │ │ ├── ecl │ │ │ │ ├── ecl.js │ │ │ │ └── index.html │ │ │ │ ├── eiffel │ │ │ │ ├── eiffel.js │ │ │ │ └── index.html │ │ │ │ ├── erlang │ │ │ │ ├── erlang.js │ │ │ │ └── index.html │ │ │ │ ├── fortran │ │ │ │ ├── fortran.js │ │ │ │ └── index.html │ │ │ │ ├── gas │ │ │ │ ├── gas.js │ │ │ │ └── index.html │ │ │ │ ├── gfm │ │ │ │ ├── gfm.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ │ ├── gherkin │ │ │ │ ├── gherkin.js │ │ │ │ └── index.html │ │ │ │ ├── go │ │ │ │ ├── go.js │ │ │ │ └── index.html │ │ │ │ ├── groovy │ │ │ │ ├── groovy.js │ │ │ │ └── index.html │ │ │ │ ├── haml │ │ │ │ ├── haml.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ │ ├── haskell │ │ │ │ ├── haskell.js │ │ │ │ └── index.html │ │ │ │ ├── haxe │ │ │ │ ├── haxe.js │ │ │ │ └── index.html │ │ │ │ ├── htmlembedded │ │ │ │ ├── htmlembedded.js │ │ │ │ └── index.html │ │ │ │ ├── htmlmixed │ │ │ │ ├── htmlmixed.js │ │ │ │ └── index.html │ │ │ │ ├── http │ │ │ │ ├── http.js │ │ │ │ └── index.html │ │ │ │ ├── idl │ │ │ │ ├── idl.js │ │ │ │ └── index.html │ │ │ │ ├── index.html │ │ │ │ ├── jade │ │ │ │ ├── index.html │ │ │ │ └── jade.js │ │ │ │ ├── javascript │ │ │ │ ├── index.html │ │ │ │ ├── javascript.js │ │ │ │ ├── json-ld.html │ │ │ │ ├── test.js │ │ │ │ └── typescript.html │ │ │ │ ├── jinja2 │ │ │ │ ├── index.html │ │ │ │ └── jinja2.js │ │ │ │ ├── julia │ │ │ │ ├── index.html │ │ │ │ └── julia.js │ │ │ │ ├── kotlin │ │ │ │ ├── index.html │ │ │ │ └── kotlin.js │ │ │ │ ├── livescript │ │ │ │ ├── index.html │ │ │ │ └── livescript.js │ │ │ │ ├── lua │ │ │ │ ├── index.html │ │ │ │ └── lua.js │ │ │ │ ├── markdown │ │ │ │ ├── index.html │ │ │ │ ├── markdown.js │ │ │ │ └── test.js │ │ │ │ ├── meta.js │ │ │ │ ├── mirc │ │ │ │ ├── index.html │ │ │ │ └── mirc.js │ │ │ │ ├── mllike │ │ │ │ ├── index.html │ │ │ │ └── mllike.js │ │ │ │ ├── modelica │ │ │ │ ├── index.html │ │ │ │ └── modelica.js │ │ │ │ ├── nginx │ │ │ │ ├── index.html │ │ │ │ └── nginx.js │ │ │ │ ├── ntriples │ │ │ │ ├── index.html │ │ │ │ └── ntriples.js │ │ │ │ ├── octave │ │ │ │ ├── index.html │ │ │ │ └── octave.js │ │ │ │ ├── pascal │ │ │ │ ├── index.html │ │ │ │ └── pascal.js │ │ │ │ ├── pegjs │ │ │ │ ├── index.html │ │ │ │ └── pegjs.js │ │ │ │ ├── perl │ │ │ │ ├── index.html │ │ │ │ └── perl.js │ │ │ │ ├── php │ │ │ │ ├── index.html │ │ │ │ ├── php.js │ │ │ │ └── test.js │ │ │ │ ├── pig │ │ │ │ ├── index.html │ │ │ │ └── pig.js │ │ │ │ ├── properties │ │ │ │ ├── index.html │ │ │ │ └── properties.js │ │ │ │ ├── puppet │ │ │ │ ├── index.html │ │ │ │ └── puppet.js │ │ │ │ ├── python │ │ │ │ ├── index.html │ │ │ │ └── python.js │ │ │ │ ├── q │ │ │ │ ├── index.html │ │ │ │ └── q.js │ │ │ │ ├── r │ │ │ │ ├── index.html │ │ │ │ └── r.js │ │ │ │ ├── rpm │ │ │ │ ├── changes │ │ │ │ │ └── index.html │ │ │ │ ├── index.html │ │ │ │ └── rpm.js │ │ │ │ ├── rst │ │ │ │ ├── index.html │ │ │ │ └── rst.js │ │ │ │ ├── ruby │ │ │ │ ├── index.html │ │ │ │ ├── ruby.js │ │ │ │ └── test.js │ │ │ │ ├── rust │ │ │ │ ├── index.html │ │ │ │ └── rust.js │ │ │ │ ├── sass │ │ │ │ ├── index.html │ │ │ │ └── sass.js │ │ │ │ ├── scheme │ │ │ │ ├── index.html │ │ │ │ └── scheme.js │ │ │ │ ├── shell │ │ │ │ ├── index.html │ │ │ │ ├── shell.js │ │ │ │ └── test.js │ │ │ │ ├── sieve │ │ │ │ ├── index.html │ │ │ │ └── sieve.js │ │ │ │ ├── slim │ │ │ │ ├── index.html │ │ │ │ ├── slim.js │ │ │ │ └── test.js │ │ │ │ ├── smalltalk │ │ │ │ ├── index.html │ │ │ │ └── smalltalk.js │ │ │ │ ├── smarty │ │ │ │ ├── index.html │ │ │ │ └── smarty.js │ │ │ │ ├── smartymixed │ │ │ │ ├── index.html │ │ │ │ └── smartymixed.js │ │ │ │ ├── solr │ │ │ │ ├── index.html │ │ │ │ └── solr.js │ │ │ │ ├── soy │ │ │ │ ├── index.html │ │ │ │ └── soy.js │ │ │ │ ├── sparql │ │ │ │ ├── index.html │ │ │ │ └── sparql.js │ │ │ │ ├── spreadsheet │ │ │ │ ├── index.html │ │ │ │ └── spreadsheet.js │ │ │ │ ├── sql │ │ │ │ ├── index.html │ │ │ │ └── sql.js │ │ │ │ ├── stex │ │ │ │ ├── index.html │ │ │ │ ├── stex.js │ │ │ │ └── test.js │ │ │ │ ├── tcl │ │ │ │ ├── index.html │ │ │ │ └── tcl.js │ │ │ │ ├── textile │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── textile.js │ │ │ │ ├── tiddlywiki │ │ │ │ ├── index.html │ │ │ │ ├── tiddlywiki.css │ │ │ │ └── tiddlywiki.js │ │ │ │ ├── tiki │ │ │ │ ├── index.html │ │ │ │ ├── tiki.css │ │ │ │ └── tiki.js │ │ │ │ ├── toml │ │ │ │ ├── index.html │ │ │ │ └── toml.js │ │ │ │ ├── tornado │ │ │ │ ├── index.html │ │ │ │ └── tornado.js │ │ │ │ ├── turtle │ │ │ │ ├── index.html │ │ │ │ └── turtle.js │ │ │ │ ├── vb │ │ │ │ ├── index.html │ │ │ │ └── vb.js │ │ │ │ ├── vbscript │ │ │ │ ├── index.html │ │ │ │ └── vbscript.js │ │ │ │ ├── velocity │ │ │ │ ├── index.html │ │ │ │ └── velocity.js │ │ │ │ ├── verilog │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── verilog.js │ │ │ │ ├── xml │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── xml.js │ │ │ │ ├── xquery │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── xquery.js │ │ │ │ ├── yaml │ │ │ │ ├── index.html │ │ │ │ └── yaml.js │ │ │ │ └── z80 │ │ │ │ ├── index.html │ │ │ │ └── z80.js │ │ ├── colorpicker │ │ │ └── bootstrap-colorpicker.min.js │ │ ├── cropper │ │ │ └── cropper.min.js │ │ ├── dataTables │ │ │ ├── dataTables.bootstrap.js │ │ │ └── jquery.dataTables.js │ │ ├── datapicker │ │ │ └── bootstrap-datepicker.js │ │ ├── diff_match_patch │ │ │ └── diff_match_patch.js │ │ ├── dropzone │ │ │ └── dropzone.js │ │ ├── duallistbox │ │ │ └── jquery.bootstrap-duallistbox.js │ │ ├── easypiechart │ │ │ └── jquery.easypiechart.js │ │ ├── echarts │ │ │ └── echarts-all.js │ │ ├── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ ├── fancybox_loading@2x.gif │ │ │ ├── fancybox_overlay.png │ │ │ ├── fancybox_sprite.png │ │ │ ├── fancybox_sprite@2x.png │ │ │ ├── jquery.fancybox.css │ │ │ └── jquery.fancybox.js │ │ ├── flot │ │ │ ├── curvedLines.js │ │ │ ├── jquery.flot.js │ │ │ ├── jquery.flot.pie.js │ │ │ ├── jquery.flot.resize.js │ │ │ ├── jquery.flot.spline.js │ │ │ ├── jquery.flot.symbol.js │ │ │ └── jquery.flot.tooltip.min.js │ │ ├── footable │ │ │ └── footable.all.min.js │ │ ├── fullcalendar │ │ │ ├── fullcalendar.min.js │ │ │ └── moment.min.js │ │ ├── gritter │ │ │ ├── images │ │ │ │ ├── gritter-light.png │ │ │ │ ├── gritter.png │ │ │ │ └── ie-spacer.gif │ │ │ ├── jquery.gritter.css │ │ │ └── jquery.gritter.min.js │ │ ├── iCheck │ │ │ └── icheck.min.js │ │ ├── ionRangeSlider │ │ │ ├── ion.rangeSlider.min.js │ │ │ └── jasny │ │ │ │ └── jasny-bootstrap.min.js │ │ ├── jasny │ │ │ └── jasny-bootstrap.min.js │ │ ├── jeditable │ │ │ └── jquery.jeditable.js │ │ ├── jqgrid │ │ │ ├── i18n │ │ │ │ └── grid.locale-cn.js │ │ │ └── jquery.jqGrid.min.js │ │ ├── jquery-treegrid │ │ │ ├── extension │ │ │ │ └── jquery.treegrid.extension.js │ │ │ └── js │ │ │ │ ├── jquery.treegrid.bootstrap3.js │ │ │ │ └── jquery.treegrid.min.js │ │ ├── jquery-ui │ │ │ └── jquery-ui.min.js │ │ ├── jsKnob │ │ │ └── jquery.knob.js │ │ ├── jsTree │ │ │ ├── jstree.js │ │ │ └── jstree.min.js │ │ ├── jvectormap │ │ │ ├── jquery-jvectormap-1.2.2.min.js │ │ │ └── jquery-jvectormap-world-mill-en.js │ │ ├── layer │ │ │ ├── extend │ │ │ │ └── layer.ext.js │ │ │ ├── laydate │ │ │ │ ├── laydate.js │ │ │ │ ├── need │ │ │ │ │ └── laydate.css │ │ │ │ └── skins │ │ │ │ │ └── default │ │ │ │ │ ├── icon.png │ │ │ │ │ └── laydate.css │ │ │ ├── layer.min.js │ │ │ ├── layim │ │ │ │ ├── data │ │ │ │ │ ├── chatlog.json │ │ │ │ │ ├── friend.json │ │ │ │ │ ├── group.json │ │ │ │ │ └── groups.json │ │ │ │ ├── layim.css │ │ │ │ ├── layim.js │ │ │ │ └── loading.gif │ │ │ ├── mobile │ │ │ │ ├── layer.js │ │ │ │ └── need │ │ │ │ │ └── layer.css │ │ │ ├── skin │ │ │ │ ├── default │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── icon_ext.png │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ ├── loading-2.gif │ │ │ │ │ ├── textbg.png │ │ │ │ │ ├── xubox_ico0.png │ │ │ │ │ ├── xubox_loading0.gif │ │ │ │ │ ├── xubox_loading1.gif │ │ │ │ │ ├── xubox_loading2.gif │ │ │ │ │ ├── xubox_loading3.gif │ │ │ │ │ └── xubox_title0.png │ │ │ │ ├── layer.css │ │ │ │ ├── layer.ext.css │ │ │ │ └── moon │ │ │ │ │ ├── default.png │ │ │ │ │ └── style.css │ │ │ └── theme │ │ │ │ └── default │ │ │ │ ├── icon-ext.png │ │ │ │ ├── icon.png │ │ │ │ ├── layer.css │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ ├── markdown │ │ │ ├── bootstrap-markdown.js │ │ │ ├── bootstrap-markdown.zh.js │ │ │ ├── markdown.js │ │ │ └── to-markdown.js │ │ ├── metisMenu │ │ │ └── jquery.metisMenu.js │ │ ├── morris │ │ │ ├── morris.js │ │ │ └── raphael-2.1.0.min.js │ │ ├── multiselect │ │ │ └── bootstrap-multiselect.js │ │ ├── nestable │ │ │ └── jquery.nestable.js │ │ ├── nouslider │ │ │ └── jquery.nouislider.min.js │ │ ├── pace │ │ │ └── pace.min.js │ │ ├── peity │ │ │ └── jquery.peity.min.js │ │ ├── plyr │ │ │ └── plyr.js │ │ ├── preetyTextDiff │ │ │ └── jquery.pretty-text-diff.min.js │ │ ├── prettyfile │ │ │ └── bootstrap-prettyfile.js │ │ ├── rickshaw │ │ │ ├── rickshaw.min.js │ │ │ └── vendor │ │ │ │ └── d3.v3.js │ │ ├── simditor │ │ │ ├── hotkeys.js │ │ │ ├── hotkeys.min.js │ │ │ ├── jquery.min.js │ │ │ ├── module.js │ │ │ ├── module.min.js │ │ │ ├── simditor.js │ │ │ ├── simditor.min.js │ │ │ ├── uploader.js │ │ │ └── uploader.min.js │ │ ├── slimscroll │ │ │ └── jquery.slimscroll.min.js │ │ ├── sparkline │ │ │ └── jquery.sparkline.min.js │ │ ├── staps │ │ │ └── jquery.steps.min.js │ │ ├── suggest │ │ │ ├── bootstrap-suggest.min.js │ │ │ └── data.json │ │ ├── summernote │ │ │ ├── summernote-zh-CN.js │ │ │ └── summernote.min.js │ │ ├── sweetalert │ │ │ └── sweetalert.min.js │ │ ├── switchery │ │ │ └── switchery.js │ │ ├── toastr │ │ │ └── toastr.min.js │ │ ├── treeview │ │ │ └── bootstrap-treeview.js │ │ ├── validate │ │ │ ├── additional-methods.min.js │ │ │ ├── bootstrapValidator.min.js │ │ │ └── zh_CN.js │ │ ├── wangEditor │ │ │ └── wangEditor.js │ │ ├── webuploader │ │ │ ├── README.md │ │ │ ├── Uploader.swf │ │ │ ├── webuploader.css │ │ │ ├── webuploader.custom.js │ │ │ ├── webuploader.custom.min.js │ │ │ ├── webuploader.fis.js │ │ │ ├── webuploader.flashonly.js │ │ │ ├── webuploader.flashonly.min.js │ │ │ ├── webuploader.html5only.js │ │ │ ├── webuploader.html5only.min.js │ │ │ ├── webuploader.js │ │ │ ├── webuploader.min.js │ │ │ ├── webuploader.noimage.js │ │ │ ├── webuploader.noimage.min.js │ │ │ ├── webuploader.nolog.js │ │ │ ├── webuploader.nolog.min.js │ │ │ ├── webuploader.withoutimage.js │ │ │ └── webuploader.withoutimage.min.js │ │ └── ztree │ │ │ └── jquery.ztree.all.min.js │ └── welcome.js │ └── modular │ ├── code │ └── gen.js │ ├── message │ ├── history │ │ └── message.js │ ├── sender │ │ ├── sender.js │ │ └── sender_info.js │ └── template │ │ ├── template.js │ │ └── template_info.js │ └── system │ ├── cfg │ ├── cfg.js │ └── cfg_info.js │ ├── code │ └── code.js │ ├── dept │ ├── dept.js │ └── dept_info.js │ ├── dict │ ├── dict.js │ └── dict_info.js │ ├── log │ ├── log.js │ └── login_log.js │ ├── menu │ ├── menu.js │ └── menu_info.js │ ├── notice │ ├── notice.js │ └── notice_info.js │ ├── role │ ├── role.js │ └── role_info.js │ ├── task │ ├── task.js │ ├── task_info.js │ └── task_log.js │ └── user │ ├── user.js │ └── user_info.js ├── guns-dao ├── pom.xml └── src │ ├── main │ └── java │ │ └── cn │ │ └── enilu │ │ └── guns │ │ └── dao │ │ ├── BaseRepository.java │ │ ├── BaseRepositoryFactoryBean.java │ │ ├── BaseRepositoryImpl.java │ │ ├── DaoConfiguration.java │ │ ├── cache │ │ ├── Cache.java │ │ ├── CacheDao.java │ │ ├── ConfigCache.java │ │ ├── DictCache.java │ │ ├── TokenCache.java │ │ ├── impl │ │ │ ├── ConfigCacheImpl.java │ │ │ ├── DictCacheImpl.java │ │ │ └── EhcacheDao.java │ │ └── package-info.java │ │ ├── message │ │ ├── MessageRepository.java │ │ ├── MessagesenderRepository.java │ │ └── MessagetemplateRepository.java │ │ └── system │ │ ├── CfgRepository.java │ │ ├── DeptRepository.java │ │ ├── DictRepository.java │ │ ├── FileInfoRepository.java │ │ ├── LoginLogRepository.java │ │ ├── MenuRepository.java │ │ ├── OperationLogRepository.java │ │ ├── RelationRepository.java │ │ ├── RoleRepository.java │ │ ├── SysNoticeRepository.java │ │ ├── TaskLogRepository.java │ │ ├── TaskRepository.java │ │ └── UserRepository.java │ └── test │ ├── java │ └── cn │ │ └── enilu │ │ └── guns │ │ └── dao │ │ ├── AppConfiguration.java │ │ ├── BaseApplicationStartTest.java │ │ └── system │ │ ├── CfgRepositoryTest.java │ │ └── MenuRepositoryTest.java │ └── resources │ └── application-test.properties ├── guns-entity ├── pom.xml └── src │ └── main │ └── java │ └── cn │ └── enilu │ └── guns │ └── bean │ ├── annotion │ └── core │ │ ├── BussinessLog.java │ │ └── Permission.java │ ├── constant │ ├── Const.java │ ├── cache │ │ ├── Cache.java │ │ └── CacheKey.java │ ├── factory │ │ └── PageFactory.java │ ├── package-info.java │ └── state │ │ ├── BizLogType.java │ │ ├── LogSucceed.java │ │ ├── LogType.java │ │ ├── ManagerStatus.java │ │ ├── MenuStatus.java │ │ └── Order.java │ ├── core │ └── ShiroUser.java │ ├── dictmap │ ├── CfgDict.java │ ├── CommonDict.java │ ├── DeleteDict.java │ ├── DeptDict.java │ ├── DictMap.java │ ├── LogDict.java │ ├── MenuDict.java │ ├── NoticeMap.java │ ├── RoleDict.java │ ├── SystemDict.java │ ├── TaskDict.java │ ├── UserDict.java │ └── base │ │ └── AbstractDictMap.java │ ├── dto │ └── UserDto.java │ ├── entity │ ├── BaseEntity.java │ ├── message │ │ ├── Message.java │ │ ├── MessageSender.java │ │ └── MessageTemplate.java │ ├── system │ │ ├── Cfg.java │ │ ├── Dept.java │ │ ├── Dict.java │ │ ├── FileInfo.java │ │ ├── LoginLog.java │ │ ├── Menu.java │ │ ├── Notice.java │ │ ├── OperationLog.java │ │ ├── Relation.java │ │ ├── Role.java │ │ ├── Task.java │ │ ├── TaskLog.java │ │ └── User.java │ └── test │ │ ├── Boy.java │ │ └── Girl.java │ ├── enumeration │ ├── BizExceptionEnum.java │ ├── ConfigKeyEnum.java │ ├── ProjectEnum.java │ ├── RedisQueueName.java │ ├── SerialNumberEnum.java │ ├── TypeEnum.java │ └── cms │ │ ├── BannerTypeEnum.java │ │ └── ChannelEnum.java │ ├── exception │ ├── GunsException.java │ ├── GunsExceptionEnum.java │ ├── InvalidKaptchaException.java │ ├── MailException.java │ ├── ParamException.java │ ├── ServiceExceptionEnum.java │ ├── SlConnectException.java │ ├── SlEvalException.java │ ├── ValidException.java │ ├── XSException.java │ └── XSRuntimeException.java │ └── vo │ ├── DictVo.java │ ├── QuartzJob.java │ ├── SpringContextHolder.java │ ├── front │ ├── Ret.java │ └── Rets.java │ ├── node │ ├── DeptNode.java │ ├── IsMenu.java │ ├── MenuNode.java │ ├── Node.java │ └── ZTreeNode.java │ └── query │ ├── DynamicSpecifications.java │ ├── MutiStrFactory.java │ ├── Page.java │ └── SearchFilter.java ├── guns-generator ├── pom.xml └── src │ └── main │ ├── java │ └── cn │ │ └── enilu │ │ └── flash │ │ └── code │ │ ├── AbstractLoader.java │ │ ├── CodeConfig.java │ │ ├── ColumnDescriptor.java │ │ ├── EntityDescLoader.java │ │ ├── Generator.java │ │ ├── Loader.java │ │ ├── StrKit.java │ │ ├── TableDescLoader.java │ │ ├── TableDescriptor.java │ │ └── Utils.java │ └── resources │ └── code │ ├── code.json │ ├── controller.vm │ ├── repository.vm │ ├── service.vm │ └── view │ ├── add.html.vm │ ├── edit.html.vm │ ├── index.html.vm │ ├── index.js.vm │ └── info.js.vm ├── guns-service ├── pom.xml └── src │ ├── main │ └── java │ │ └── cn │ │ └── enilu │ │ └── guns │ │ ├── aop │ │ ├── LogAop.java │ │ └── PermissionAop.java │ │ ├── factory │ │ ├── DictFieldWarpperFactory.java │ │ └── UserFactory.java │ │ ├── platform │ │ ├── log │ │ │ ├── LogFactory.java │ │ │ ├── LogManager.java │ │ │ └── LogTaskFactory.java │ │ └── package-info.java │ │ ├── service │ │ ├── BaseService.java │ │ ├── CrudService.java │ │ ├── DeleteService.java │ │ ├── InsertService.java │ │ ├── SelectService.java │ │ ├── UpdateService.java │ │ ├── message │ │ │ ├── MessageService.java │ │ │ ├── MessagesenderService.java │ │ │ ├── MessagetemplateService.java │ │ │ ├── email │ │ │ │ ├── DefaultEmailSender.java │ │ │ │ └── EmailSender.java │ │ │ └── sms │ │ │ │ ├── SmsSender.java │ │ │ │ └── tencent │ │ │ │ └── TencentSmsSender.java │ │ ├── system │ │ │ ├── AccountService.java │ │ │ ├── CfgService.java │ │ │ ├── DeptService.java │ │ │ ├── DictService.java │ │ │ ├── FileService.java │ │ │ ├── IConstantFactory.java │ │ │ ├── LogObjectHolder.java │ │ │ ├── LoginLogService.java │ │ │ ├── MenuService.java │ │ │ ├── NoticeService.java │ │ │ ├── OperationLogService.java │ │ │ ├── RoleService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ └── ConstantFactory.java │ │ └── task │ │ │ ├── BaseJob.java │ │ │ ├── JobExecuter.java │ │ │ ├── JobService.java │ │ │ ├── NoConurrentBaseJob.java │ │ │ ├── QuartzConfigration.java │ │ │ ├── TaskService.java │ │ │ ├── TaskUtils.java │ │ │ └── job │ │ │ └── HelloJob.java │ │ ├── shiro │ │ ├── ShiroDbRealm.java │ │ ├── ShiroKit.java │ │ ├── check │ │ │ ├── ICheck.java │ │ │ ├── PermissionCheckFactory.java │ │ │ └── PermissionCheckManager.java │ │ └── factory │ │ │ ├── IShiro.java │ │ │ └── ShiroFactroy.java │ │ ├── warpper │ │ ├── BaseControllerWarpper.java │ │ ├── DeptWarpper.java │ │ ├── DictWarpper.java │ │ ├── LogWarpper.java │ │ ├── MenuWarpper.java │ │ ├── NoticeWrapper.java │ │ ├── RoleWarpper.java │ │ └── UserWarpper.java │ │ └── web │ │ ├── listener │ │ ├── CacheListener.java │ │ └── ConfigListener.java │ │ └── package-info.java │ └── test │ ├── java │ └── cn │ │ └── enilu │ │ └── guns │ │ └── service │ │ ├── BaseApplicationStartTest.java │ │ ├── ServiceConfiguration.java │ │ └── system │ │ └── DeptServiceTest.java │ └── resources │ └── application-test.properties ├── guns-utils ├── pom.xml └── src │ └── main │ └── java │ └── cn │ └── enilu │ └── guns │ └── utils │ ├── BasicType.java │ ├── BeanUtil.java │ ├── BirthUtils.java │ ├── CollectionKit.java │ ├── Constants.java │ ├── Convert.java │ ├── CryptUtils.java │ ├── DateTime.java │ ├── DateTimeKit.java │ ├── DateUtil.java │ ├── HexKit.java │ ├── HttpKit.java │ ├── Lists.java │ ├── Log.java │ ├── MD5.java │ ├── Maps.java │ ├── MobileUtil.java │ ├── PageKit.java │ ├── RSAUtil.java │ ├── RandomUtils.java │ ├── StrKit.java │ ├── StringUtils.java │ ├── ToolUtil.java │ ├── WafKit.java │ ├── WafRequestWrapper.java │ ├── XmlHelper.java │ ├── ZipUtils.java │ └── cache │ ├── TimeCacheMap.java │ └── exception │ └── ToolBoxException.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .vuepress 3 | .classpath 4 | .factorypath 5 | ./**/target/* 6 | docs/node_modules 7 | docs/*.log 8 | docs/.vuepress/dist 9 | **/target/* 10 | *.project 11 | *.classpath 12 | *.factorypath 13 | */.settings/* 14 | .settings/* 15 | .vscode/* 16 | .idea/* 17 | guns-admin-vuejs/node_modules/* 18 | guns-admin-vuejs/.idea/* 19 | guns-admin-vuejs/dist/* 20 | log/* 21 | guns-h5/node_modules/* 22 | guns-h5/.idea/* 23 | guns-h5/dist/* 24 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 enilu.cn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /docs/.vuepress/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/.vuepress/public/logo.png -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroImage: /logo.png 4 | actionText: 快速开始 → 5 | actionLink: /base/preface 6 | footer: MIT Licensed | Copyright © 2018-present enilu 7 | --- 8 | 9 |
10 | 11 |
12 | 13 |
14 |
15 |

简单快捷

16 |

基于spring boot快速构建web应用程序

17 |
18 |
19 |

功能完善

20 |

封装完善的后台管理功能,包括用户、部门、权限、日志、字典、等基础功能。

21 |
22 |
23 |

支持齐全

24 |

支持mysql、oracle等多数据库平台。

25 |
26 |
27 |

最新技术栈

28 |

使用spring boot+jpa构建后端服务,使用Beetl+Bootstrap构建页面

29 |
30 |
31 |

成熟方案

32 |

基于该系统已经上线了很多大大小小的后管系统,方案成熟,坑少

33 |
34 |
35 |

最佳实践

36 |

丰富的案例提供了最佳实践,没有最好的框架,只有最适合的框架

37 |
38 |
39 | -------------------------------------------------------------------------------- /docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | 2 | # guns-lite使用向导 3 | 4 | * 基本准备 5 | * [基本环境准备](base/jdkAndMaven.md) 6 | * [目录结构](base/modules.md) 7 | * [前后端分离版](base/guns-admin-vuejs.md) 8 | 9 | * [30分钟将本项目跑起来](quickstart/quickstart.md) 10 | * [克隆项目](quickstart/clone.md) 11 | * [初始化数据](quickstart/initDb.md) 12 | * [配置项目](quickstart/config.md) 13 | * [启动项目](quickstart/startup.md) 14 | 15 | * 开发第一个功能 16 | * [建表](hello_guns/create_table.md) 17 | * [基础代码](hello_guns/base.md) 18 | * [list](hello_guns/list.md) 19 | * [add](hello_guns/add.md) 20 | * [delete](hello_guns/delete.md) 21 | * [update](hello_guns/update.md) 22 | * [添加菜单和分配权限](hello_guns/menuAndPermission.md) 23 | 24 | * 基本功能介绍 25 | * [模块介绍](feature/modules.md) 26 | * [菜单管理](feature/menu.md) 27 | * [字典管理](feature/dict.md) 28 | * [日志管理](feature/log.md) 29 | * [权限管理](feature/permissionMgr.md) 30 | * [监控管理](feature/monitor.md) 31 | * [系统配置](feature/sysConfig.md) 32 | -------------------------------------------------------------------------------- /docs/action/i18n.md: -------------------------------------------------------------------------------- 1 | # 国际化 2 | 3 | - guns-admin-vuejs实现国际化了,不好意思guns-admin暂未实现国际化,后续也会考虑实现。 4 | - 不了解上面两个的区别的同学可以再回顾下这个[文档](../base/guns-admin-vuejs.html) 5 | - guns-admin-vuejs实现国际化的方式参考vue-element-admin的 6 | [官方文档](https://panjiachen.github.io/vue-element-admin-site/zh/guide/advanced/i18n.html),这里不再赘述,强烈建议你先把文档读了之后再看下面的内容。 7 | 8 | 9 | ## 默认约定 10 | 针对网站资源进行国际园涉及到的国际化资源的管理维护,这里给出一些guns-admin-vuejs的资源分类建议,当然,你也可以根据你的实际情况进行调整。 11 | 12 | - src/lang/为国际化资源目录,目前提供了英文(en.js)和中文(zh.js)的两种语言实现。 13 | - 目前资源语言资源文件中是json配置主要有以下几个节点: 14 | - route 左侧菜单资源 15 | - navbar 顶部导航栏资源 16 | - button 公共的按钮资源,比如:添加、删除、修改、确定、取消之类等等 17 | - common 其他公共的资源,比如一些弹出框标题、提示信息、label等等 18 | - login 登录页面资源 19 | - config 参数管理界面资源 20 | - 目前针对具体的页面资源只做了登录和参数管理两个页面,其他具体业务界面仅针对公共的按钮做了国际化,你可以参考config页面资源进行配置进行进一步配置:/src/views/cfg/ 21 | - 如果你有其他资源在上面对应的节点添加即可,针对每个页面特有的资源以页面名称作为几点进行维护,这样方便记忆和维护,不容易出错。 22 | 23 | 24 | ## 添加新的语言支持 25 | 如果英文和中文两种语言不够,那么你可以通过下面步骤添加语言支持 26 | - 在src/lang/目录下新增对应的资源文件 27 | - 在src/lang/index.js中import对应的资源文件 28 | - 在src/lang/index.js中的messages变量中加入新的语言声明 29 | - 在src/components/LangSelect/index.vue的语言下拉框中增加新的语言选项 30 | -------------------------------------------------------------------------------- /docs/base/jdkAndMaven.md: -------------------------------------------------------------------------------- 1 | # 开发前必读 2 | 本章介绍本书所需要的一些准备工作. 请确保把各部分的准备工作完成 3 | 4 | 本文档基于Intellij IDEA,Mysql,Maven,JDK8这四个基本工具, 5 | 当然你也可以用Eclipse开发工具。 6 | 7 | **Jdk** 8 | 9 | - 请选用当前最新的版本,根据平台选用X64或X86版本的JDK8,并妥善安装 10 | 11 | **MySQL** 12 | 13 | - [Mysql官网](https://dev.mysql.com/) 14 | - [下载页面](https://dev.mysql.com/downloads/), 选用5.6以上系列的版本 15 | - 妥善安装,并配置账号密码 16 | 17 | 18 | **Intellij IDEA** 19 | - [Intellij IDEA官网](https://www.jetbrains.com/idea/) 20 | - [下载页面](https://www.jetbrains.com/idea/download/) 21 | - 请自行下载安装合适版本的IDEA(或者eclipse) 22 | 23 | **Lombok** 24 | - Lombok是一个可以通过简单的注解形式来帮助我们简化消除一些必须有但显得很臃肿的Java代码的工具,通过使用对应的注解,可以在编译源码的时候生成对应的方法。 25 | - 本系统用通过给实体类增加@Data注解让给实体类自动生成setter,getter方法。 26 | - 开发之前需要安装开发工具对应的Lombok插件 27 | - 添加新的实体的时候要再类名上增加@Data注解。 28 | 29 | **Maven** 30 | -[下载页面](http://maven.apache.org/download.cgi) 31 | 32 | -------------------------------------------------------------------------------- /docs/base/modules.md: -------------------------------------------------------------------------------- 1 | # 基本包结构 2 | 3 | 本节详细说明本项目的基本目录结构 4 | 5 | ## guns-lite模块 6 | 7 | guns-lite包含6个核心模块: 8 | - guns-admin 一个成熟的后台管理系统,完全具备了后台管理系统的基本功能 9 | - guns-utils 工具包 10 | - guns-dao dao层 11 | - guns-entity 实体层 12 | - guns-service 服务层 13 | 14 | 其中guns-admin是一个java web模块 15 | 其他都为java se模块, 16 | -------------------------------------------------------------------------------- /docs/base/zanshan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/base/zanshan.jpg -------------------------------------------------------------------------------- /docs/config/application.md: -------------------------------------------------------------------------------- 1 | # application配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/config/beetl.md: -------------------------------------------------------------------------------- 1 | # beetl模板配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/config/ehcache.md: -------------------------------------------------------------------------------- 1 | # ehcache缓存配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/config/logback.md: -------------------------------------------------------------------------------- 1 | # 日志输出配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/config/shiro.md: -------------------------------------------------------------------------------- 1 | # shiro权限配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/config/swagger.md: -------------------------------------------------------------------------------- 1 | # swagger在线文档配置 2 | 3 | 完善中... -------------------------------------------------------------------------------- /docs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/demo.gif -------------------------------------------------------------------------------- /docs/donate.md: -------------------------------------------------------------------------------- 1 | 2 | ::: tip Donate 3 | 如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 4 | ::: 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/ecosystem/doc/boy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/boy.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/code-generate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/code-generate.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/doc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/doc.jpg -------------------------------------------------------------------------------- /docs/ecosystem/doc/generate-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/generate-result.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/menu-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/menu-list.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/menu1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/menu1.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/menu2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/menu2.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/role.png -------------------------------------------------------------------------------- /docs/ecosystem/doc/summary.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/summary.jpg -------------------------------------------------------------------------------- /docs/ecosystem/doc/table.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/table.jpg -------------------------------------------------------------------------------- /docs/ecosystem/doc/word.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/ecosystem/doc/word.jpg -------------------------------------------------------------------------------- /docs/feature/dict.md: -------------------------------------------------------------------------------- 1 | # 字典管理 2 | 3 | 该模块提供了对各种枚举数据进行维护的功能。 4 | 5 | ![dict](./img/dict.jpg) 6 | 7 | 后台中常量工厂ConstantFactory封装了的对字典的常规功能。 8 | 9 | ## 根据名称获取其所有字典列表 10 | 11 | 使用场景,比如页面查询表单中需要一个联系人关系的下拉框来所搜索,具体用法为: 12 | 13 | ```html 14 | <#select id="account" name="我方账户" > 15 | @for(dict in constant.getDicts('学历类型')){ 16 | 17 | @} 18 | 19 | ``` 20 | 21 | 22 | ## 根据字典id获取字典名称 23 | 24 | 数据库中存的是字典id,但是页面展示需要具体的值 25 | 26 | ```java 27 | String degreeName = ConstantFactory.me().findByPnameAndCode("学历类型",1).getName(); 28 | model.addAttribute('degreeName',degreeName); 29 | ``` 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/feature/fileMgr.md: -------------------------------------------------------------------------------- 1 | # 文件管理 2 | 3 | 本系统了设计了一个简单的文件管理功能,用来做文件生产下载,也可以用来管理图片。 4 | 5 | ## 功能 6 | - 文件上传 7 | - 文件下载 8 | - 图片浏览 9 | 10 | ## 设计 11 | - t_sys_file_info 表存放文件元信息,包括文件名称,uuid,文件存储路径 12 | - 在全局参数管理中配置文件的存储目录:system.file.upload.path 13 | 14 | ## 实现 15 | 16 | - 文件上传参考内容管理(CMS)模块中的banner管理和文章管理 17 | - 文件下载使用url:/file/download?idFile=${fileId} 18 | - 在线显示图片使用url:/file/getImgStream?idFile=${fileId} 19 | -------------------------------------------------------------------------------- /docs/feature/img/dict.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/dict.jpg -------------------------------------------------------------------------------- /docs/feature/img/guns-admin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/guns-admin.jpg -------------------------------------------------------------------------------- /docs/feature/img/guns-src.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/guns-src.jpg -------------------------------------------------------------------------------- /docs/feature/img/guns-web-js.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/guns-web-js.jpg -------------------------------------------------------------------------------- /docs/feature/img/guns-web-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/guns-web-page.jpg -------------------------------------------------------------------------------- /docs/feature/img/guns-web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/guns-web.jpg -------------------------------------------------------------------------------- /docs/feature/img/loginLog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/loginLog.jpg -------------------------------------------------------------------------------- /docs/feature/img/menu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/menu.jpg -------------------------------------------------------------------------------- /docs/feature/img/menu_vue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/menu_vue.jpg -------------------------------------------------------------------------------- /docs/feature/img/modules.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/modules.jpg -------------------------------------------------------------------------------- /docs/feature/img/monitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/monitor.jpg -------------------------------------------------------------------------------- /docs/feature/img/role_vue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/role_vue.jpg -------------------------------------------------------------------------------- /docs/feature/img/sysConfig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/sysConfig.jpg -------------------------------------------------------------------------------- /docs/feature/img/user_role.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/user_role.jpg -------------------------------------------------------------------------------- /docs/feature/img/user_role_vue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/feature/img/user_role_vue.jpg -------------------------------------------------------------------------------- /docs/feature/log.md: -------------------------------------------------------------------------------- 1 | # 日志管理 2 | 日志管理包括两方面: 3 | 一个是后台用户登录日志的查看 4 | 一个是业务日志查看,业务日志内容主要包含两方面:系统产生的异常和用户操作日志。 5 | 6 | 7 | 8 | ## 登录日志 9 | 用户登录系统和退出系统的时候会调用LogTaskFactory记录相关日志,并在“登录日志”页面进行展示。 10 | 11 | ![loginLog](./img/loginLog.jpg) 12 | 13 | ## 业务日志 14 | 15 | 业务日志包含异常日志和业务操作日志两大类日志收集、保存和展示。 16 | 17 | ### 异常日志 18 | 19 | 系统提供了异常处理类:GlobalExceptionHandler 来对系统各种异常进行统一收集保存。 20 | 该类提供了九个方法来分别对9中常见的异常类型进行收集保存,如果开发者自己有特殊需求需要对其他异常类型处理。,可以通过新增处理方式来对新的异常进行收集。 21 | 22 | 23 | ### 业务操作日志 24 | 25 | 系统提供了通过注解的形式可以方便的添加业务操作日志,比如在新增部门的是增加业务日志通过如下方式: 26 | 27 | 在DeptController的新增部门方法增加注解: 28 | 29 | ```java 30 | /** 31 | * 新增部门 32 | */ 33 | @BussinessLog(value = "添加部门", key = "simplename", dict = DeptDict.class) 34 | @RequestMapping(value = "/add") 35 | @Permission 36 | @ResponseBody 37 | public Object add(Dept dept) { 38 | if (ToolUtil.isOneEmpty(dept, dept.getSimplename())) { 39 | throw new GunsException(BizExceptionEnum.REQUEST_NULL); 40 | } 41 | //完善pids,根据pid拿到pid的pids 42 | deptSetPids(dept); 43 | return this.deptRepository.save(dept); 44 | } 45 | ``` 46 | 47 | 具体的实现逻辑感兴趣的同学可以自行通过注解类:BusinessLog进行跟进查看。 -------------------------------------------------------------------------------- /docs/feature/menu.md: -------------------------------------------------------------------------------- 1 | # 菜单管理 2 | 3 | 菜单管理包含两部分:一个是左侧菜单树的维护,一个是页面操作功能(主要是按钮)的维护。 4 | 不管是左侧菜单还是按钮,都需要在角色中进行配置才能正常显示出来。 5 | 6 | 先看下菜单列表大致了解下菜单管理都维护哪些内容: 7 | 8 | ![menu](./img/menu.jpg) 9 | 10 | ## 左侧菜单维护 11 | - 菜单维护基本上采用了两级菜单形式:如上图所示:第一级菜单为“系统管理”,“系统管理”中包含了“用户管理”、“角色管理”等多个二级菜单。 12 | - 其中“系统管理”为虚拟菜单,点击“系统管理”并不会跳转到真实的页面而是展开其子菜单列表;所以虚拟菜单的请求地址应配置为“#”。 13 | - “系统管理”下的子菜单,例如“业务日志”需要配置请求地址,比如配置为“/log”,点击“业务日志”会跳转到业务日志列表页面。 14 | ## 页面功能维护 15 | - 菜单维护中的另外一种形式我功能(主要是操作按钮或者页面中的链接)的维护。点击按钮虽然不需要跳转到具体的页面但是也需要配置请求地址,因为代码中需要通过该地址来判断用户是否拥有操作权限。 16 | - 例如“业务日志”菜单中有三个子菜单:“清空日志”的请求地址配置为:"log/delLog",则页面进行控制权限的写法为: 17 | 18 | ```html 19 | @if(shiro.hasPermission("/log/delLog")){ 20 | <#button name="清空日志" icon="fa-minus" clickFun="OptLog.delLog()" space="true"/> 21 | @} 22 | ``` 23 | 24 | 25 | 菜单管理的其他维护参数不赘述,具体作用配置试用一下即可知晓。 -------------------------------------------------------------------------------- /docs/feature/monitor.md: -------------------------------------------------------------------------------- 1 | # 监控管理 2 | 3 | 这里的监控功能用的是alibaba druid自带的监控功能 4 | 5 | ![monitor](./img/monitor.jpg) -------------------------------------------------------------------------------- /docs/feature/sysConfig.md: -------------------------------------------------------------------------------- 1 | # 系统参数管理 2 | 3 | 这是一个很简单的功能,提供对系统参数的增删该查,开发者可以通过这个功能维护系统参数,功能很简单,不做赘述 4 | 5 | ![sysConfig](./img/sysConfig.jpg) -------------------------------------------------------------------------------- /docs/hello_guns/account.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/hello_guns/account.jpg -------------------------------------------------------------------------------- /docs/hello_guns/create_table.md: -------------------------------------------------------------------------------- 1 | # 建表 2 | 比如我们要开发一个系统参数的管理功能,该功能主要对系统相关参数进行增删该查。 3 | 建表语句如下: 4 | 5 | ```sql 6 | CREATE TABLE `t_sys_cfg` ( 7 | `id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '自增主键', 8 | `cfg_name` varchar(100) DEFAULT NULL COMMENT '参数名', 9 | `cfg_value` varchar(3000) DEFAULT NULL COMMENT '参数值', 10 | `cfg_desc` varchar(200) DEFAULT NULL COMMENT '参数描述', 11 | PRIMARY KEY (`id`) 12 | ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='系统参数'; 13 | ``` -------------------------------------------------------------------------------- /docs/hello_guns/hello_guns.md: -------------------------------------------------------------------------------- 1 | # 简单的CRUD 2 | 3 | 本章将手把手带你开发一个增删该查功能,包含从建表到代码(controller,service,dao,页面),到权限控制,以及一个相对复杂的查询。 4 | 5 | 我们要开发一个参数管理功能,用于对系统参数进行增删该查 6 | 7 | ## 本章知识点 8 | * [建表](./create_table.md) 9 | * [基础代码](./base.md) 10 | * [list](./list.md) 11 | * [add](./add.md) 12 | * [delete](./delete.md) 13 | * [update](./update.md) 14 | * [添加菜单和分配权限](./menuAndPermission.md) 15 | 16 | -------------------------------------------------------------------------------- /docs/hello_guns/menu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/hello_guns/menu.jpg -------------------------------------------------------------------------------- /docs/hello_guns/menuAndPermission.md: -------------------------------------------------------------------------------- 1 | # 添加菜单和分配权限 2 | 现在功能已经开发完毕了,但是在页面上并不能使用这个功能; 3 | 因为我没有给当前用不配置参数管理的权限。下面分两步骤启用参数管理功能 4 | 5 | - 在菜单管理中添加参数管理的功能,包括一个菜单项(点击链接进入列表页面)和三个功能项(新增、删除、修改) 6 | - 在权限管理中给指定的角色配置上述三个菜单 7 | - 在用户管理中给指定的用户配置指定的角色 8 | 9 | 10 | 11 | ## 添加菜单项 12 | 13 | 在菜单管理中添加4条记录,添加过程中要注意一下几点: 14 | - 父级编号:选中的父级编号决定了当前功能所属哪一个模块,比如“参数管理”这一项的父级编号选择“系统管理”,则“参数管理”这一功能菜单在“系统管理”模块下。 15 | - 是否是菜单:选择“是”,则菜单会在左侧菜单栏显示,选择“否”,则不会显示在左侧菜单栏。针对按钮功能要选择“否” 16 | - 请求地址,针对菜单选择“是”的记录,则该地址必须为页面打开的地址,针是否是菜单选择“否”的记录,则该地址必须与页面的判断一致。 17 | 18 | ``` 19 | 比如“添加系统参数”这一项的请求地址为“cfg/add”, 则页面判断是否有操作权限的的代码为: 20 | 21 | @if(shiro.hasPermission("/cfg/add")){ 22 | <#button name="添加" icon="fa-plus" clickFun="Cfg.openAddCfg()"/> 23 | @} 24 | ``` 25 | 26 | 添加四条菜单记录: 27 | 28 | - 参数管理 29 | - 添加系统参数 30 | - 修改系统参数 31 | - 删除系统参数 32 | 33 | ![menu](./menu.jpg) 34 | 35 | ## 为角色配置菜单项 36 | 37 | ![role](./role.jpg) 38 | 39 | ## 为用户配置角色 40 | 41 | 因为默认的admin账户本身已经有超级管理员角色,所以不需要配置了,不过这里依然列出配置步骤: 42 | 43 | ![account](./account.jpg) 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /docs/hello_guns/role.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/hello_guns/role.jpg -------------------------------------------------------------------------------- /docs/img/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/alipay.jpg -------------------------------------------------------------------------------- /docs/img/donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/donate.jpg -------------------------------------------------------------------------------- /docs/img/resource/menu_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/resource/menu_1.jpg -------------------------------------------------------------------------------- /docs/img/task_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/task_add.png -------------------------------------------------------------------------------- /docs/img/task_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/task_list.png -------------------------------------------------------------------------------- /docs/img/task_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/task_log.png -------------------------------------------------------------------------------- /docs/img/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/img/wechat.jpg -------------------------------------------------------------------------------- /docs/other/faq.md: -------------------------------------------------------------------------------- 1 | # 常见问题 2 | 3 | ## 本地开发正常,打包运行的时候提交中文内容乱码,检查了数据库编码也没问题? 4 | 5 | 打包为jar包运行的时候可以指定运行时编码为UTF8: 6 | ``` 7 | java -Dfile.encoding=utf-8 -jar xxxxxxx.jar 8 | ``` 9 | 10 | ## 打包guns-admin-vuejs总是下载依赖包失败 11 | 使用淘宝源 12 | ```shell 13 | npm install --registry=https://registry.npm.taobao.org 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "@vuepress/plugin-google-analytics": { 6 | "version": "1.0.0-alpha.0", 7 | "resolved": "https://registry.npmjs.org/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.0.0-alpha.0.tgz", 8 | "integrity": "sha512-WNUIayJFBmTb06bjvFeJd5TlT4qoYcCLN15zkEGeAGH8tCH2BtrwMkSG3BiiWSh3xRUy7kDHhsuclSZcRY08EQ==", 9 | "dev": true 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "docs:dev": "vuepress dev docs", 4 | "docs:build": "vuepress build docs" 5 | }, 6 | "devDependencies": { 7 | "@vuepress/plugin-google-analytics": "^1.0.0-alpha.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docs/quickstart/clone.md: -------------------------------------------------------------------------------- 1 | # 克隆本项目 2 | 3 | 本项目地址为:[https://github.com/enilu/guns-lite](https://github.com/enilu/guns-lite),如果对你有用,欢迎给个star 4 | 5 | 项目共三个分支分别为: 6 | - master 项目主分支,mysql数据库 7 | - oracle 正如其名,和主分支的唯一区别在于数据库使用oracle, 8 | - admin-flat 该分支将页面更改为扁平化风格,去掉iframe+标签页的形式 9 | 10 | 进入控制台输入以下命令将项目克隆岛本地: 11 | 12 | git clone https://github.com/enilu/guns-lite.git -------------------------------------------------------------------------------- /docs/quickstart/config.md: -------------------------------------------------------------------------------- 1 | # 配置项目 2 | 3 | 你已经下载项目,并且初始化好了数据库,那么接下来只需要更改相应的配置就可以运行该项目了 4 | 5 | - 更改src/resources/application-dev.properties配置: 6 | 7 | ```properties 8 | ## 开发环境配置,修改为真实的用户名密码 9 | spring.datasource.url=jdbc:mysql://localhost:3306/guns-lite 10 | spring.datasource.username=root 11 | spring.datasource.password=root 12 | 13 | ``` -------------------------------------------------------------------------------- /docs/quickstart/index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/quickstart/index.jpg -------------------------------------------------------------------------------- /docs/quickstart/initDb.md: -------------------------------------------------------------------------------- 1 | # 初始化数据 2 | 3 | 本系统使用mysql数据库,如果要使用oracle,可以使用oracle分支,这里仅说明mysql数据库初始化步骤。 4 | 5 | - 在mysql中创建数据库 guns-lite 6 | 7 | ```sql 8 | CREATE DATABASE IF NOT EXISTS guns-lite DEFAULT CHARSET utf8 COLLATE utf8_general_ci; 9 | 10 | ``` 11 | 12 | - 登录mysql书库,导入mysql.sql文件 13 | 14 | ```sql 15 | mysql>source d:/mysql.sql 16 | ``` 17 | -------------------------------------------------------------------------------- /docs/quickstart/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/docs/quickstart/login.jpg -------------------------------------------------------------------------------- /docs/quickstart/quickstart.md: -------------------------------------------------------------------------------- 1 | # 30分钟把项目跑起来 2 | 3 | ## 真的30分钟吗? 4 | NO, 明显不,都是骗人的啦. 5 | 6 | ## 那为啥还要这样写? 7 | 总不能写10分钟跑完吧? 虽然网上很多很多10分钟快速入门,但作为一个不随便的人,我可没办法评估你的鼠标键盘操作速度和头脑CPU的运算频率,所以还是写30分钟比较保险的. 8 | 9 | ## 本章知识点 10 | - [克隆项目](./clone.md) 11 | - [初始化数据](./initDb.md) 12 | - [配置项目](./config.md) 13 | - [启动项目](./startup.md) -------------------------------------------------------------------------------- /docs/quickstart/startup.md: -------------------------------------------------------------------------------- 1 | # 启动项目 2 | 3 | - 右键直接运行 cn.enilu.guns.admin.AdminApplication 类即可已启动guns-admin后台管理系统 4 | - 系统默认是用8080端口,参考配置文件src/resources/application.properties 5 | ```properties 6 | server.port=8080 7 | ``` 8 | - 启动成功后访问http://localhost:8080 如下图所示 9 | ![login](./login.jpg) 10 | - 输入用户名/密码:admin/admin即可登录: 11 | ![index](./index.jpg) 12 | 13 | 14 | so,是不是很简单! -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/AdminServletInitializer.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | 6 | /** 7 | * Guns Web程序启动类 8 | * 9 | * @author fengshuonan 10 | * @date 2017-05-21 9:43 11 | */ 12 | public class AdminServletInitializer extends SpringBootServletInitializer { 13 | 14 | @Override 15 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 16 | return builder.sources(AdminApplication.class); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/common/constant/DatasourceEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.common.constant; 2 | 3 | /** 4 | * 5 | * 多数据源的枚举 6 | * 7 | * @author fengshuonan 8 | * @date 2017年3月5日 上午10:15:02 9 | */ 10 | public interface DatasourceEnum { 11 | 12 | String DATA_SOURCE_GUNS = "dataSourceGuns"; //guns数据源 13 | 14 | String DATA_SOURCE_BIZ = "dataSourceBiz"; //其他业务的数据源 15 | } 16 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/common/constant/enums/Status.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.common.constant.enums; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 通用的业务状态 7 | * 8 | * @author zhfish 9 | */ 10 | public enum Status { 11 | 未启用(0), 12 | 启用(1); 13 | 14 | private int value; 15 | 16 | Status(final int value) { 17 | this.value = value; 18 | } 19 | 20 | 21 | public Serializable getValue() { 22 | return this.value; 23 | } 24 | 25 | @Override 26 | public String toString(){ 27 | switch (this.value) { 28 | case 0: 29 | return "未启用"; 30 | case 1: 31 | return "启用"; 32 | } 33 | return "未启用"; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/common/constant/state/IsMenu.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.common.constant.state; 2 | 3 | /** 4 | * 是否是菜单的枚举 5 | * 6 | * @author fengshuonan 7 | * @date 2017年6月1日22:50:11 8 | */ 9 | public enum IsMenu { 10 | 11 | YES(1, "是"), 12 | NO(0, "不是");//不是菜单的是按钮 13 | 14 | int code; 15 | String message; 16 | 17 | IsMenu(int code, String message) { 18 | this.code = code; 19 | this.message = message; 20 | } 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(int code) { 27 | this.code = code; 28 | } 29 | 30 | public String getMessage() { 31 | return message; 32 | } 33 | 34 | public void setMessage(String message) { 35 | this.message = message; 36 | } 37 | 38 | public static String valueOf(Integer status) { 39 | if (status == null) { 40 | return ""; 41 | } else { 42 | for (IsMenu s : IsMenu.values()) { 43 | if (s.getCode() == status) { 44 | return s.getMessage(); 45 | } 46 | } 47 | return ""; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/config/SpringSessionConfig.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.config; 2 | 3 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 4 | 5 | /** 6 | * spring session配置 7 | * 8 | * @author fengshuonan 9 | * @date 2017-07-13 21:05 10 | */ 11 | //@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 1800) //session过期时间 如果部署多机环境,需要打开注释 12 | @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") 13 | public class SpringSessionConfig { 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/config/UserIDAuditorConfig.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.config; 2 | 3 | import cn.enilu.guns.bean.core.ShiroUser; 4 | import cn.enilu.guns.shiro.ShiroKit; 5 | import cn.enilu.guns.utils.Constants; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.data.domain.AuditorAware; 8 | 9 | import java.util.Optional; 10 | 11 | /** 12 | * UserIDAuditorBean 13 | * 14 | * @author zt 15 | * @version 2019/1/8 0008 16 | */ 17 | @Configuration 18 | public class UserIDAuditorConfig implements AuditorAware { 19 | @Override 20 | public Optional getCurrentAuditor() { 21 | ShiroUser shiroUser = ShiroKit.getUser(); 22 | if(shiroUser!=null){ 23 | return Optional.of(shiroUser.getId()); 24 | } 25 | return Optional.of(Constants.SYSTEM_USER_ID); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/CoreFlag.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core; 2 | 3 | /** 4 | * 此类用来获取core模块的包路径 5 | * 6 | * @author fengshuonan 7 | * @Date 2017/12/5 下午12:44 8 | */ 9 | public class CoreFlag { 10 | 11 | } -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/base/controller/GlobalController.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.base.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.ui.Model; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | 7 | /** 8 | * 全局的控制器 9 | * 10 | * @author fengshuonan 11 | * @date 2016年11月13日 下午11:04:45 12 | */ 13 | @Controller 14 | @RequestMapping("/global") 15 | public class GlobalController { 16 | 17 | /** 18 | * 跳转到404页面 19 | * 20 | * @author fengshuonan 21 | */ 22 | @RequestMapping(path = "/error") 23 | public String errorPage() { 24 | return "/404.html"; 25 | } 26 | 27 | /** 28 | * 跳转到session超时页面 29 | * 30 | * @author fengshuonan 31 | */ 32 | @RequestMapping(path = "/sessionError") 33 | public String errorPageInfo(Model model) { 34 | model.addAttribute("tips", "session超时"); 35 | return "/login.html"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/base/controller/GunsErrorView.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.base.controller; 2 | 3 | import org.springframework.stereotype.Component; 4 | import org.springframework.web.servlet.View; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.util.Map; 9 | 10 | /** 11 | * 错误页面的默认跳转(例如请求404的时候,默认走这个视图解析器) 12 | * 13 | * @author fengshuonan 14 | * @date 2017-05-21 11:34 15 | */ 16 | @Component("error") 17 | public class GunsErrorView implements View { 18 | 19 | @Override 20 | public String getContentType() { 21 | return "text/html"; 22 | } 23 | 24 | @Override 25 | public void render(Map map, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { 26 | httpServletRequest.getRequestDispatcher("/global/error").forward(httpServletRequest, httpServletResponse); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/base/tips/ErrorTip.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.base.tips; 2 | 3 | /** 4 | * 返回给前台的错误提示 5 | * 6 | * @author fengshuonan 7 | * @date 2016年11月12日 下午5:05:22 8 | */ 9 | public class ErrorTip extends Tip { 10 | 11 | public ErrorTip(int code, String message) { 12 | super(); 13 | this.code = code; 14 | this.message = message; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/base/tips/SuccessTip.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.base.tips; 2 | 3 | /** 4 | * 返回给前台的成功提示 5 | * 6 | * @author fengshuonan 7 | * @date 2016年11月12日 下午5:05:22 8 | */ 9 | public class SuccessTip extends Tip { 10 | 11 | public SuccessTip(){ 12 | super.code = 200; 13 | super.message = "操作成功"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/base/tips/Tip.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.base.tips; 2 | 3 | /** 4 | * 返回给前台的提示(最终转化为json形式) 5 | * 6 | * @author fengshuonan 7 | * @Date 2017年1月11日 下午11:58:00 8 | */ 9 | public abstract class Tip { 10 | 11 | protected int code; 12 | protected String message; 13 | 14 | public int getCode() { 15 | return code; 16 | } 17 | 18 | public void setCode(int code) { 19 | this.code = code; 20 | } 21 | 22 | public String getMessage() { 23 | return message; 24 | } 25 | 26 | public void setMessage(String message) { 27 | this.message = message; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/beetl/BeetlConfiguration.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.beetl; 2 | 3 | import cn.enilu.guns.admin.core.util.KaptchaUtil; 4 | import cn.enilu.guns.service.system.impl.ConstantFactory; 5 | import cn.enilu.guns.utils.ToolUtil; 6 | import org.beetl.ext.spring.BeetlGroupUtilConfiguration; 7 | 8 | public class BeetlConfiguration extends BeetlGroupUtilConfiguration { 9 | 10 | @Override 11 | public void initOther() { 12 | 13 | groupTemplate.registerFunctionPackage("shiro", new ShiroExt()); 14 | groupTemplate.registerFunctionPackage("tool", new ToolUtil()); 15 | groupTemplate.registerFunctionPackage("kaptcha", new KaptchaUtil()); 16 | groupTemplate.registerFunctionPackage("constant",ConstantFactory.me()); 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/cache/ILoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.enilu.guns.admin.core.cache; 17 | 18 | /** 19 | * 数据重载 20 | */ 21 | public interface ILoader { 22 | Object load(); 23 | } 24 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/datascope/DataScope.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.datascope; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 数据范围 7 | * 8 | * @author fengshuonan 9 | * @date 2017-07-23 22:19 10 | */ 11 | public class DataScope { 12 | 13 | /** 14 | * 限制范围的字段名称 15 | */ 16 | private String scopeName = "deptid"; 17 | 18 | /** 19 | * 具体的数据范围 20 | */ 21 | private List deptIds; 22 | 23 | public DataScope() { 24 | } 25 | 26 | public DataScope(List deptIds) { 27 | this.deptIds = deptIds; 28 | } 29 | 30 | public DataScope(String scopeName, List deptIds) { 31 | this.scopeName = scopeName; 32 | this.deptIds = deptIds; 33 | } 34 | 35 | public List getDeptIds() { 36 | return deptIds; 37 | } 38 | 39 | public void setDeptIds(List deptIds) { 40 | this.deptIds = deptIds; 41 | } 42 | 43 | public String getScopeName() { 44 | return scopeName; 45 | } 46 | 47 | public void setScopeName(String scopeName) { 48 | this.scopeName = scopeName; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/intercept/SessionInterceptor.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.intercept; 2 | 3 | import cn.enilu.guns.admin.core.util.HttpSessionHolder; 4 | import cn.enilu.guns.admin.core.base.controller.BaseController; 5 | import org.aspectj.lang.ProceedingJoinPoint; 6 | import org.aspectj.lang.annotation.Around; 7 | import org.aspectj.lang.annotation.Aspect; 8 | import org.aspectj.lang.annotation.Pointcut; 9 | import org.springframework.stereotype.Component; 10 | 11 | /** 12 | * 静态调用session的拦截器 13 | * 14 | * @author fengshuonan 15 | * @date 2016年11月13日 下午10:15:42 16 | */ 17 | @Aspect 18 | @Component 19 | public class SessionInterceptor extends BaseController { 20 | 21 | @Pointcut("execution(* cn.enilu.guns.admin.*..controller.*.*(..))") 22 | public void cutService() { 23 | } 24 | 25 | @Around("cutService()") 26 | public Object sessionKit(ProceedingJoinPoint point) throws Throwable { 27 | 28 | HttpSessionHolder.put(super.getHttpServletRequest().getSession()); 29 | try { 30 | return point.proceed(); 31 | } finally { 32 | HttpSessionHolder.remove(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/mutidatasource/DataSourceContextHolder.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.mutidatasource; 2 | 3 | /** 4 | * datasource的上下文 5 | * 6 | * @author fengshuonan 7 | * @date 2017年3月5日 上午9:10:58 8 | */ 9 | public class DataSourceContextHolder { 10 | 11 | private static final ThreadLocal contextHolder = new ThreadLocal(); 12 | 13 | /** 14 | * 设置数据源类型 15 | * 16 | * @param dataSourceType 数据库类型 17 | */ 18 | public static void setDataSourceType(String dataSourceType) { 19 | contextHolder.set(dataSourceType); 20 | } 21 | 22 | /** 23 | * 获取数据源类型 24 | */ 25 | public static String getDataSourceType() { 26 | return contextHolder.get(); 27 | } 28 | 29 | /** 30 | * 清除数据源类型 31 | */ 32 | public static void clearDataSourceType() { 33 | contextHolder.remove(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/mutidatasource/DynamicDataSource.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.mutidatasource; 2 | 3 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 4 | 5 | /** 6 | * 动态数据源 7 | * 8 | * @author fengshuonan 9 | * @date 2017年3月5日 上午9:11:49 10 | */ 11 | public class DynamicDataSource extends AbstractRoutingDataSource { 12 | 13 | @Override 14 | protected Object determineCurrentLookupKey() { 15 | return DataSourceContextHolder.getDataSourceType(); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/mutidatasource/annotion/DataSource.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.mutidatasource.annotion; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 7 | * 多数据源标识 8 | * 9 | * @author fengshuonan 10 | * @date 2017年3月5日 上午9:44:24 11 | */ 12 | @Inherited 13 | @Retention(RetentionPolicy.RUNTIME) 14 | @Target({ ElementType.METHOD }) 15 | public @interface DataSource { 16 | 17 | String name() default ""; 18 | } 19 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/page/PageInfoBT.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.page; 2 | 3 | 4 | import cn.enilu.guns.bean.vo.query.Page; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 分页结果的封装(for Bootstrap Table) 10 | * 11 | * @author fengshuonan 12 | * @Date 2017年1月22日 下午11:06:41 13 | */ 14 | public class PageInfoBT { 15 | 16 | // 结果集 17 | private List rows; 18 | 19 | // 总数 20 | private long total; 21 | 22 | public PageInfoBT(Page page) { 23 | this.rows = page.getRecords(); 24 | this.total = page.getTotal(); 25 | } 26 | 27 | public List getRows() { 28 | return rows; 29 | } 30 | 31 | public void setRows(List rows) { 32 | this.rows = rows; 33 | } 34 | 35 | public long getTotal() { 36 | return total; 37 | } 38 | 39 | public void setTotal(long total) { 40 | this.total = total; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/support/ObjectKit.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.support; 2 | 3 | /** 4 | * 一些通用的函数 5 | * 6 | * @author Looly 7 | * 8 | */ 9 | public class ObjectKit { 10 | /** 11 | * 比较两个对象是否相等。
12 | * 相同的条件有两个,满足其一即可:
13 | * 1. obj1 == null && obj2 == null; 2. obj1.equals(obj2) 14 | * 15 | * @param obj1 对象1 16 | * @param obj2 对象2 17 | * @return 是否相等 18 | */ 19 | public static boolean equals(Object obj1, Object obj2) { 20 | return (obj1 != null) ? (obj1.equals(obj2)) : (obj2 == null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/util/HttpSessionHolder.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.util; 2 | 3 | import javax.servlet.http.HttpSession; 4 | 5 | /** 6 | * 非Controller中获取当前session的工具类 7 | * 8 | * @author fengshuonan 9 | * @date 2016年11月28日 上午10:24:31 10 | */ 11 | public class HttpSessionHolder { 12 | 13 | private static ThreadLocal tl = new ThreadLocal(); 14 | 15 | public static void put(HttpSession s) { 16 | tl.set(s); 17 | } 18 | 19 | public static HttpSession get() { 20 | return tl.get(); 21 | } 22 | 23 | public static void remove() { 24 | tl.remove(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/util/KaptchaUtil.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.util; 2 | 3 | import cn.enilu.guns.admin.config.properties.GunsProperties; 4 | import cn.enilu.guns.bean.vo.SpringContextHolder; 5 | 6 | /** 7 | * 验证码工具类 8 | */ 9 | public class KaptchaUtil { 10 | 11 | /** 12 | * 获取验证码开关 13 | * 14 | * @author stylefeng 15 | * @Date 2017/5/23 22:34 16 | */ 17 | public static Boolean getKaptchaOnOff() { 18 | return SpringContextHolder.getBean(GunsProperties.class).getKaptchaOpen(); 19 | } 20 | } -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/util/RenderUtil.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.util; 2 | 3 | import cn.enilu.guns.bean.exception.GunsException; 4 | import com.alibaba.fastjson.JSON; 5 | import cn.enilu.guns.bean.exception.GunsExceptionEnum; 6 | 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.io.IOException; 9 | import java.io.PrintWriter; 10 | 11 | /** 12 | * 渲染工具类 13 | * 14 | * @author stylefeng 15 | * @date 2017-08-25 14:13 16 | */ 17 | public class RenderUtil { 18 | 19 | /** 20 | * 渲染json对象 21 | */ 22 | public static void renderJson(HttpServletResponse response, Object jsonObject) { 23 | try { 24 | response.setContentType("application/json"); 25 | response.setCharacterEncoding("UTF-8"); 26 | PrintWriter writer = response.getWriter(); 27 | writer.write(JSON.toJSONString(jsonObject)); 28 | } catch (IOException e) { 29 | throw new GunsException(GunsExceptionEnum.WRITE_ERROR); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/core/util/SqlUtil.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.core.util; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * sql语句工具类 8 | * 9 | * @author fengshuonan 10 | * @date 2016年12月6日 下午1:01:54 11 | */ 12 | public class SqlUtil { 13 | 14 | /** 15 | * @Description 根据集合的大小,输出相应个数"?" 16 | * @author fengshuonan 17 | */ 18 | public static String parse(List list) { 19 | String str = ""; 20 | if (list != null && list.size() > 0) { 21 | str = str + "?"; 22 | for (int i = 1; i < list.size(); i++) { 23 | str = str + ",?"; 24 | } 25 | } 26 | return str; 27 | } 28 | 29 | public static void main(String[] args) { 30 | ArrayList arrayList = new ArrayList<>(); 31 | arrayList.add(2); 32 | arrayList.add(2); 33 | System.out.println(parse(arrayList)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/modular/system/controller/BlackboardController.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.modular.system.controller; 2 | 3 | import cn.enilu.guns.admin.core.base.controller.BaseController; 4 | import cn.enilu.guns.dao.system.SysNoticeRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.ui.Model; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * 总览信息 14 | * 15 | * @author fengshuonan 16 | * @Date 2017年3月4日23:05:54 17 | */ 18 | @Controller 19 | @RequestMapping("/blackboard") 20 | public class BlackboardController extends BaseController { 21 | 22 | @Autowired 23 | SysNoticeRepository sysNoticeRepository; 24 | 25 | /** 26 | * 跳转到黑板 27 | */ 28 | @RequestMapping("") 29 | public String blackboard(Model model) { 30 | List notices = (List) sysNoticeRepository.findAll(); 31 | model.addAttribute("noticeList",notices); 32 | return "/blackboard.html"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /guns-admin/src/main/java/cn/enilu/guns/admin/runner/StartJob.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.admin.runner; 2 | 3 | import cn.enilu.guns.bean.vo.QuartzJob; 4 | import cn.enilu.guns.service.task.JobService; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.ApplicationArguments; 9 | import org.springframework.boot.ApplicationRunner; 10 | import org.springframework.stereotype.Component; 11 | 12 | import java.util.List; 13 | /** 14 | * 启动定时任务 15 | * 16 | * @author enilu 17 | * @Date 2019-08-13 18 | */ 19 | @Component 20 | public class StartJob implements ApplicationRunner { 21 | 22 | @Autowired 23 | private JobService jobService; 24 | 25 | private Logger log = LoggerFactory.getLogger(getClass()); 26 | 27 | @Override 28 | public void run(ApplicationArguments applicationArguments) throws Exception { 29 | log.info("start Job >>>>>>>>>>>>>>>>>>>>>>>"); 30 | List list = jobService.getTaskList(); 31 | for (QuartzJob quartzJob : list) { 32 | jobService.addJob(quartzJob); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /guns-admin/src/main/resources/META-INF/spring-devtools.properties: -------------------------------------------------------------------------------- 1 | restart.include.beetl=/beetl-2.7.15.jar -------------------------------------------------------------------------------- /guns-admin/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | ## 开发环境配置 2 | spring.datasource.url=jdbc:mysql://enilu-db:3306/gunslite?useUnicode=true&characterEncoding=UTF8&useSSL=false 3 | spring.datasource.username=gunslite 4 | spring.datasource.password=gunsLITE@123 5 | 6 | 7 | ##每次启动都重新创建数据库表 8 | spring.jpa.hibernate.ddl-auto=create 9 | 10 | #默认使用InnoDB引擎 11 | spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect 12 | spring.datasource.sql-script-encoding=utf-8 13 | 14 | ## 使用druid输出sql语句 15 | spring.datasource.druid.filter.slf4j.enabled=true 16 | spring.datasource.druid.filter.slf4j.statement-create-after-log-enabled=false 17 | spring.datasource.druid.filter.slf4j.statement-close-after-log-enabled=false 18 | # 如果要查看sql语句的参数可以将下面配置注释掉或者更改为true 19 | spring.datasource.druid.filter.slf4j.statement-parameter-set-log-enabled=false 20 | spring.datasource.druid.filter.slf4j.connection-log-enabled=false 21 | spring.datasource.druid.filter.slf4j.result-set-log-enabled=false 22 | spring.datasource.druid.filter.slf4j.result-set-open-after-log-enabled=false 23 | spring.datasource.druid.filter.slf4j.result-set-close-after-log-enabled=false 24 | logging.level.druid.sql=debug 25 | -------------------------------------------------------------------------------- /guns-admin/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | ## 生产环境配置 2 | debug=false 3 | #Mysql属性配置文件,Spring-boot系统配置 4 | spring.datasource.url=jdbc:mysql://enilu-db:3306/gunslite?useUnicode=true&characterEncoding=UTF8&useSSL=false 5 | spring.datasource.username=gunslite 6 | spring.datasource.password=gunsLITE@123 7 | 8 | ##实际开发和生产环境中注释掉下面配置 9 | spring.jpa.hibernate.ddl-auto=create 10 | #默认使用InnoDB引擎 11 | spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect 12 | spring.datasource.sql-script-encoding=utf-8 13 | spring.jpa.show-sql=true 14 | 15 | -------------------------------------------------------------------------------- /guns-admin/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | _____ _ _ ____ ____ ____ _ _ _ 3 | / __// \ /\/ \ /|/ ___\ / _ \/ _ \/ \__/|/ \/ \ /| 4 | | | _| | ||| |\ ||| \ | / \|| | \|| |\/||| || |\ || 5 | | |_//| \_/|| | \||\___ | | |-||| |_/|| | ||| || | \|| 6 | \____\\____/\_/ \|\____/ \_/ \|\____/\_/ \|\_/\_/ \| 7 | 8 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/blackboard.html: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 | @for(notice in noticeList){ 6 |
7 | 8 | ${notice.content} 9 |
10 | @} 11 |
12 |
13 |
14 | @} 15 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/NameCon.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 名称查询条件标签的参数说明: 3 | 4 | name : 查询条件的名称 5 | id : 查询内容的input框id 6 | @*/ 7 |
8 |
9 | 12 |
13 | 14 |
-------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/SelectCon.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 选择查询条件标签的参数说明: 3 | 4 | name : 查询条件的名称 5 | id : 查询内容的input框id 6 | @*/ 7 |
8 |
9 | 12 |
13 | 16 |
-------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/TimeCon.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 时间查询条件标签的参数说明: 3 | 4 | name : 查询条件的名称 5 | id : 查询内容的input框id 6 | isTime : 日期是否带有小时和分钟(true/false) 7 | pattern : 日期的正则表达式(例如:"YYYY-MM-DD") 8 | @*/ 9 |
10 |
11 | 14 |
15 | 17 |
-------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/avatar.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 头像参数的说明: 3 | name : 名称 4 | id : 头像的id 5 | @*/ 6 |
7 | 8 |
9 |
10 |
13 | @}else{ 14 | src="${ctxPath}/kaptcha/${avatarImg}">
15 | @} 16 |
17 |
18 |
19 |
20 |  上传 21 |
22 |
23 | 24 | 25 | @if(isNotEmpty(underline) && underline == 'true'){ 26 |
27 | @} 28 | 29 | 30 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/button.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 按钮标签中各个参数的说明: 3 | 4 | btnType : 按钮的类型决定了颜色(default-灰色,primary-绿色,success-蓝色,info-淡蓝色,warning-黄色,danger-红色,white-白色) 5 | space : 按钮左侧是否有间隔(true/false) 6 | clickFun : 点击按钮所执行的方法 7 | icon : 按钮上的图标的样式 8 | name : 按钮名称 9 | @*/ 10 | 11 | @var spaceCss = ""; 12 | @var btnType = ""; 13 | @if(isEmpty(space)){ 14 | @ spaceCss = ""; 15 | @}else{ 16 | @ spaceCss = "button-margin"; 17 | @} 18 | @if(isEmpty(btnCss)){ 19 | @ btnType = "primary"; 20 | @}else{ 21 | @ btnType = btnCss; 22 | @} 23 | 29 | 30 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/select.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | select标签中各个参数的说明: 3 | name : select的名称 4 | id : select的id 5 | underline : 是否带分割线 6 | multiple : 是否多选 7 | @*/ 8 |
9 | 10 |
11 | @if(isNotEmpty(multiple)){ 12 | 15 | 16 | @}else{ 17 | 20 | @} 21 | 22 | @if(isNotEmpty(hidden)){ 23 | 24 | @} 25 |
26 |
27 | @if(isNotEmpty(underline) && underline == 'true'){ 28 |
29 | @} 30 | 31 | 32 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/table.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | 表格标签的参数说明: 3 | 4 | id : table表格的id 5 | @*/ 6 | 7 | 8 | 9 | 10 | 11 | 12 |
-------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/common/tags/textarea.tag: -------------------------------------------------------------------------------- 1 | @/* 2 | textarea标签中各个参数的说明: 3 | name : 名称 4 | id : id 5 | underline : 是否带分割线 6 | rows : 行数 7 | cols : 列数 8 | @*/ 9 |
10 | 11 |
12 | 17 | 18 |
19 |
20 | @if(isNotEmpty(underline) && underline == 'true'){ 21 |
22 | @} 23 | 24 | 25 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/message/history/message_view.html: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 | 6 |
7 |
8 | <#input name="自增主键" value="${item.id}" underline="true" readonly="readonly"/> 9 | <#input name="消息模板" value="${item.tplCode}" readonly="readonly"/> 10 |
11 |
12 | <#input name="接收人" value="${item.receiver}" underline="true" readonly="readonly"/> 13 | <#input name="消息内容" value="${item.content}" readonly="readonly"/> 14 |
15 |
16 | 17 |
18 |
19 |
20 | @} 21 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/message/sender/sender.html: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 |
6 |
发送器列表
7 |
8 |
9 |
10 |
11 | 12 | 17 | <#table id="MessageSenderTable"/> 18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | @} 26 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/system/cfg/cfg_add.html: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 | 6 |
7 |
8 | <#input id="cfgName" name="参数名"/> 9 | <#input id="cfgValue" name="参数值" underline="true"/> 10 |
11 |
12 | <#input id="cfgDesc" name="参数描述" underline="true"/> 13 |
14 |
15 |
16 |
17 | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CfgInfoDlg.addSubmit()"/> 18 | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CfgInfoDlg.close()"/> 19 |
20 |
21 |
22 |
23 |
24 | 25 | @} 26 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/WEB-INF/view/system/task/task_log.html: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 |
6 |
7 | <#table id="TaskLogTable"/> 8 |
9 |
10 |
11 |
12 |
13 | 16 | 17 | @} 18 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/edu-finance.css: -------------------------------------------------------------------------------- 1 | /*照片审核页面*/ 2 | #auditImg p{ 3 | text-align: center; 4 | } -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-1.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-3.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/patterns/header-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/patterns/header-profile.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/patterns/shattered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/patterns/shattered.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/css/demo.css: -------------------------------------------------------------------------------- 1 | /* 2 | * blueimp Gallery Demo CSS 2.0.0 3 | * https://github.com/blueimp/Gallery 4 | * 5 | * Copyright 2013, Sebastian Tschan 6 | * https://blueimp.net 7 | * 8 | * Licensed under the MIT license: 9 | * http://www.opensource.org/licenses/MIT 10 | */ 11 | 12 | body { 13 | max-width: 750px; 14 | margin: 0 auto; 15 | padding: 1em; 16 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif; 17 | font-size: 1em; 18 | line-height: 1.4em; 19 | background: #222; 20 | color: #fff; 21 | -webkit-text-size-adjust: 100%; 22 | -ms-text-size-adjust: 100%; 23 | } 24 | a { 25 | color: orange; 26 | text-decoration: none; 27 | } 28 | img { 29 | border: 0; 30 | vertical-align: middle; 31 | } 32 | h1 { 33 | line-height: 1em; 34 | } 35 | h2, 36 | .links { 37 | text-align: center; 38 | } 39 | 40 | @media (min-width: 481px) { 41 | .navigation { 42 | list-style: none; 43 | padding: 0; 44 | } 45 | .navigation li { 46 | display: inline-block; 47 | } 48 | .navigation li:not(:first-child):before { 49 | content: '| '; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/blueimp/img/error.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/blueimp/img/loading.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/play-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/blueimp/img/play-pause.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/play-pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/video-play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/blueimp/img/video-play.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/blueimp/img/video-play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite@2x.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/alpha.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/hue-horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/hue-horizontal.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/hue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/hue.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/saturation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/colorpicker/img/bootstrap-colorpicker/saturation.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.eot -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.ttf -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/footable/fonts/footable.woff -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/fullcalendar/fullcalendar.print.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FullCalendar v1.6.4 Print Stylesheet 3 | * Docs & License: http://arshaw.com/fullcalendar/ 4 | * (c) 2013 Adam Shaw 5 | */ 6 | 7 | /* 8 | * Include this stylesheet on your page to get a more printer-friendly calendar. 9 | * When including this stylesheet, use the media='print' attribute of the tag. 10 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 11 | */ 12 | 13 | 14 | /* Events 15 | -----------------------------------------------------*/ 16 | 17 | .fc-event { 18 | background: #fff !important; 19 | color: #000 !important; 20 | } 21 | 22 | /* for vertical events */ 23 | 24 | .fc-event-bg { 25 | display: none !important; 26 | } 27 | 28 | .fc-event .ui-resizable-handle { 29 | display: none !important; 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/iCheck/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/iCheck/green.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/iCheck/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/iCheck/green@2x.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/images/sort_asc.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/images/sort_desc.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/images/sprite-skin-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/images/sprite-skin-flat.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/images/spritemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/images/spritemap.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/images/spritemap@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/images/spritemap@2x.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/css/jquery.treegrid.css: -------------------------------------------------------------------------------- 1 | .treegrid-indent {width:16px; height: 16px; display: inline-block; position: relative;} 2 | 3 | .treegrid-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;} 4 | 5 | .treegrid-expander-expanded{background-image: url(../img/collapse.png); } 6 | .treegrid-expander-collapsed{background-image: url(../img/expand.png);} 7 | .treegrid-selected{background: #f5f5f5 !important;} 8 | .treegrid-table{border:0 !important;margin-bottom:0} 9 | .treegrid-table tbody {display:block;height:auto;overflow-y:auto;} 10 | .treegrid-table thead, .treegrid-table tbody tr {display:table;width:100%;table-layout:fixed;} 11 | .treegrid-thead th{line-height:40px;border: 0 !important;background:#fff !important;border-radius: 4px;border-left:1px solid #e7eaec !important;border-bottom:2px solid #e7eaec !important;text-align: center;} 12 | .treegrid-thead tr :first-child{border-left:0 !important} 13 | .treegrid-tbody td{border: 0 !important;border-left:1px solid #e7eaec !important;border-bottom:1px solid #e7eaec !important;} 14 | .treegrid-tbody tr :first-child{border-left:0 !important} 15 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/collapse.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/expand.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/file.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jquery-treegrid/img/folder.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jsTree/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jsTree/32px.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/jsTree/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/jsTree/throbber.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/morris/morris-0.4.3.min.css: -------------------------------------------------------------------------------- 1 | .morris-hover{position:absolute;z-index:1000;}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255, 255, 255, 0.8);border:solid 2px rgba(230, 230, 230, 0.8);font-family:sans-serif;font-size:12px;text-align:center;}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0;} 2 | .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;} 3 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/multiselect/bootstrap-multiselect.css: -------------------------------------------------------------------------------- 1 | .multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li.multiselect-group label{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:700}.multiselect-container>li.multiselect-group-clickable label{cursor:pointer}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0} 2 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/switchery/switchery.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Main stylesheet for Switchery. 4 | * http://abpetkov.github.io/switchery/ 5 | * 6 | */ 7 | 8 | .switchery { 9 | background-color: #fff; 10 | border: 1px solid #dfdfdf; 11 | border-radius: 20px; 12 | cursor: pointer; 13 | display: inline-block; 14 | height: 30px; 15 | position: relative; 16 | vertical-align: middle; 17 | width: 50px; 18 | 19 | -webkit-box-sizing: content-box; 20 | -moz-box-sizing: content-box; 21 | box-sizing: content-box; 22 | } 23 | 24 | .switchery > small { 25 | background: #fff; 26 | border-radius: 100%; 27 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); 28 | height: 30px; 29 | position: absolute; 30 | top: 0; 31 | width: 30px; 32 | } 33 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/validate/bootstrapValidator.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * BootstrapValidator (http://bootstrapvalidator.com) 3 | * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 4 | * 5 | * @version v0.5.3, built on 2014-11-05 9:14:18 PM 6 | * @author https://twitter.com/nghuuphuoc 7 | * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc 8 | * @license Commercial: http://bootstrapvalidator.com/license/ 9 | * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ 10 | */ 11 | 12 | .bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100} -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/webuploader/webuploader.css: -------------------------------------------------------------------------------- 1 | .webuploader-container { 2 | position: relative; 3 | } 4 | .webuploader-element-invisible { 5 | position: absolute !important; 6 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 7 | clip: rect(1px,1px,1px,1px); 8 | } 9 | .webuploader-pick { 10 | position: relative; 11 | display: inline-block; 12 | cursor: pointer; 13 | background: #1ab394; 14 | padding: 6px 12px; 15 | color: #fff; 16 | text-align: center; 17 | border-radius: 3px; 18 | overflow: hidden; 19 | font-size: 14px; 20 | font-weight: 400; 21 | } 22 | .webuploader-pick-hover { 23 | background: #18ab8d; 24 | } 25 | 26 | .webuploader-pick-disable { 27 | opacity: 0.6; 28 | pointer-events:none; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_close.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_open.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/2.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/3.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/4.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/5.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/6.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/7.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/8.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/9.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/line_conn.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/loading.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/favicon.ico -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/bg.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/bg/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/bg/bg.jpg -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/girl.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/icons.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/loading-upload.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/loading-upload.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/locked.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/login-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/login-background.jpg -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/img/user.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/bootstrap-magnify/css/bootstrap-magnify.css: -------------------------------------------------------------------------------- 1 | .magnify { 2 | position: relative; 3 | cursor: none 4 | } 5 | 6 | .magnify-large { 7 | position: absolute; 8 | display: none; 9 | width: 175px; 10 | height: 175px; 11 | 12 | -webkit-box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25); 13 | -moz-box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25); 14 | box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25); 15 | 16 | -webkit-border-radius: 50%; 17 | -moz-border-radius: 50%; 18 | border-radius: 50% 19 | } 20 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/bootstrap-magnify/css/bootstrap-magnify.min.css: -------------------------------------------------------------------------------- 1 | .magnify{position:relative;cursor:none}.magnify-large{position:absolute;display:none;width:175px;height:175px;-webkit-box-shadow:0 0 0 7px rgba(255,255,255,0.85),0 0 7px 7px rgba(0,0,0,0.25),inset 0 0 40px 2px rgba(0,0,0,0.25);-moz-box-shadow:0 0 0 7px rgba(255,255,255,0.85),0 0 7px 7px rgba(0,0,0,0.25),inset 0 0 40px 2px rgba(0,0,0,0.25);box-shadow:0 0 0 7px rgba(255,255,255,0.85),0 0 7px 7px rgba(0,0,0,0.25),inset 0 0 40px 2px rgba(0,0,0,0.25);-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%} 2 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.11.1 - 2017-02-22 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2017 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery); -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/codemirror/mode/ruby/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("divide_equal_operator", 9 | "[variable bar] [operator /=] [variable foo]"); 10 | 11 | MT("divide_equal_operator_no_spacing", 12 | "[variable foo][operator /=][number 42]"); 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/codemirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFF; 3 | background-color: #900; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } 27 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/blank.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/gritter/images/gritter-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/gritter/images/gritter-light.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/gritter/images/gritter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/gritter/images/gritter.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/gritter/images/ie-spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/gritter/images/ie-spacer.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/jquery-treegrid/js/jquery.treegrid.bootstrap3.js: -------------------------------------------------------------------------------- 1 | $.extend($.fn.treegrid.defaults, { 2 | expanderExpandedClass: 'glyphicon glyphicon-chevron-down', 3 | expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' 4 | }); 5 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/laydate/skins/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/laydate/skins/default/icon.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/layim/data/chatlog.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 1, 3 | "msg": "ok", 4 | "data": [ 5 | { 6 | "id": "100001", 7 | "name": "Beaut-zihan", 8 | "time": "10:23", 9 | "face": "img/a1.jpg" 10 | }, 11 | { 12 | "id": "100002", 13 | "name": "慕容晓晓", 14 | "time": "昨天", 15 | "face": "img/a2.jpg" 16 | }, 17 | { 18 | "id": "1000033", 19 | "name": "乔峰", 20 | "time": "2014-4.22", 21 | "face": "img/a3.jpg" 22 | }, 23 | { 24 | "id": "10000333", 25 | "name": "高圆圆", 26 | "time": "2014-4.21", 27 | "face": "img/a4.jpg" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/layim/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/layim/loading.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon_ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon_ext.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/textbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/textbg.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_ico0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_ico0.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading0.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading1.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading2.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading3.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_title0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_title0.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/skin/moon/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/skin/moon/default.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon.png -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/markdown/bootstrap-markdown.zh.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese translation for bootstrap-markdown 3 | * benhaile 4 | */ 5 | (function ($) { 6 | $.fn.markdown.messages.zh = { 7 | 'Bold': "粗体", 8 | 'Italic': "斜体", 9 | 'Heading': "标题", 10 | 'URL/Link': "链接", 11 | 'Image': "图片", 12 | 'List': "列表", 13 | 'Unordered List': "无序列表", 14 | 'Ordered List': "有序列表", 15 | 'Code': "代码", 16 | 'Quote': "引用", 17 | 'Preview': "预览", 18 | 'strong text': "粗体", 19 | 'emphasized text': "强调", 20 | 'heading text': "标题", 21 | 'enter link description here': "输入链接说明", 22 | 'Insert Hyperlink': "URL地址", 23 | 'enter image description here': "输入图片说明", 24 | 'Insert Image Hyperlink': "图片URL地址", 25 | 'enter image title here': "在这里输入图片标题", 26 | 'list text here': "这里是列表文本", 27 | 'code text here': "这里输入代码", 28 | 'quote here': "这里输入引用文本" 29 | 30 | 31 | }; 32 | }(jQuery)); 33 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/webuploader/README.md: -------------------------------------------------------------------------------- 1 | 目录说明 2 | ======================== 3 | 4 | ```bash 5 | ├── Uploader.swf # SWF文件,当使用Flash运行时需要引入。 6 | ├ 7 | ├── webuploader.js # 完全版本。 8 | ├── webuploader.min.js # min版本 9 | ├ 10 | ├── webuploader.flashonly.js # 只有Flash实现的版本。 11 | ├── webuploader.flashonly.min.js # min版本 12 | ├ 13 | ├── webuploader.html5only.js # 只有Html5实现的版本。 14 | ├── webuploader.html5only.min.js # min版本 15 | ├ 16 | ├── webuploader.noimage.js # 去除图片处理的版本,包括HTML5和FLASH. 17 | ├── webuploader.noimage.min.js # min版本 18 | ├ 19 | ├── webuploader.custom.js # 自定义打包方案,请查看 Gruntfile.js,满足移动端使用。 20 | └── webuploader.custom.min.js # min版本 21 | ``` 22 | 23 | ## 示例 24 | 25 | 请把整个 Git 包下载下来放在 php 服务器下,因为默认提供的文件接受是用 php 编写的,打开 examples 页面便能查看示例效果。 -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/webuploader/Uploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enilu/guns-lite/46eedbca785eb6c95641cc73a7e07d869f8f2246/guns-admin/src/main/webapp/static/js/plugins/webuploader/Uploader.swf -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.css: -------------------------------------------------------------------------------- 1 | .webuploader-container { 2 | position: relative; 3 | } 4 | .webuploader-element-invisible { 5 | position: absolute !important; 6 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 7 | clip: rect(1px,1px,1px,1px); 8 | } 9 | .webuploader-pick { 10 | position: relative; 11 | display: inline-block; 12 | cursor: pointer; 13 | background: #00b7ee; 14 | padding: 10px 15px; 15 | color: #fff; 16 | text-align: center; 17 | border-radius: 3px; 18 | overflow: hidden; 19 | } 20 | .webuploader-pick-hover { 21 | background: #00a2d4; 22 | } 23 | 24 | .webuploader-pick-disable { 25 | opacity: 0.6; 26 | pointer-events:none; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/js/welcome.js: -------------------------------------------------------------------------------- 1 | //欢迎信息 2 | 3 | layer.config({ 4 | extend: ['extend/layer.ext.js', 'skin/moon/style.css'], 5 | skin: 'layer-ext-moon' 6 | }); 7 | 8 | layer.ready(function () { 9 | 10 | var html = $('#welcome-template').html(); 11 | $('a.viewlog').click(function () { 12 | logs(); 13 | return false; 14 | }); 15 | 16 | $('#pay-qrcode').click(function(){ 17 | var html=$(this).html(); 18 | parent.layer.open({ 19 | title: false, 20 | type: 1, 21 | closeBtn:false, 22 | shadeClose:true, 23 | area: ['600px', 'auto'], 24 | content: html 25 | }); 26 | }); 27 | 28 | function logs() { 29 | parent.layer.open({ 30 | title: '初见倾心,再见动情', 31 | type: 1, 32 | area: ['700px', 'auto'], 33 | content: html, 34 | btn: ['确定', '取消'] 35 | }); 36 | } 37 | 38 | console.log('欢迎使用H+,如果您在使用的过程中有碰到问题,可以参考开发文档,感谢您的支持。'); 39 | 40 | }); 41 | -------------------------------------------------------------------------------- /guns-admin/src/main/webapp/static/modular/system/code/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 代码生成管理初始化 3 | */ 4 | var Code = { 5 | 6 | }; 7 | 8 | /** 9 | * 提交代码生成 10 | */ 11 | Code.generate = function () { 12 | var baseAjax = Feng.baseAjax("/code/generate","生成代码"); 13 | baseAjax.set("bizChName"); 14 | baseAjax.set("bizEnName"); 15 | baseAjax.set("path"); 16 | baseAjax.set("moduleName"); 17 | baseAjax.start(); 18 | }; 19 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/BaseRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | import org.springframework.data.repository.NoRepositoryBean; 6 | import org.springframework.data.repository.PagingAndSortingRepository; 7 | 8 | import java.io.Serializable; 9 | import java.util.List; 10 | 11 | /** 12 | * 封装基础的dao接口 13 | * 14 | * @author :enilu 15 | * @date :Created in 2019/6/29 12:50 16 | */ 17 | @NoRepositoryBean 18 | public interface BaseRepository extends JpaRepository 19 | , PagingAndSortingRepository 20 | , JpaSpecificationExecutor { 21 | List queryBySql(String sql); 22 | List query(String sql); 23 | Object getBySql(String sql); 24 | T get(String sql); 25 | int execute(String sql); 26 | Class getDataClass(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/DaoConfiguration.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 5 | 6 | /** 7 | * Name: DabConfiguration
8 | * User: Yao
9 | * Date: 2018/2/27
10 | * Time: 13:54
11 | */ 12 | @Configuration 13 | @EnableJpaRepositories("cn.enilu.guns.dao") 14 | public class DaoConfiguration { 15 | } 16 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/cache/Cache.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.cache; 2 | 3 | /** 4 | * 顶级缓存接口 5 | */ 6 | public interface Cache { 7 | /** 8 | * 将数据库中的数据加载到缓存中 9 | */ 10 | void cache(); 11 | 12 | 13 | /** 14 | * 获取缓存数据 15 | * 16 | * @param key 17 | * @return 18 | */ 19 | Object get(String key); 20 | 21 | 22 | /** 23 | * 设置缓存数据 24 | * 25 | * @param key 26 | * @param val 27 | */ 28 | void set(String key, Object val); 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/cache/ConfigCache.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.cache; 2 | 3 | /** 4 | * 全局配置数据访问 5 | */ 6 | public interface ConfigCache extends Cache { 7 | 8 | 9 | /** 10 | * 获取全局配置参数值,可选本地缓存 11 | * @param key 12 | * @return 13 | */ 14 | String get(String key, boolean local); 15 | 16 | /** 17 | * 获取全局配置参数值(带默认值) 18 | * 19 | * @param key the key 20 | * @param def the default value 21 | * @return the config 22 | */ 23 | String get(String key, String def); 24 | 25 | /** 26 | * 删除缓存 27 | * @param key 28 | * @param val 29 | */ 30 | void del(String key, String val); 31 | } 32 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/cache/DictCache.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.cache; 2 | 3 | import cn.enilu.guns.bean.entity.system.Dict; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 字典缓存 9 | * 10 | * @author zt 11 | * @version 2018/12/23 0023 12 | */ 13 | public interface DictCache extends Cache{ 14 | 15 | List getDictsByPname(String dictName); 16 | String getDict(Long dictId); 17 | } 18 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/cache/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * package-info 3 | * 4 | * @version 2018/9/11 0011 5 | * @author enilu 6 | */ 7 | package cn.enilu.guns.dao.cache; -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/message/MessageRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.message; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.message.Message; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | 7 | import java.util.ArrayList; 8 | 9 | 10 | public interface MessageRepository extends BaseRepository { 11 | void deleteAllByIdIn(ArrayList list); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/message/MessagesenderRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.message; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.message.MessageSender; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | 7 | 8 | public interface MessagesenderRepository extends BaseRepository { 9 | } 10 | 11 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/message/MessagetemplateRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.message; 2 | 3 | 4 | 5 | import cn.enilu.guns.bean.entity.message.MessageTemplate; 6 | import cn.enilu.guns.dao.BaseRepository; 7 | 8 | import java.util.List; 9 | 10 | 11 | public interface MessagetemplateRepository extends BaseRepository { 12 | MessageTemplate findByCode(String code); 13 | 14 | List findByIdMessageSender(Long idMessageSender); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/CfgRepository.java: -------------------------------------------------------------------------------- 1 | 2 | package cn.enilu.guns.dao.system; 3 | 4 | import cn.enilu.guns.bean.entity.system.Cfg; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | 7 | public interface CfgRepository extends BaseRepository { 8 | 9 | Cfg findByCfgName(String cfgName); 10 | } 11 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/DeptRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.Dept; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created on 2018/3/21 0021. 12 | * 13 | * @author enilu 14 | */ 15 | public interface DeptRepository extends BaseRepository { 16 | List findByPidsLike(String pid); 17 | @Query(nativeQuery = true,value = "SELECT id, pid AS pId, simplename AS NAME, ( CASE WHEN (pId = 0 OR pId IS NULL) THEN 'true' ELSE 'false' END ) AS isOpen FROM t_sys_dept") 18 | List tree(); 19 | 20 | List findBySimplenameLikeOrFullnameLike(String name,String name2); 21 | } 22 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/DictRepository.java: -------------------------------------------------------------------------------- 1 | 2 | package cn.enilu.guns.dao.system; 3 | 4 | 5 | import cn.enilu.guns.bean.entity.system.Dict; 6 | import cn.enilu.guns.dao.BaseRepository; 7 | 8 | import java.util.List; 9 | 10 | public interface DictRepository extends BaseRepository { 11 | List findByPid(Long pid); 12 | List findByNameAndPid(String name,Long pid); 13 | 14 | List findByNameLike(String name); 15 | } 16 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/FileInfoRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.FileInfo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.repository.PagingAndSortingRepository; 7 | 8 | public interface FileInfoRepository extends PagingAndSortingRepository 9 | , JpaRepository, JpaSpecificationExecutor { 10 | } 11 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/LoginLogRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.LoginLog; 4 | import cn.enilu.guns.dao.BaseRepository; 5 | 6 | /** 7 | * Created on 2018/3/21 0021. 8 | * 9 | * @author enilu 10 | */ 11 | public interface LoginLogRepository extends BaseRepository{ 12 | } 13 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/OperationLogRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.OperationLog; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | import org.springframework.data.jpa.repository.Modifying; 7 | import org.springframework.data.jpa.repository.Query; 8 | 9 | import javax.transaction.Transactional; 10 | 11 | /** 12 | * Created on 2018/3/21 0021. 13 | * 14 | * @author enilu 15 | */ 16 | public interface OperationLogRepository extends BaseRepository { 17 | @Modifying 18 | @Transactional 19 | @Query(nativeQuery = true,value = "delete from t_sys_operation_log") 20 | int clear(); 21 | } 22 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/RelationRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.Relation; 4 | import cn.enilu.guns.dao.BaseRepository; 5 | import org.springframework.data.jpa.repository.Modifying; 6 | import org.springframework.data.jpa.repository.Query; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | /** 10 | * Created on 2018/3/21 0021. 11 | * 12 | * @author enilu 13 | */ 14 | public interface RelationRepository extends BaseRepository { 15 | @Transactional 16 | @Modifying 17 | @Query(nativeQuery = true,value = "delete from t_sys_relation where roleid=?1") 18 | int deleteByRoleId(Long roleId); 19 | } 20 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/RoleRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.Role; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created on 2018/3/21 0021. 12 | * 13 | * @author enilu 14 | */ 15 | public interface RoleRepository extends BaseRepository { 16 | @Query(nativeQuery = true,value = "SELECT id, pId, NAME, ( CASE WHEN (pId = 0 OR pId IS NULL) THEN 'true' ELSE 'false' END ) OPEN FROM t_sys_role") 17 | List roleTreeList(); 18 | 19 | @Query(nativeQuery = true,value="SELECT r.id AS id, pId AS pId, NAME AS NAME, ( CASE WHEN (pId = 0 OR pId IS NULL) THEN 'true' ELSE 'false' END ) \"open\", ( CASE WHEN (r1.ID = 0 OR r1.ID IS NULL) THEN 'false' ELSE 'true' END ) AS checked FROM t_sys_role r LEFT JOIN ( SELECT ID FROM t_sys_role WHERE ID IN (?1)) r1 ON r.ID = r1.ID ORDER BY pId, num ASC") 20 | List roleTreeListByRoleId(Long[] ids); 21 | 22 | List findByName(String roleName); 23 | } 24 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/SysNoticeRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.Notice; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created on 2018/3/21 0021. 11 | * 12 | * @author enilu 13 | */ 14 | public interface SysNoticeRepository extends BaseRepository { 15 | List findByTitleLike(String name); 16 | } 17 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/TaskLogRepository.java: -------------------------------------------------------------------------------- 1 | 2 | package cn.enilu.guns.dao.system; 3 | 4 | 5 | import cn.enilu.guns.bean.entity.system.TaskLog; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.repository.PagingAndSortingRepository; 9 | 10 | public interface TaskLogRepository extends PagingAndSortingRepository 11 | ,JpaSpecificationExecutor 12 | ,JpaRepository { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/TaskRepository.java: -------------------------------------------------------------------------------- 1 | 2 | package cn.enilu.guns.dao.system; 3 | 4 | 5 | import cn.enilu.guns.bean.entity.system.Task; 6 | import cn.enilu.guns.dao.BaseRepository; 7 | 8 | import java.util.List; 9 | 10 | public interface TaskRepository extends BaseRepository { 11 | 12 | long countByNameLike(String name); 13 | 14 | List findByNameLike(String name); 15 | List findAllByDisabled(boolean disable); 16 | } 17 | -------------------------------------------------------------------------------- /guns-dao/src/main/java/cn/enilu/guns/dao/system/UserRepository.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.User; 5 | import cn.enilu.guns.dao.BaseRepository; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created on 2018/3/21 0021. 11 | * 12 | * @author enilu 13 | */ 14 | public interface UserRepository extends BaseRepository { 15 | User findByAccount(String account); 16 | 17 | List findByRoleid(String valueOf); 18 | } 19 | -------------------------------------------------------------------------------- /guns-dao/src/test/java/cn/enilu/guns/dao/AppConfiguration.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao; 2 | 3 | import org.springframework.boot.autoconfigure.SpringBootApplication; 4 | import org.springframework.boot.autoconfigure.domain.EntityScan; 5 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 6 | 7 | 8 | @SpringBootApplication 9 | @EntityScan(basePackages="cn.enilu.guns.bean.entity") 10 | @EnableJpaRepositories(basePackages= "cn.enilu.guns.dao.system") 11 | public class AppConfiguration { 12 | } 13 | 14 | -------------------------------------------------------------------------------- /guns-dao/src/test/java/cn/enilu/guns/dao/BaseApplicationStartTest.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.cache.annotation.EnableCaching; 9 | import org.springframework.context.annotation.ComponentScan; 10 | import org.springframework.test.context.TestPropertySource; 11 | import org.springframework.test.context.junit4.SpringRunner; 12 | 13 | /** 14 | * Name: ApplicationStartTest
15 | * User: enilu
16 | * Date: 2018/1/24
17 | * Time: 16:26
18 | */ 19 | @RunWith(SpringRunner.class) 20 | @SpringBootTest(classes = AppConfiguration.class) 21 | @AutoConfigureTestDatabase(replace= AutoConfigureTestDatabase.Replace.NONE) 22 | @ComponentScan(basePackages = "cn.enilu.guns") 23 | @TestPropertySource(locations = {"classpath:application-test.properties"}) 24 | @EnableCaching 25 | public class BaseApplicationStartTest { 26 | protected final Logger log= LoggerFactory.getLogger(getClass()); 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /guns-dao/src/test/java/cn/enilu/guns/dao/system/CfgRepositoryTest.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.Cfg; 4 | import cn.enilu.guns.dao.BaseApplicationStartTest; 5 | import com.alibaba.fastjson.JSON; 6 | import org.junit.Test; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | 9 | /** 10 | * 测试 11 | * 12 | * @author enilu 13 | * @Date 2017/5/21 12:06 14 | */ 15 | 16 | public class CfgRepositoryTest extends BaseApplicationStartTest{ 17 | @Autowired 18 | CfgRepository cfgRepository; 19 | 20 | @Test 21 | public void findByCfgName() { 22 | Cfg cfg = cfgRepository.findByCfgName("JS_API_TICKET"); 23 | System.out.println(JSON.toJSON(cfg)); 24 | Cfg cfg2 = cfgRepository.findByCfgName("JS_API_TICKET"); 25 | System.out.println(JSON.toJSON(cfg2)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /guns-dao/src/test/java/cn/enilu/guns/dao/system/MenuRepositoryTest.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.dao.system; 2 | 3 | import cn.enilu.guns.dao.BaseApplicationStartTest; 4 | import org.junit.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | /** 8 | * MenuRepositoryTest 9 | * 10 | * @author enilu 11 | * @version 2018/8/14 0014 12 | */ 13 | public class MenuRepositoryTest extends BaseApplicationStartTest { 14 | @Autowired 15 | private MenuRepository menuRepository; 16 | @Test 17 | public void deleteRelationByMenu() { 18 | menuRepository.deleteRelationByMenu(203L); 19 | } 20 | } -------------------------------------------------------------------------------- /guns-dao/src/test/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | debug=true 2 | #Mysql属性配置文件,Spring-boot系统配置 3 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver 4 | spring.datasource.url=jdbc:mysql://localhost:3306/guns-lite 5 | spring.datasource.username=root 6 | spring.datasource.password=root 7 | #配置自动建表:update:没有表新建,有表更新操作,控制台显示建表语句 8 | spring.jpa.show-sql=true 9 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/annotion/core/BussinessLog.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.annotion.core; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | import cn.enilu.guns.bean.dictmap.SystemDict; 5 | 6 | import java.lang.annotation.*; 7 | 8 | /** 9 | * 标记需要做业务日志的方法 10 | * 11 | * @author fengshuonan 12 | * @date 2017-03-31 12:46 13 | */ 14 | @Inherited 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Target({ElementType.METHOD}) 17 | public @interface BussinessLog { 18 | 19 | /** 20 | * 业务的名称,例如:"修改菜单" 21 | */ 22 | String value() default ""; 23 | 24 | /** 25 | * 被修改的实体的唯一标识,例如:菜单实体的唯一标识为"id" 26 | */ 27 | String key() default "id"; 28 | 29 | /** 30 | * 字典(用于查找key的中文名称和字段的中文名称) 31 | */ 32 | Class dict() default SystemDict.class; 33 | } 34 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/annotion/core/Permission.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.annotion.core; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * 权限注解 用于检查权限 规定访问权限 11 | * 12 | * @example @Permission({roleID1,roleID2}) 13 | * @example @Permission 14 | */ 15 | @Inherited 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target({ElementType.METHOD}) 18 | public @interface Permission { 19 | String[] value() default {}; 20 | } 21 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/Const.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant; 2 | 3 | /** 4 | * 系统常量 5 | * 6 | * @author fengshuonan 7 | * @date 2017年2月12日 下午9:42:53 8 | */ 9 | public interface Const { 10 | 11 | /** 12 | * 系统默认的管理员密码 13 | */ 14 | String DEFAULT_PWD = "111111"; 15 | 16 | /** 17 | * 管理员角色的名字 18 | */ 19 | String ADMIN_NAME = "administrator"; 20 | 21 | /** 22 | * 管理员id 23 | */ 24 | Integer ADMIN_ID = 1; 25 | 26 | /** 27 | * 超级管理员角色id 28 | */ 29 | Integer ADMIN_ROLE_ID = 1; 30 | 31 | /** 32 | * 接口文档的菜单名 33 | */ 34 | String API_MENU_NAME = "接口文档"; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/cache/Cache.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant.cache; 2 | 3 | /** 4 | * 所有缓存名称的集合 5 | * 6 | * @author fengshuonan 7 | * @date 2017-04-24 21:56 8 | */ 9 | public interface Cache { 10 | 11 | /** 12 | * 常量缓存 13 | */ 14 | String CONSTANT = "CONSTANT"; 15 | } 16 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/cache/CacheKey.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant.cache; 2 | 3 | /** 4 | * 缓存的key集合 5 | * 6 | * @author fengshuonan 7 | * @date 2017-04-25 9:37 8 | */ 9 | public interface CacheKey { 10 | 11 | /** 12 | * ConstantFactory中的缓存 13 | */ 14 | String ROLES_NAME = "roles_name_"; 15 | 16 | String SINGLE_ROLE_NAME = "single_role_name_"; 17 | 18 | String SINGLE_ROLE_TIP = "single_role_tip_"; 19 | 20 | String DEPT_NAME = "dept_name_"; 21 | 22 | String DICT_NAME = "dict_name_"; 23 | String DICT = "dict_"; 24 | 25 | 26 | String COURSE_NAME = "course_name_"; 27 | String ORG_NAME = "org_name_"; 28 | String DIC_ALL = "dic_all_"; 29 | String CFG = "cfg_"; 30 | String MENU_NAME = "menu_name_" ; 31 | String SYS_USER_NAME = "SYS_USER_NAME" ; 32 | } 33 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created on 2018/3/28 0028. 3 | * 4 | * @author enilu 5 | */ 6 | package cn.enilu.guns.bean.constant; -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/state/LogSucceed.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant.state; 2 | 3 | /** 4 | * 业务是否成功的日志记录 5 | * 6 | * @author fengshuonan 7 | * @Date 2017年1月22日 下午12:14:59 8 | */ 9 | public enum LogSucceed { 10 | 11 | SUCCESS("成功"), 12 | FAIL("失败"); 13 | 14 | String message; 15 | 16 | LogSucceed(String message) { 17 | this.message = message; 18 | } 19 | 20 | public String getMessage() { 21 | return message; 22 | } 23 | 24 | public void setMessage(String message) { 25 | this.message = message; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/state/LogType.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant.state; 2 | 3 | /** 4 | * 日志类型 5 | * 6 | * @author fengshuonan 7 | * @Date 2017年1月22日 下午12:14:59 8 | */ 9 | public enum LogType { 10 | 11 | LOGIN("登录日志"), 12 | LOGIN_FAIL("登录失败日志"), 13 | EXIT("退出日志"), 14 | EXCEPTION("异常日志"), 15 | BUSSINESS("业务日志"); 16 | 17 | String message; 18 | 19 | LogType(String message) { 20 | this.message = message; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/constant/state/Order.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.constant.state; 2 | 3 | /** 4 | * 数据库排序 5 | * 6 | * @author fengshuonan 7 | * @Date 2017年5月31日20:48:41 8 | */ 9 | public enum Order { 10 | 11 | ASC("asc"), DESC("desc"); 12 | 13 | private String des; 14 | 15 | Order(String des) { 16 | this.des = des; 17 | } 18 | 19 | public String getDes() { 20 | return des; 21 | } 22 | 23 | public void setDes(String des) { 24 | this.des = des; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/CfgDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 字典map 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:43 10 | */ 11 | public class CfgDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("cfgId","参数id"); 16 | put("cfgName","参数名称"); 17 | } 18 | 19 | @Override 20 | protected void initBeWrapped() { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/CommonDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | public class CommonDict extends AbstractDictMap { 6 | @Override 7 | public void init() { 8 | put("id","ID"); 9 | put("name","名称"); 10 | put("code","编码"); 11 | put("title","标题"); 12 | put("remark","备注"); 13 | put("descript","备注"); 14 | } 15 | 16 | @Override 17 | protected void initBeWrapped() { 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/DeleteDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 用于删除业务的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class DeleteDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("roleId","角色名称"); 16 | put("deptId", "部门名称"); 17 | put("menuId", "菜单名称"); 18 | put("dictId", "字典名称"); 19 | put("noticeId", "标题"); 20 | } 21 | 22 | @Override 23 | protected void initBeWrapped() { 24 | putFieldWrapperMethodName("roleId","getCacheObject"); 25 | putFieldWrapperMethodName("deptId","getCacheObject"); 26 | putFieldWrapperMethodName("menuId","getCacheObject"); 27 | putFieldWrapperMethodName("dictId","getCacheObject"); 28 | putFieldWrapperMethodName("noticeId","getCacheObject"); 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/DeptDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 部门的映射 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class DeptDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("deptId", "部门名称"); 16 | put("id","部门名称"); 17 | put("num", "部门排序"); 18 | put("pid", "上级名称"); 19 | put("simplename", "部门简称"); 20 | put("fullname", "部门全称"); 21 | put("tips", "备注"); 22 | } 23 | 24 | @Override 25 | protected void initBeWrapped() { 26 | putFieldWrapperMethodName("deptId", "getDeptName"); 27 | putFieldWrapperMethodName("pid", "getDeptName"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/DictMap.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 字典map 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:43 10 | */ 11 | public class DictMap extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("dictId","字典名称"); 16 | put("dictName","字典名称"); 17 | put("dictValues","字典内容"); 18 | } 19 | 20 | @Override 21 | protected void initBeWrapped() { 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/LogDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 日志的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class LogDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("tips","备注"); 16 | } 17 | 18 | @Override 19 | protected void initBeWrapped() { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/MenuDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 菜单的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class MenuDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("menuId","菜单id"); 16 | put("id","菜单id"); 17 | put("code","菜单编号"); 18 | put("pcode","菜单父编号"); 19 | put("name","菜单名称"); 20 | put("icon","菜单图标"); 21 | put("url","url地址"); 22 | put("num","菜单排序号"); 23 | put("levels","菜单层级"); 24 | put("tips","备注"); 25 | put("status","菜单状态"); 26 | put("isopen","是否打开"); 27 | put("",""); 28 | } 29 | 30 | @Override 31 | protected void initBeWrapped() { 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/NoticeMap.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 通知的映射 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class NoticeMap extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("title", "标题"); 16 | put("content", "内容"); 17 | } 18 | 19 | @Override 20 | protected void initBeWrapped() { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/RoleDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 角色的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class RoleDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("roleId","角色名称"); 16 | put("num","角色排序"); 17 | put("pid","角色的父级"); 18 | put("name","角色名称"); 19 | put("deptid","部门名称"); 20 | put("tips","备注"); 21 | put("ids","资源名称"); 22 | } 23 | 24 | @Override 25 | protected void initBeWrapped() { 26 | putFieldWrapperMethodName("pid","getSingleRoleName"); 27 | putFieldWrapperMethodName("deptid","getDeptName"); 28 | putFieldWrapperMethodName("roleId","getSingleRoleName"); 29 | putFieldWrapperMethodName("ids","getMenuNames"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/SystemDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 系统相关的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:48 10 | */ 11 | public class SystemDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | 16 | } 17 | 18 | @Override 19 | protected void initBeWrapped() { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/TaskDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 字典map 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:43 10 | */ 11 | public class TaskDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("taskId","任务id"); 16 | put("name","任务名称"); 17 | } 18 | 19 | @Override 20 | protected void initBeWrapped() { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dictmap/UserDict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dictmap; 2 | 3 | import cn.enilu.guns.bean.dictmap.base.AbstractDictMap; 4 | 5 | /** 6 | * 用户的字典 7 | * 8 | * @author fengshuonan 9 | * @date 2017-05-06 15:01 10 | */ 11 | public class UserDict extends AbstractDictMap { 12 | 13 | @Override 14 | public void init() { 15 | put("userId","账号"); 16 | put("avatar","头像"); 17 | put("account","账号"); 18 | put("name","名字"); 19 | put("birthday","生日"); 20 | put("sex","性别"); 21 | put("email","电子邮件"); 22 | put("phone","电话"); 23 | put("roleid","角色名称"); 24 | put("deptid","部门名称"); 25 | put("roleIds","角色名称集合"); 26 | } 27 | 28 | @Override 29 | protected void initBeWrapped() { 30 | putFieldWrapperMethodName("sex","getSexName"); 31 | putFieldWrapperMethodName("deptid","getDeptName"); 32 | putFieldWrapperMethodName("roleid","getSingleRoleName"); 33 | putFieldWrapperMethodName("userId","getUserAccountById"); 34 | putFieldWrapperMethodName("roleIds","getRoleName"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/dto/UserDto.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.dto; 2 | 3 | import lombok.Data; 4 | import org.springframework.format.annotation.DateTimeFormat; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 用户传输bean 10 | * 11 | * @author stylefeng 12 | * @Date 2017/5/5 22:40 13 | */ 14 | @Data 15 | public class UserDto{ 16 | 17 | private Long id; 18 | private String account; 19 | private String password; 20 | private String salt; 21 | private String name; 22 | 23 | @DateTimeFormat(pattern = "yyyy-MM-dd") 24 | private Date birthday; 25 | private Integer sex; 26 | private String email; 27 | private String phone; 28 | private String roleid; 29 | private Long deptid; 30 | private Long eduorgid; 31 | private Integer status; 32 | private Date createtime; 33 | private Integer version; 34 | private String avatar; 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/message/Message.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.message; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | 10 | /** 11 | * 历史消息 12 | */ 13 | @Data 14 | @Entity(name="t_message") 15 | @Table(appliesTo = "t_message",comment = "历史消息") 16 | public class Message extends BaseEntity { 17 | @Column(name="tpl_code",columnDefinition = "VARCHAR(32) COMMENT '模板编码'") 18 | private String tplCode; 19 | @Column(name="content",columnDefinition = "TEXT COMMENT '消息内容'") 20 | private String content; 21 | @Column(name="receiver",columnDefinition = "VARCHAR(64) COMMENT '接收者'") 22 | private String receiver; 23 | @Column(name="type",columnDefinition = "VARCHAR(32) COMMENT '消息类型,0:短信,1:邮件'") 24 | private Integer type; 25 | @Column(name="state",columnDefinition = "VARCHAR(32) COMMENT '消息类型,0:初始,1:成功,2:失败'") 26 | private Integer state; 27 | } 28 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/message/MessageSender.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.message; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | 10 | /** 11 | * 消息发送者 12 | */ 13 | @Data 14 | @Entity(name="t_message_sender") 15 | @Table(appliesTo = "t_message_sender",comment = "消息发送者") 16 | public class MessageSender extends BaseEntity { 17 | @Column(name="name",columnDefinition = "VARCHAR(64) COMMENT '名称'") 18 | private String name; 19 | @Column(name="class_name",columnDefinition = "VARCHAR(64) COMMENT '发送类'") 20 | private String className; 21 | @Column(name="tpl_code",columnDefinition = "VARCHAR(64) COMMENT '短信运营商模板编号'") 22 | private String tplCode; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Cfg.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.EntityListeners; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_cfg") 18 | @Table(appliesTo = "t_sys_cfg",comment = "系统参数") 19 | @Data 20 | @EntityListeners(AuditingEntityListener.class) 21 | public class Cfg extends BaseEntity { 22 | @Column(name = "cfg_name",columnDefinition = "VARCHAR(256) COMMENT '参数名'") 23 | private String cfgName; 24 | @Column(name = "cfg_value",columnDefinition = "VARCHAR(512) COMMENT '参数值'") 25 | private String cfgValue; 26 | @Column(name = "cfg_desc",columnDefinition = "TEXT COMMENT '备注'") 27 | private String cfgDesc; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Dept.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.EntityListeners; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_dept") 18 | @Table(appliesTo = "t_sys_dept",comment = "部门") 19 | @Data 20 | @EntityListeners(AuditingEntityListener.class) 21 | public class Dept extends BaseEntity { 22 | @Column 23 | private Integer num; 24 | @Column 25 | private Long pid; 26 | @Column 27 | private String pids; 28 | @Column 29 | private String simplename; 30 | @Column 31 | private String fullname; 32 | @Column 33 | private String tips; 34 | @Column 35 | private Integer version; 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Dict.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.EntityListeners; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_dict") 18 | @Table(appliesTo = "t_sys_dict",comment = "字典") 19 | @Data 20 | @EntityListeners(AuditingEntityListener.class) 21 | public class Dict extends BaseEntity { 22 | @Column(columnDefinition = "BIGINT COMMENT '字典组id'") 23 | private Long pid; 24 | @Column(columnDefinition = "VARCHAR(32) COMMENT '字典值'") 25 | private String value; 26 | @Column(columnDefinition = "VARCHAR(32) COMMENT '字典显示值'") 27 | private String name; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/FileInfo.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Table; 9 | import javax.persistence.Transient; 10 | 11 | @Data 12 | @Entity 13 | @Table(name="t_sys_file_info") 14 | public class FileInfo extends BaseEntity { 15 | @Column 16 | private String originalFileName; 17 | @Column 18 | private String realFileName; 19 | @Transient 20 | private String ablatePath; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/LoginLog.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.CreationTimestamp; 5 | import org.hibernate.annotations.Table; 6 | 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.Id; 11 | import java.util.Date; 12 | 13 | /** 14 | * Created on 2018/4/2 0002. 15 | * 16 | * @author enilu 17 | */ 18 | @Entity(name="t_sys_login_log") 19 | @Table(appliesTo = "t_sys_login_log",comment = "登录日志") 20 | @Data 21 | public class LoginLog { 22 | @Id 23 | @GeneratedValue 24 | private Integer id; 25 | @Column 26 | private String logname; 27 | @Column 28 | private Integer userid; 29 | @Column 30 | private String succeed; 31 | @Column 32 | private String message; 33 | @Column 34 | private String ip; 35 | @CreationTimestamp 36 | @Column(name = "create_time",columnDefinition="DATETIME COMMENT '创建时间'") 37 | private Date createTime; 38 | } 39 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Notice.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.EntityListeners; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_notice") 18 | @Table(appliesTo = "t_sys_notice",comment = "系统通知") 19 | @Data 20 | @EntityListeners(AuditingEntityListener.class) 21 | public class Notice extends BaseEntity { 22 | @Column 23 | private String title; 24 | @Column 25 | private Integer type; 26 | @Column 27 | private String content; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/OperationLog.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.Table; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.Id; 10 | import java.util.Date; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name = "t_sys_operation_log") 18 | @Table(appliesTo= "t_sys_operation_log",comment = "操作日志") 19 | @Data 20 | public class OperationLog { 21 | 22 | @Id 23 | @GeneratedValue 24 | private Long id; 25 | @Column 26 | private String logtype; 27 | @Column 28 | private String logname; 29 | @Column 30 | private Integer userid; 31 | @Column 32 | private String classname; 33 | @Column 34 | private String method; 35 | @Column(name="create_time") 36 | private Date createTime; 37 | @Column 38 | private String succeed; 39 | @Column(columnDefinition = "TEXT COMMENT '详细信息'") 40 | private String message; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Relation.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.Table; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.Id; 10 | 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_relation") 18 | @Table(appliesTo = "t_sys_relation",comment = "角色菜单关系") 19 | @Data 20 | public class Relation { 21 | @Id 22 | @GeneratedValue 23 | private Long id; 24 | @Column 25 | private Long menuid; 26 | @Column 27 | private Long roleid; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/system/Role.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.system; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import lombok.Data; 5 | import org.hibernate.annotations.Table; 6 | import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.EntityListeners; 11 | 12 | /** 13 | * Created on 2018/4/2 0002. 14 | * 15 | * @author enilu 16 | */ 17 | @Entity(name="t_sys_role") 18 | @Table(appliesTo = "t_sys_role",comment = "角色") 19 | @Data 20 | @EntityListeners(AuditingEntityListener.class) 21 | public class Role extends BaseEntity { 22 | @Column 23 | private Integer num; 24 | @Column 25 | private Long pid; 26 | @Column 27 | private String name; 28 | @Column 29 | private Long deptid; 30 | @Column 31 | private String tips; 32 | @Column 33 | private Integer version; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/test/Boy.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.test; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.BaseEntity; 5 | import lombok.Data; 6 | import org.hibernate.annotations.Table; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | 11 | /** 12 | * 该实体用于测试生成代码 13 | */ 14 | @Entity(name="t_test_boy") 15 | @Table(appliesTo = "t_test_boy",comment = "男孩") 16 | @Data 17 | 18 | public class Boy extends BaseEntity { 19 | @Column(columnDefinition = "VARCHAR(32) COMMENT '姓名'") 20 | private String name; 21 | @Column(columnDefinition = "INT COMMENT '年龄'") 22 | private Integer age; 23 | @Column(columnDefinition = "VARCHAR(12) COMMENT '生日'") 24 | private String birthday; 25 | @Column(name = "has_girl_friend",columnDefinition = "TINYINT COMMENT '是否有女朋友'") 26 | private Boolean hasGirFriend; 27 | } 28 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/entity/test/Girl.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.entity.test; 2 | 3 | import cn.enilu.guns.bean.entity.BaseEntity; 4 | import org.hibernate.annotations.Table; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import java.util.Date; 9 | /** 10 | * 该实体用于测试生成代码 11 | */ 12 | @Entity(name="t_test_girl") 13 | @Table(appliesTo = "t_test_girl",comment = "女孩") 14 | public class Girl extends BaseEntity { 15 | @Column(columnDefinition = "VARCHAR(32) COMMENT '姓名'") 16 | private String name; 17 | @Column(columnDefinition = "INT COMMENT '年龄'") 18 | private Integer age; 19 | @Column(columnDefinition = "DATE COMMENT '生日'") 20 | private Date birthday; 21 | @Column(name = "has_boy_friend",columnDefinition = "TINYINT COMMENT '是否由男朋友'") 22 | private Boolean hasBoyFriend; 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/enumeration/ConfigKeyEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.enumeration; 2 | 3 | public enum ConfigKeyEnum { 4 | 5 | SYSTEM_FILE_UPLOAD_PATH("system.file.upload.path"), 6 | SYSTEM_APP_NAME("system.app.name"), 7 | /** 8 | * 腾讯sms接口appid 9 | */ 10 | API_TENCENT_SMS_APPID("api.tencent.sms.appid"), 11 | /** 12 | * 腾讯sms接口appkey 13 | */ 14 | API_TENCENT_SMS_APPKEY("api.tencent.sms.appkey"), 15 | /** 16 | * 腾讯sms接口签名参数 17 | */ 18 | API_TENCENT_SMS_SIGN("api.tencent.sms.sign"); 19 | private String value; 20 | 21 | ConfigKeyEnum(String value) { 22 | this.value = value; 23 | } 24 | 25 | public String getValue() { 26 | return value; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/enumeration/ProjectEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.enumeration; 2 | 3 | /** 4 | * Created by deanyule on 17/8/16. 5 | */ 6 | public enum ProjectEnum { 7 | 8 | SCORE_CARD("ScoreCard"), 9 | DOLPHIN_PROD("dolphin"), 10 | SNOW_PRODUCT("PRJ_SNOW_PRODUCT"); 11 | 12 | private String value; 13 | 14 | ProjectEnum(String value) { 15 | this.value = value; 16 | } 17 | 18 | public String getValue() { 19 | return value; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/enumeration/RedisQueueName.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.enumeration; 2 | 3 | /** 4 | * redis队列名称 5 | * Created by zt on 2017/8/25 0015. 6 | */ 7 | public enum RedisQueueName { 8 | CREDIT_LIMIT("credit_limit"),COLLECTION_TAG("collection_tag"); 9 | 10 | private String value; 11 | 12 | public String getValue() { 13 | return value; 14 | } 15 | 16 | public void setValue(String value) { 17 | this.value = value; 18 | } 19 | 20 | RedisQueueName(String value) { 21 | this.value = value; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/enumeration/cms/BannerTypeEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.enumeration.cms; 2 | 3 | public enum BannerTypeEnum { 4 | 5 | INDEX("index"), 6 | NEWS("news"), 7 | CASE ("case"), 8 | PRODUCT("product"), 9 | SOLUTION("solution"); 10 | 11 | private String value; 12 | 13 | BannerTypeEnum(String value) { 14 | this.value = value; 15 | } 16 | 17 | public String getValue() { 18 | return value; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/enumeration/cms/ChannelEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.enumeration.cms; 2 | 3 | public enum ChannelEnum { 4 | 5 | NEWS(1L,"news"), 6 | PRODUCT(2L,"product"), 7 | SOLUTION(3L,"solution"), 8 | CASE(4L,"case"); 9 | 10 | 11 | private String value; 12 | private Long id; 13 | ChannelEnum(Long id,String value) { 14 | this.id = id; 15 | this.value = value; 16 | } 17 | 18 | public String getValue() { 19 | return value; 20 | } 21 | public Long getId(){ 22 | return id; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/GunsException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | /** 4 | * 封装guns的异常 5 | * 6 | * @author fengshuonan 7 | * @Date 2017/12/28 下午10:32 8 | */ 9 | public class GunsException extends RuntimeException { 10 | 11 | private Integer code; 12 | 13 | private String message; 14 | 15 | public GunsException(ServiceExceptionEnum serviceExceptionEnum) { 16 | this.code = serviceExceptionEnum.getCode(); 17 | this.message = serviceExceptionEnum.getMessage(); 18 | } 19 | 20 | public Integer getCode() { 21 | return code; 22 | } 23 | 24 | public void setCode(Integer code) { 25 | this.code = code; 26 | } 27 | 28 | @Override 29 | public String getMessage() { 30 | return message; 31 | } 32 | 33 | public void setMessage(String message) { 34 | this.message = message; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/GunsExceptionEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | /** 4 | * Guns异常枚举 5 | * 6 | * @author fengshuonan 7 | * @Date 2017/12/28 下午10:33 8 | */ 9 | public enum GunsExceptionEnum implements ServiceExceptionEnum{ 10 | 11 | /** 12 | * 其他 13 | */ 14 | WRITE_ERROR(500,"渲染界面错误"), 15 | 16 | /** 17 | * 文件上传 18 | */ 19 | FILE_READING_ERROR(400,"FILE_READING_ERROR!"), 20 | FILE_NOT_FOUND(400,"FILE_NOT_FOUND!"), 21 | 22 | /** 23 | * 错误的请求 24 | */ 25 | REQUEST_NULL(400, "请求有错误"), 26 | NOT_ALLOW(400, "不允许该操作"), 27 | SERVER_ERROR(500, "服务器异常"), 28 | 29 | TASK_CONFIG_ERROR(500, "定时任务配置错误"); 30 | 31 | GunsExceptionEnum(int code, String message) { 32 | this.code = code; 33 | this.message = message; 34 | } 35 | 36 | private Integer code; 37 | 38 | private String message; 39 | 40 | @Override 41 | public Integer getCode() { 42 | return code; 43 | } 44 | 45 | public void setCode(Integer code) { 46 | this.code = code; 47 | } 48 | 49 | @Override 50 | public String getMessage() { 51 | return message; 52 | } 53 | 54 | public void setMessage(String message) { 55 | this.message = message; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/InvalidKaptchaException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | /** 4 | * 验证码错误异常 5 | * 6 | * @author fengshuonan 7 | * @date 2017-05-05 23:52 8 | */ 9 | public class InvalidKaptchaException extends RuntimeException { 10 | } 11 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/MailException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | public class MailException extends Exception { 4 | 5 | public MailException(String msg) { 6 | super(msg); 7 | } 8 | 9 | public MailException(String msg, Throwable e) { 10 | super(msg, e); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/ParamException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | public class ParamException extends Exception { 4 | 5 | public ParamException(String msg) { 6 | super(msg); 7 | } 8 | 9 | public ParamException(String msg, Throwable e) { 10 | super(msg, e); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/ServiceExceptionEnum.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | /** 4 | * 抽象接口 5 | * 6 | * @author fengshuonan 7 | * @date 2017-12-28-下午10:27 8 | */ 9 | public interface ServiceExceptionEnum { 10 | 11 | /** 12 | * 获取异常编码 13 | */ 14 | Integer getCode(); 15 | 16 | /** 17 | * 获取异常信息 18 | */ 19 | String getMessage(); 20 | } 21 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/SlConnectException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | import java.util.List; 4 | 5 | public class SlConnectException extends Exception { 6 | 7 | private static final long serialVersionUID = 1L; 8 | 9 | private String errorCode; 10 | private List details; 11 | 12 | public SlConnectException(String errorCode, String errorMessage) { 13 | super(errorMessage); 14 | this.errorCode = errorCode; 15 | } 16 | 17 | public String getErrorCode() { 18 | return errorCode; 19 | } 20 | 21 | public List getDetails() { 22 | return details; 23 | } 24 | 25 | public void setDetails(List details) { 26 | this.details = details; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/SlEvalException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | import java.util.List; 4 | 5 | public class SlEvalException extends Exception { 6 | 7 | private static final long serialVersionUID = 1L; 8 | 9 | private String errorCode; 10 | private List details; 11 | 12 | public SlEvalException(String errorCode, String errorMessage) { 13 | super(errorMessage); 14 | this.errorCode = errorCode; 15 | } 16 | 17 | public String getErrorCode() { 18 | return errorCode; 19 | } 20 | 21 | public List getDetails() { 22 | return details; 23 | } 24 | 25 | public void setDetails(List details) { 26 | this.details = details; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/ValidException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | public class ValidException extends RuntimeException { 4 | 5 | public ValidException(String msg) { 6 | super(msg); 7 | } 8 | 9 | public ValidException(String msg, Throwable e) { 10 | super(msg, e); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/XSException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | /** 4 | * 定义通用异常 5 | * code 存储异常代码 6 | * @author czhou 7 | */ 8 | public class XSException extends Exception { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private String code; 13 | 14 | public String getCode() { 15 | return this.code; 16 | } 17 | 18 | public XSException(String code, String message, Throwable t) { 19 | super(message, t); 20 | this.code = code; 21 | } 22 | 23 | public XSException(String code, String message) { 24 | this(code, message, null); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/exception/XSRuntimeException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.exception; 2 | 3 | @SuppressWarnings("serial") 4 | public class XSRuntimeException extends RuntimeException { 5 | 6 | public XSRuntimeException(String msg) { 7 | super(msg); 8 | } 9 | 10 | public XSRuntimeException(String msg, Throwable e) { 11 | super(msg, e); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/DictVo.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo; 2 | 3 | /** 4 | * DictVo 5 | * 6 | * @author enilu 7 | * @version 2018/8/14 0014 8 | */ 9 | public class DictVo { 10 | private String key; 11 | private String value; 12 | 13 | public String getKey() { 14 | return key; 15 | } 16 | 17 | public void setKey(String key) { 18 | this.key = key; 19 | } 20 | 21 | public String getValue() { 22 | return value; 23 | } 24 | 25 | public void setValue(String value) { 26 | this.value = value; 27 | } 28 | 29 | public DictVo() { 30 | } 31 | 32 | public DictVo(String key, String value) { 33 | this.key = key; 34 | this.value = value; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/QuartzJob.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo; 2 | 3 | import lombok.Data; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | import java.util.Map; 10 | 11 | @Data 12 | public class QuartzJob implements Serializable { 13 | private String jobId; 14 | private String jobName; 15 | private String jobGroup; 16 | private String jobClass; 17 | private String description; 18 | private String cronExpression; 19 | private boolean concurrent; 20 | private String jobStatus; 21 | private Date nextTime; 22 | private Date previousTime; 23 | private boolean disabled; 24 | private Map dataMap; 25 | } 26 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/front/Ret.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo.front; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | @Getter 7 | @Setter 8 | public class Ret { 9 | 10 | private Integer code; 11 | private String msg; 12 | private T data; 13 | private boolean success; 14 | 15 | public Ret() { 16 | 17 | } 18 | 19 | public Ret(Integer code, String msg, T data) { 20 | this.code = code; 21 | this.msg = msg; 22 | this.data = data; 23 | this.success = "0000".equals(code); 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | StringBuilder builder = new StringBuilder(); 29 | builder.append("{"); 30 | builder.append("'code':").append(code).append(","); 31 | builder.append("'msg':").append(msg).append(","); 32 | builder.append("'success':").append(success).append(","); 33 | builder.append("}"); 34 | return builder.toString(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/front/Rets.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo.front; 2 | 3 | public class Rets { 4 | 5 | public static final Integer SUCCESS = 20000; 6 | public static final Integer FAILURE = 9999; 7 | public static final Integer TOKEN_EXPIRE=50014; 8 | 9 | public static Ret success(Object data) { 10 | return new Ret(Rets.SUCCESS, "成功", data); 11 | } 12 | 13 | public static Ret failure(String msg) { 14 | return new Ret(Rets.FAILURE, msg, null); 15 | } 16 | 17 | public static Ret success() { 18 | return new Ret(Rets.SUCCESS, "成功", null); 19 | } 20 | public static Ret expire(){ 21 | return new Ret(Rets.TOKEN_EXPIRE,"token 过期",null); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/node/DeptNode.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo.node; 2 | 3 | import cn.enilu.guns.bean.entity.system.Dept; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * DeptNode 10 | * 11 | * @author enilu 12 | * @version 2018/9/15 0015 13 | */ 14 | public class DeptNode extends Dept { 15 | 16 | private List children = new ArrayList<>(10); 17 | 18 | public List getChildren() { 19 | return children; 20 | } 21 | 22 | public void setChildren(List children) { 23 | this.children = children; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/node/IsMenu.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo.node; 2 | 3 | /** 4 | * 是否是菜单的枚举 5 | * 6 | * @author fengshuonan 7 | * @date 2017年6月1日22:50:11 8 | */ 9 | public enum IsMenu { 10 | 11 | YES(1, "是"), 12 | NO(0, "不是");//不是菜单的是按钮 13 | 14 | int code; 15 | String message; 16 | 17 | IsMenu(int code, String message) { 18 | this.code = code; 19 | this.message = message; 20 | } 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(int code) { 27 | this.code = code; 28 | } 29 | 30 | public String getMessage() { 31 | return message; 32 | } 33 | 34 | public void setMessage(String message) { 35 | this.message = message; 36 | } 37 | 38 | public static String valueOf(Integer status) { 39 | if (status == null) { 40 | return ""; 41 | } else { 42 | for (IsMenu s : IsMenu.values()) { 43 | if (s.getCode() == status) { 44 | return s.getMessage(); 45 | } 46 | } 47 | return ""; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /guns-entity/src/main/java/cn/enilu/guns/bean/vo/node/Node.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.bean.vo.node; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * Node 10 | * 11 | * @author enilu 12 | * @version 2018/11/24 0024 13 | */ 14 | @Data 15 | public class Node { 16 | private Long id; 17 | private Long pid; 18 | private String name; 19 | private Boolean checked; 20 | private List children = new ArrayList<>(10); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /guns-generator/src/main/java/cn/enilu/flash/code/AbstractLoader.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.flash.code; 2 | 3 | import org.nutz.ioc.Ioc; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 基础的数据结构加载器
9 | * @author : zhangtao
10 | * 创建日期: 16-7-12
11 | */ 12 | public abstract class AbstractLoader { 13 | 14 | public abstract Map loadTables(Ioc ioc, 15 | String basePackageName, String baseUri, 16 | String servPackageName, 17 | String repositoryPackageName, 18 | String modPackageName) throws Exception; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /guns-generator/src/main/java/cn/enilu/flash/code/Loader.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.flash.code; 2 | 3 | import org.nutz.ioc.Ioc; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 基础的数据结构加载器
9 | * 作者: zhangtao
10 | * 创建日期: 16-7-12
11 | */ 12 | public abstract class Loader { 13 | 14 | public abstract Map loadTables(Ioc ioc, 15 | String basePackageName, String baseUri, 16 | String servPackageName, 17 | String repositoryPackageName, 18 | String modPackageName) throws Exception; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /guns-generator/src/main/resources/code/code.json: -------------------------------------------------------------------------------- 1 | { 2 | "codeConfig": { 3 | "type": "cn.enilu.flash.code.CodeConfig", 4 | "fields": { 5 | entityModel: "guns-entity", 6 | daoModel: "guns-dao", 7 | serviceModel: "guns-service", 8 | controllerModel: "guns-admin", 9 | viewModel: "guns-admin" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /guns-generator/src/main/resources/code/repository.vm: -------------------------------------------------------------------------------- 1 | package ${packageName}; 2 | 3 | 4 | import ${table.EntityFullClassName}; 5 | import ${table.basePackageName}.dao.BaseRepository; 6 | 7 | 8 | public interface ${table.RepositoryClassName} extends BaseRepository<${table.EntityClassName},Long>{ 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /guns-generator/src/main/resources/code/service.vm: -------------------------------------------------------------------------------- 1 | package ${packageName}; 2 | 3 | 4 | import ${table.EntityFullClassName}; 5 | import ${table.basePackageName}.${table.repoPackageName}.${table.EntityClassName}Repository; 6 | 7 | import ${table.basePackageName}.service.BaseService; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | @Service 14 | public class ${table.ServiceClassName} extends BaseService<${table.EntityClassName},Long,${table.RepositoryClassName}> { 15 | private Logger logger = LoggerFactory.getLogger(getClass()); 16 | @Autowired 17 | private ${table.RepositoryClassName} ${table.entityNameLowerFirstChar}Repository; 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /guns-generator/src/main/resources/code/view/add.html.vm: -------------------------------------------------------------------------------- 1 | @layout("/common/_container.html"){ 2 |
3 |
4 |
5 | 6 | 7 | 8 |
9 | #foreach ($column in $table.LabeledColumns) 10 |
11 | <#input id="${column.FieldName}" name="${column.label}"/> 12 |
13 | #end 14 |
15 | 16 |
17 |
18 | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="${table.entityClassName}InfoDlg.addSubmit()"/> 19 | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="${table.entityClassName}InfoDlg.close()"/> 20 |
21 |
22 |
23 | 24 |
25 |
26 | 27 | @} 28 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/platform/log/LogManager.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.platform.log; 2 | 3 | import java.util.TimerTask; 4 | import java.util.concurrent.ScheduledThreadPoolExecutor; 5 | import java.util.concurrent.TimeUnit; 6 | 7 | /** 8 | * 日志管理器 9 | * 10 | * @author fengshuonan 11 | * @date 2017-03-30 16:29 12 | */ 13 | public class LogManager { 14 | 15 | //日志记录操作延时 16 | private final int OPERATE_DELAY_TIME = 10; 17 | 18 | //异步操作记录日志的线程池 19 | private ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10); 20 | 21 | private LogManager() { 22 | } 23 | 24 | public static LogManager logManager = new LogManager(); 25 | 26 | public static LogManager me() { 27 | return logManager; 28 | } 29 | 30 | public void executeLog(TimerTask task) { 31 | executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/platform/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * package-info 3 | * 4 | * @version 2018/9/11 0011 5 | * @author enilu 6 | */ 7 | package cn.enilu.guns.platform; -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/CrudService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | /** 4 | * 5 | * @author :enilu 6 | * @date :Created in 2019/6/29 22:31 7 | */ 8 | public interface CrudService extends 9 | InsertService, 10 | UpdateService, 11 | DeleteService, 12 | SelectService { 13 | } 14 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/DeleteService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | /** 4 | * 5 | * @author :enilu 6 | * @date :Created in 2019/6/29 22:29 7 | */ 8 | public interface DeleteService { 9 | 10 | /** 11 | * 根据主键删除记录 12 | * 13 | * @param id 主键 14 | */ 15 | void delete(ID id); 16 | 17 | /** 18 | * 根据主键删除记录 19 | * 20 | * @param ids 主键集合 21 | */ 22 | void delete(Iterable ids); 23 | 24 | /** 25 | * 清空表数据 26 | */ 27 | void clear(); 28 | } 29 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/InsertService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | /** 4 | * 5 | * @author :enilu 6 | * @date :Created in 2019/6/29 22:28 7 | */ 8 | public interface InsertService { 9 | 10 | /** 11 | * 添加一条数据 12 | * 13 | * @param record 要添加的数据 14 | * @return 添加后生成的主键 15 | */ 16 | T insert(T record); 17 | } 18 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/UpdateService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | /** 4 | * 5 | * @author :enilu 6 | * @date :Created in 2019/6/29 22:30 7 | */ 8 | public interface UpdateService { 9 | /** 10 | * 修改记录信息 11 | * 12 | * @param record 要修改的对象 13 | * @return 返回修改的记录 14 | */ 15 | T update(T record); 16 | } 17 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/message/MessagetemplateService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.message; 2 | 3 | import cn.enilu.guns.bean.entity.message.MessageTemplate; 4 | import cn.enilu.guns.dao.message.MessagetemplateRepository; 5 | import cn.enilu.guns.service.BaseService; 6 | import org.springframework.stereotype.Service; 7 | 8 | /** 9 | * MessagetemplateService 10 | * 11 | * @author enilu 12 | * @version 2019/05/17 0017 13 | */ 14 | @Service 15 | public class MessagetemplateService extends BaseService { 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/message/email/EmailSender.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.message.email; 2 | 3 | import org.springframework.core.io.InputStreamSource; 4 | 5 | /** 6 | * 邮件发送接口 7 | * 8 | * @author :enilu 9 | * @date :Created in 2019/6/17 19:33 10 | */ 11 | public interface EmailSender { 12 | /** 13 | * 发送邮件 14 | * @param from 15 | * @param to 16 | * @param cc 17 | * @param title 18 | * @param content 19 | * @return 20 | */ 21 | boolean sendEmail(String from, String to, String cc, String title, String content); 22 | 23 | /** 24 | * 发送带附件的邮件 25 | * @param from 26 | * @param to 27 | * @param cc 28 | * @param title 29 | * @param content 30 | * @param attachmentFilename 31 | * @param inputStreamSource 32 | * @return 33 | */ 34 | boolean sendEmail(String from, String to, String cc, String title, String content, String attachmentFilename, InputStreamSource inputStreamSource); 35 | } 36 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/message/sms/SmsSender.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.message.sms; 2 | 3 | public interface SmsSender { 4 | 5 | /** 6 | * 发送短信,如果内容content不为空,则直接发送内容 7 | * @param tplCode 短信运营商模板号码 8 | * @param receiver 9 | * @param args 10 | * @param content 11 | * @return 12 | */ 13 | boolean sendSms(String tplCode, String receiver, String[] args, String content); 14 | } 15 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/system/LogObjectHolder.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.system; 2 | 3 | import cn.enilu.guns.bean.vo.SpringContextHolder; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.context.WebApplicationContext; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 被修改的bean临时存放的地方 12 | * 13 | * @author fengshuonan 14 | * @date 2017-03-31 11:19 15 | */ 16 | @Component 17 | @Scope(scopeName = WebApplicationContext.SCOPE_SESSION) 18 | public class LogObjectHolder implements Serializable{ 19 | 20 | private Object object = null; 21 | 22 | public void set(Object obj) { 23 | this.object = obj; 24 | } 25 | 26 | public Object get() { 27 | return object; 28 | } 29 | 30 | public static LogObjectHolder me(){ 31 | LogObjectHolder bean = SpringContextHolder.getBean(LogObjectHolder.class); 32 | return bean; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/system/LoginLogService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.system; 2 | 3 | 4 | import cn.enilu.guns.bean.entity.system.LoginLog; 5 | import cn.enilu.guns.dao.system.LoginLogRepository; 6 | import cn.enilu.guns.service.BaseService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Created on 2018/3/26 0026. 11 | * 12 | * @author enilu 13 | */ 14 | @Service 15 | public class LoginLogService extends BaseService { 16 | } 17 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/system/NoticeService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.Notice; 4 | import cn.enilu.guns.dao.system.SysNoticeRepository; 5 | import cn.enilu.guns.service.BaseService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author :enilu 13 | * @date :Created in 2019/7/21 21:29 14 | */ 15 | @Service 16 | public class NoticeService extends BaseService { 17 | @Autowired 18 | private SysNoticeRepository sysNoticeRepository; 19 | public List findByTitleLike(String title) { 20 | return sysNoticeRepository.findByTitleLike(title); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/system/OperationLogService.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.system; 2 | 3 | import cn.enilu.guns.bean.entity.system.OperationLog; 4 | import cn.enilu.guns.dao.system.OperationLogRepository; 5 | import cn.enilu.guns.service.BaseService; 6 | import org.springframework.stereotype.Service; 7 | 8 | /** 9 | * Created on 2018/3/26 0026. 10 | * 11 | * @author enilu 12 | */ 13 | @Service 14 | public class OperationLogService extends BaseService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/task/BaseJob.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.task; 2 | 3 | import cn.enilu.guns.bean.vo.QuartzJob; 4 | import org.quartz.Job; 5 | import org.quartz.JobDataMap; 6 | import org.quartz.JobExecutionContext; 7 | import org.quartz.JobExecutionException; 8 | import org.springframework.stereotype.Component; 9 | 10 | @Component 11 | public class BaseJob implements Job { 12 | 13 | @Override 14 | public void execute(JobExecutionContext context) throws JobExecutionException { 15 | JobDataMap data = context.getJobDetail().getJobDataMap(); 16 | QuartzJob job = (QuartzJob) data.get("job"); 17 | try { 18 | TaskUtils.executeJob(job); 19 | } catch (Exception e) { 20 | throw new JobExecutionException(e); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/task/NoConurrentBaseJob.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.task; 2 | 3 | import org.quartz.DisallowConcurrentExecution; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component 7 | @DisallowConcurrentExecution 8 | public class NoConurrentBaseJob extends BaseJob { 9 | } 10 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/task/QuartzConfigration.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.task; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.scheduling.quartz.SchedulerFactoryBean; 6 | 7 | @Configuration 8 | public class QuartzConfigration { 9 | 10 | @Bean(name = "scheduler") 11 | public SchedulerFactoryBean schedulerFactory() { 12 | SchedulerFactoryBean bean = new SchedulerFactoryBean(); 13 | return bean; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/service/task/job/HelloJob.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.task.job; 2 | 3 | import cn.enilu.guns.bean.entity.system.Cfg; 4 | import cn.enilu.guns.service.system.CfgService; 5 | import cn.enilu.guns.service.task.JobExecuter; 6 | import cn.enilu.guns.utils.DateUtil; 7 | import com.alibaba.fastjson.JSON; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.util.Map; 14 | 15 | /** 16 | * HelloJob 17 | * 18 | * @author zt 19 | * @version 2018/12/30 0030 20 | */ 21 | @Component 22 | public class HelloJob extends JobExecuter { 23 | private Logger logger = LoggerFactory.getLogger(getClass()); 24 | @Autowired 25 | private CfgService cfgService; 26 | @Override 27 | public void execute(Map dataMap) throws Exception { 28 | Cfg cfg = cfgService.get(1L); 29 | cfg.setCfgDesc("update by "+ DateUtil.getTime()); 30 | cfgService.update(cfg); 31 | logger.info("hello :"+JSON.toJSONString(dataMap)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/shiro/check/ICheck.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.enilu.guns.shiro.check; 17 | 18 | 19 | /** 20 | * 检查用接口 21 | */ 22 | public interface ICheck { 23 | 24 | /** 25 | * 检查指定角色 26 | * @param permissions 27 | * @return boolean 28 | */ 29 | boolean check(Object[] permissions); 30 | 31 | /** 32 | * 检查全体角色 33 | * @return boolean 34 | */ 35 | boolean checkAll(); 36 | } 37 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/shiro/factory/IShiro.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.shiro.factory; 2 | 3 | import cn.enilu.guns.bean.core.ShiroUser; 4 | import cn.enilu.guns.bean.entity.system.User; 5 | import org.apache.shiro.authc.SimpleAuthenticationInfo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 定义shirorealm所需数据的接口 11 | * 12 | * @author fengshuonan 13 | * @date 2016年12月5日 上午10:23:34 14 | */ 15 | public interface IShiro { 16 | 17 | /** 18 | * 根据账号获取登录用户 19 | * 20 | * @param account 账号 21 | */ 22 | User user(String account); 23 | 24 | /** 25 | * 根据系统用户获取Shiro的用户 26 | * 27 | * @param user 系统用户 28 | */ 29 | ShiroUser shiroUser(User user); 30 | 31 | /** 32 | * 获取权限列表通过角色id 33 | * 34 | * @param roleId 角色id 35 | */ 36 | List findPermissionsByRoleId(Integer roleId); 37 | 38 | /** 39 | * 根据角色id获取角色名称 40 | * 41 | * @param roleId 角色id 42 | */ 43 | String findRoleNameByRoleId(Long roleId); 44 | 45 | /** 46 | * 获取shiro的认证信息 47 | */ 48 | SimpleAuthenticationInfo info(ShiroUser shiroUser, User user, String realmName); 49 | 50 | } 51 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/BaseControllerWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * 控制器查询结果的包装类基类 8 | * 9 | * @author fengshuonan 10 | * @date 2017年2月13日 下午10:49:36 11 | */ 12 | public abstract class BaseControllerWarpper { 13 | 14 | public Object obj = null; 15 | public BaseControllerWarpper(Object obj) { 16 | this.obj = obj; 17 | } 18 | 19 | @SuppressWarnings("unchecked") 20 | public Object warp() { 21 | 22 | if (this.obj instanceof List) { 23 | List> list = (List>) this.obj; 24 | for (Map map : list) { 25 | warpTheMap(map); 26 | } 27 | return list; 28 | } else if (this.obj instanceof Map) { 29 | Map map = (Map) this.obj; 30 | warpTheMap(map); 31 | return map; 32 | } else { 33 | return this.obj; 34 | } 35 | } 36 | 37 | protected abstract void warpTheMap(Map map); 38 | } 39 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/DeptWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.service.system.impl.ConstantFactory; 4 | import cn.enilu.guns.utils.ToolUtil; 5 | 6 | import java.util.Map; 7 | 8 | /** 9 | * 部门列表的包装 10 | * 11 | * @author fengshuonan 12 | * @date 2017年4月25日 18:10:31 13 | */ 14 | public class DeptWarpper extends BaseControllerWarpper { 15 | 16 | public DeptWarpper(Object list) { 17 | super(list); 18 | } 19 | 20 | @Override 21 | public void warpTheMap(Map map) { 22 | 23 | Long pid = (Long) map.get("pid"); 24 | 25 | if (ToolUtil.isEmpty(pid) || pid.intValue() == 0) { 26 | map.put("pName", "--"); 27 | } else { 28 | map.put("pName", ConstantFactory.me().getDeptName(pid)); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/DictWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.bean.entity.system.Dict; 4 | import cn.enilu.guns.service.system.impl.ConstantFactory; 5 | import cn.enilu.guns.utils.ToolUtil; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * 字典列表的包装 12 | * 13 | * @author fengshuonan 14 | * @date 2017年4月25日 18:10:31 15 | */ 16 | public class DictWarpper extends BaseControllerWarpper { 17 | 18 | public DictWarpper(Object list) { 19 | super(list); 20 | } 21 | 22 | @Override 23 | public void warpTheMap(Map map) { 24 | StringBuffer detail = new StringBuffer(); 25 | Long id = (Long) map.get("id"); 26 | List dicts = ConstantFactory.me().findInDict(id); 27 | if(dicts != null){ 28 | for (Dict dict : dicts) { 29 | detail.append(dict.getValue() + ":" +dict.getName() + ","); 30 | } 31 | map.put("detail", ToolUtil.removeSuffix(detail.toString(),",")); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/MenuWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.bean.vo.node.IsMenu; 4 | import cn.enilu.guns.service.system.impl.ConstantFactory; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 菜单列表的包装类 11 | * 12 | * @author fengshuonan 13 | * @date 2017年2月19日15:07:29 14 | */ 15 | public class MenuWarpper extends BaseControllerWarpper { 16 | 17 | public MenuWarpper(List> list) { 18 | super(list); 19 | } 20 | 21 | @Override 22 | public void warpTheMap(Map map) { 23 | map.put("statusName", ConstantFactory.me().getMenuStatusName((Integer) map.get("status"))); 24 | map.put("isMenuName", IsMenu.valueOf((Integer) map.get("ismenu"))); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/NoticeWrapper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.service.system.impl.ConstantFactory; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 部门列表的包装 9 | * 10 | * @author fengshuonan 11 | * @date 2017年4月25日 18:10:31 12 | */ 13 | public class NoticeWrapper extends BaseControllerWarpper { 14 | 15 | public NoticeWrapper(Object list) { 16 | super(list); 17 | } 18 | 19 | @Override 20 | public void warpTheMap(Map map) { 21 | Long creater = (Long) map.get("createBy"); 22 | map.put("createrName", ConstantFactory.me().getUserNameById(creater)); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/RoleWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.service.system.impl.ConstantFactory; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 角色列表的包装类 10 | * 11 | * @author fengshuonan 12 | * @date 2017年2月19日10:59:02 13 | */ 14 | public class RoleWarpper extends BaseControllerWarpper { 15 | 16 | public RoleWarpper(List> list) { 17 | super(list); 18 | } 19 | 20 | @Override 21 | public void warpTheMap(Map map) { 22 | map.put("pName", ConstantFactory.me().getSingleRoleName((Long) map.get("pid"))); 23 | map.put("deptName", ConstantFactory.me().getDeptName((Long) map.get("deptid"))); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/warpper/UserWarpper.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.warpper; 2 | 3 | import cn.enilu.guns.service.system.impl.ConstantFactory; 4 | import cn.enilu.guns.utils.StringUtils; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 用户管理的包装类 11 | * 12 | * @author fengshuonan 13 | * @date 2017年2月13日 下午10:47:03 14 | */ 15 | public class UserWarpper extends BaseControllerWarpper { 16 | 17 | public UserWarpper(List> list) { 18 | super(list); 19 | } 20 | 21 | @Override 22 | public void warpTheMap(Map map) { 23 | map.put("sexName", ConstantFactory.me().getSexName((Integer) map.get("sex"))); 24 | if(StringUtils.isNotNullOrEmpty(map.get("roleid"))) { 25 | map.put("roleName", ConstantFactory.me().getRoleName((String) map.get("roleid"))); 26 | } 27 | if(StringUtils.isNotNullOrEmpty(map.get("deptid"))) { 28 | map.put("deptName", ConstantFactory.me().getDeptName((Long) map.get("deptid"))); 29 | } 30 | map.put("statusName", ConstantFactory.me().getStatusName((Integer) map.get("status"))); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /guns-service/src/main/java/cn/enilu/guns/web/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * package-info 3 | * 4 | * @version 2018/11/27 0027 5 | * @author enilu 6 | */ 7 | package cn.enilu.guns.web; -------------------------------------------------------------------------------- /guns-service/src/test/java/cn/enilu/guns/service/BaseApplicationStartTest.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.context.annotation.ComponentScan; 9 | import org.springframework.test.context.TestPropertySource; 10 | import org.springframework.test.context.junit4.SpringRunner; 11 | 12 | /** 13 | * Name: ApplicationStartTest
14 | * User: Yao
15 | * Date: 2018/1/24
16 | * Time: 16:26
17 | */ 18 | @RunWith(SpringRunner.class) 19 | @SpringBootTest(classes = ServiceConfiguration.class) 20 | @AutoConfigureTestDatabase(replace= AutoConfigureTestDatabase.Replace.NONE) 21 | @ComponentScan(basePackages = "cn.enilu.guns") 22 | @TestPropertySource(locations = {"classpath:application-test.properties"}) 23 | public class BaseApplicationStartTest { 24 | protected final Logger log= LoggerFactory.getLogger(getClass()); 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /guns-service/src/test/java/cn/enilu/guns/service/ServiceConfiguration.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | 5 | /** 6 | * Name: DabConfiguration
7 | * User: Yao
8 | * Date: 2018/2/27
9 | * Time: 13:54
10 | */ 11 | @Configuration 12 | public class ServiceConfiguration { 13 | } 14 | -------------------------------------------------------------------------------- /guns-service/src/test/java/cn/enilu/guns/service/system/DeptServiceTest.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.service.system; 2 | 3 | import cn.enilu.guns.service.BaseApplicationStartTest; 4 | import com.alibaba.fastjson.JSON; 5 | import org.junit.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | 8 | /** 9 | * Created on 2018/4/5 0005. 10 | * 11 | * @author enilu 12 | */ 13 | public class DeptServiceTest extends BaseApplicationStartTest { 14 | @Autowired 15 | private DeptService deptService; 16 | @Test 17 | public void tree() throws Exception { 18 | System.out.println(JSON.toJSON(deptService.tree())); 19 | } 20 | 21 | @Test 22 | public void list() throws Exception { 23 | 24 | } 25 | 26 | @Test 27 | public void deleteDept() throws Exception { 28 | 29 | } 30 | } -------------------------------------------------------------------------------- /guns-service/src/test/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | debug=true 2 | #Mysql属性配置文件,Spring-boot系统配置 3 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver 4 | spring.datasource.url=jdbc:mysql://localhost:3306/guns-lite 5 | spring.datasource.username=root 6 | spring.datasource.password=root 7 | #配置自动建表:update:没有表新建,有表更新操作,控制台显示建表语句 8 | spring.jpa.show-sql=true 9 | spring.datasource.db-name=guns-lite 10 | -------------------------------------------------------------------------------- /guns-utils/src/main/java/cn/enilu/guns/utils/Log.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.utils; 2 | 3 | 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | /** 8 | * @author deanyule 9 | */ 10 | public class Log { 11 | 12 | public static Logger get(Class clazz) { 13 | return LoggerFactory.getLogger(clazz); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /guns-utils/src/main/java/cn/enilu/guns/utils/Maps.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.utils; 2 | 3 | 4 | import java.util.HashMap; 5 | 6 | /** 7 | * Map 工具类 8 | * 9 | * @author enilu 10 | * 11 | */ 12 | public final class Maps { 13 | 14 | private Maps() { 15 | } 16 | 17 | public static HashMap newHashMap() { 18 | return new HashMap(); 19 | } 20 | 21 | public static HashMap newHashMap(K k, V v) { 22 | HashMap map = new HashMap(); 23 | map.put(k, v); 24 | return map; 25 | } 26 | 27 | @SuppressWarnings("unchecked") 28 | public static HashMap newHashMap(K k, V v, 29 | Object... extraKeyValues) { 30 | if (extraKeyValues.length % 2 != 0) { 31 | throw new IllegalArgumentException(); 32 | } 33 | HashMap map = new HashMap(); 34 | map.put(k, v); 35 | for (int i = 0; i < extraKeyValues.length; i += 2) { 36 | k = (K) extraKeyValues[i]; 37 | v = (V) extraKeyValues[i + 1]; 38 | map.put(k, v); 39 | } 40 | return map; 41 | } 42 | } -------------------------------------------------------------------------------- /guns-utils/src/main/java/cn/enilu/guns/utils/cache/exception/ToolBoxException.java: -------------------------------------------------------------------------------- 1 | package cn.enilu.guns.utils.cache.exception; 2 | 3 | 4 | import cn.enilu.guns.utils.StrKit; 5 | 6 | /** 7 | * 工具类初始化异常 8 | */ 9 | public class ToolBoxException extends RuntimeException{ 10 | private static final long serialVersionUID = 8247610319171014183L; 11 | 12 | public ToolBoxException(Throwable e) { 13 | super(e.getMessage(), e); 14 | } 15 | 16 | public ToolBoxException(String message) { 17 | super(message); 18 | } 19 | 20 | public ToolBoxException(String messageTemplate, Object... params) { 21 | super(StrKit.format(messageTemplate, params)); 22 | } 23 | 24 | public ToolBoxException(String message, Throwable throwable) { 25 | super(message, throwable); 26 | } 27 | 28 | public ToolBoxException(Throwable throwable, String messageTemplate, Object... params) { 29 | super(StrKit.format(messageTemplate, params), throwable); 30 | } 31 | } 32 | --------------------------------------------------------------------------------