├── .gitignore ├── src ├── main │ ├── resources │ │ ├── static │ │ │ ├── css │ │ │ │ ├── images │ │ │ │ │ ├── 403.png │ │ │ │ │ ├── 404.png │ │ │ │ │ ├── 500.png │ │ │ │ │ └── bg.jpg │ │ │ │ ├── 403.css │ │ │ │ ├── 404.css │ │ │ │ ├── 500.css │ │ │ │ ├── custom.form.css │ │ │ │ ├── login.css │ │ │ │ ├── login2.css │ │ │ │ ├── home.css │ │ │ │ └── build.css │ │ │ ├── layui │ │ │ │ ├── font │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ ├── iconfont.woff │ │ │ │ │ └── iconfont.woff2 │ │ │ │ ├── images │ │ │ │ │ └── face │ │ │ │ │ │ ├── 0.gif │ │ │ │ │ │ ├── 1.gif │ │ │ │ │ │ ├── 2.gif │ │ │ │ │ │ ├── 3.gif │ │ │ │ │ │ ├── 4.gif │ │ │ │ │ │ ├── 5.gif │ │ │ │ │ │ ├── 6.gif │ │ │ │ │ │ ├── 7.gif │ │ │ │ │ │ ├── 8.gif │ │ │ │ │ │ ├── 9.gif │ │ │ │ │ │ ├── 10.gif │ │ │ │ │ │ ├── 11.gif │ │ │ │ │ │ ├── 12.gif │ │ │ │ │ │ ├── 13.gif │ │ │ │ │ │ ├── 14.gif │ │ │ │ │ │ ├── 15.gif │ │ │ │ │ │ ├── 16.gif │ │ │ │ │ │ ├── 17.gif │ │ │ │ │ │ ├── 18.gif │ │ │ │ │ │ ├── 19.gif │ │ │ │ │ │ ├── 20.gif │ │ │ │ │ │ ├── 21.gif │ │ │ │ │ │ ├── 22.gif │ │ │ │ │ │ ├── 23.gif │ │ │ │ │ │ ├── 24.gif │ │ │ │ │ │ ├── 25.gif │ │ │ │ │ │ ├── 26.gif │ │ │ │ │ │ ├── 27.gif │ │ │ │ │ │ ├── 28.gif │ │ │ │ │ │ ├── 29.gif │ │ │ │ │ │ ├── 30.gif │ │ │ │ │ │ ├── 31.gif │ │ │ │ │ │ ├── 32.gif │ │ │ │ │ │ ├── 33.gif │ │ │ │ │ │ ├── 34.gif │ │ │ │ │ │ ├── 35.gif │ │ │ │ │ │ ├── 36.gif │ │ │ │ │ │ ├── 37.gif │ │ │ │ │ │ ├── 38.gif │ │ │ │ │ │ ├── 39.gif │ │ │ │ │ │ ├── 40.gif │ │ │ │ │ │ ├── 41.gif │ │ │ │ │ │ ├── 42.gif │ │ │ │ │ │ ├── 43.gif │ │ │ │ │ │ ├── 44.gif │ │ │ │ │ │ ├── 45.gif │ │ │ │ │ │ ├── 46.gif │ │ │ │ │ │ ├── 47.gif │ │ │ │ │ │ ├── 48.gif │ │ │ │ │ │ ├── 49.gif │ │ │ │ │ │ ├── 50.gif │ │ │ │ │ │ ├── 51.gif │ │ │ │ │ │ ├── 52.gif │ │ │ │ │ │ ├── 53.gif │ │ │ │ │ │ ├── 54.gif │ │ │ │ │ │ ├── 55.gif │ │ │ │ │ │ ├── 56.gif │ │ │ │ │ │ ├── 57.gif │ │ │ │ │ │ ├── 58.gif │ │ │ │ │ │ ├── 59.gif │ │ │ │ │ │ ├── 60.gif │ │ │ │ │ │ ├── 61.gif │ │ │ │ │ │ ├── 62.gif │ │ │ │ │ │ ├── 63.gif │ │ │ │ │ │ ├── 64.gif │ │ │ │ │ │ ├── 65.gif │ │ │ │ │ │ ├── 66.gif │ │ │ │ │ │ ├── 67.gif │ │ │ │ │ │ ├── 68.gif │ │ │ │ │ │ ├── 69.gif │ │ │ │ │ │ ├── 70.gif │ │ │ │ │ │ └── 71.gif │ │ │ │ ├── css │ │ │ │ │ └── modules │ │ │ │ │ │ ├── layer │ │ │ │ │ │ └── default │ │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ │ └── code.css │ │ │ │ └── lay │ │ │ │ │ └── modules │ │ │ │ │ ├── code.js │ │ │ │ │ ├── laytpl.js │ │ │ │ │ ├── flow.js │ │ │ │ │ └── rate.js │ │ │ └── layui-ext │ │ │ │ ├── tinymce │ │ │ │ └── tinymce │ │ │ │ │ ├── langs │ │ │ │ │ └── readme.md │ │ │ │ │ ├── skins │ │ │ │ │ ├── ui │ │ │ │ │ │ ├── oxide │ │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ │ │ └── tinymce-mobile.woff │ │ │ │ │ │ │ └── content.mobile.min.css │ │ │ │ │ │ └── oxide-dark │ │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ │ └── tinymce-mobile.woff │ │ │ │ │ │ │ └── content.mobile.min.css │ │ │ │ │ └── content │ │ │ │ │ │ ├── default │ │ │ │ │ │ └── content.min.css │ │ │ │ │ │ ├── writer │ │ │ │ │ │ └── content.min.css │ │ │ │ │ │ ├── dark │ │ │ │ │ │ └── content.min.css │ │ │ │ │ │ └── document │ │ │ │ │ │ └── content.min.css │ │ │ │ │ └── plugins │ │ │ │ │ ├── textcolor │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── colorpicker │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── contextmenu │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── hr │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── print │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── code │ │ │ │ │ ├── plugin.min.js │ │ │ │ │ └── plugin.js │ │ │ │ │ ├── visualblocks │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── nonbreaking │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── pagebreak │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── save │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── noneditable │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── tabfocus │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── preview │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── autoresize │ │ │ │ │ └── plugin.min.js │ │ │ │ │ ├── autolink │ │ │ │ │ └── plugin.min.js │ │ │ │ │ └── indent2em │ │ │ │ │ ├── plugin.js │ │ │ │ │ └── plugin.min.js │ │ │ │ └── treetable-lay │ │ │ │ └── treetable.css │ │ ├── template │ │ │ ├── Service.java.vm │ │ │ ├── Dao.java.vm │ │ │ ├── Dao.xml.vm │ │ │ ├── ServiceImpl.java.vm │ │ │ ├── Entity.java.vm │ │ │ └── menu.sql.vm │ │ ├── templates │ │ │ ├── error │ │ │ │ ├── 403.html │ │ │ │ ├── 500.html │ │ │ │ └── 404.html │ │ │ ├── layout.html │ │ │ ├── about.html │ │ │ └── users │ │ │ │ └── update_password.html │ │ ├── application-test.yml │ │ ├── application-dev.yml │ │ ├── application-prod.yml │ │ ├── generator.properties │ │ ├── application.yml │ │ ├── mapper │ │ │ └── mysql │ │ │ │ └── SysGeneratorMapper.xml │ │ └── logback-spring.xml │ └── java │ │ └── com │ │ └── company │ │ └── project │ │ ├── mapper │ │ ├── SysDeptMapper.java │ │ ├── SysLogMapper.java │ │ ├── SysUserMapper.java │ │ ├── SysRoleMapper.java │ │ ├── SysDictMapper.java │ │ ├── SysUserRoleMapper.java │ │ ├── SysFilesMapper.java │ │ ├── SysPermissionMapper.java │ │ ├── SysContentMapper.java │ │ ├── SysDictDetailMapper.java │ │ ├── SysRolePermissionMapper.java │ │ ├── SysRoleDeptMapper.java │ │ └── GeneratorMapper.java │ │ ├── service │ │ ├── LogService.java │ │ ├── SysDictService.java │ │ ├── SysContentService.java │ │ ├── SysRoleDeptService.java │ │ ├── HomeService.java │ │ ├── impl │ │ │ ├── SysRoleDeptServiceImpl.java │ │ │ ├── LogServiceImpl.java │ │ │ ├── SysContentServiceImpl.java │ │ │ ├── RolePermissionServiceImpl.java │ │ │ ├── SysDictServiceImpl.java │ │ │ ├── HomeServiceImpl.java │ │ │ ├── UserRoleServiceImpl.java │ │ │ ├── SysDictDetailServiceImpl.java │ │ │ └── SysGeneratorServiceImpl.java │ │ ├── RolePermissionService.java │ │ ├── SysDictDetailService.java │ │ ├── UserRoleService.java │ │ ├── ISysGeneratorService.java │ │ ├── SysFilesService.java │ │ ├── DeptService.java │ │ ├── RoleService.java │ │ ├── UserService.java │ │ └── PermissionService.java │ │ ├── common │ │ ├── exception │ │ │ ├── code │ │ │ │ ├── ResponseCodeInterface.java │ │ │ │ └── BaseResponseCode.java │ │ │ └── BusinessException.java │ │ ├── aop │ │ │ └── annotation │ │ │ │ └── LogAnnotation.java │ │ ├── config │ │ │ ├── SaTokenConfigure.java │ │ │ ├── MyBatisPlusConfig.java │ │ │ ├── StpInterfaceImpl.java │ │ │ └── SwaggerConfiguration.java │ │ ├── utils │ │ │ ├── HttpContextUtils.java │ │ │ ├── DateUtils.java │ │ │ ├── SpringContextUtils.java │ │ │ ├── PasswordUtils.java │ │ │ ├── Constant.java │ │ │ ├── ValidatorUtils.java │ │ │ └── IPUtils.java │ │ └── filter │ │ │ └── AuthFilter.java │ │ ├── vo │ │ ├── resp │ │ │ ├── HomeRespVO.java │ │ │ ├── UserOwnRoleRespVO.java │ │ │ ├── LoginRespVO.java │ │ │ ├── UserInfoRespVO.java │ │ │ ├── DeptRespNodeVO.java │ │ │ └── PermissionRespNode.java │ │ └── req │ │ │ ├── UserRoleOperationReqVO.java │ │ │ └── RolePermissionOperationReqVO.java │ │ ├── entity │ │ ├── SysGenerator.java │ │ ├── SysUserRole.java │ │ ├── SysRolePermission.java │ │ ├── SysLog.java │ │ ├── SysRoleDeptEntity.java │ │ ├── BaseEntity.java │ │ ├── SysDictEntity.java │ │ ├── SysFilesEntity.java │ │ ├── SysDept.java │ │ ├── SysPermission.java │ │ ├── SysDictDetailEntity.java │ │ ├── SysContentEntity.java │ │ ├── SysRole.java │ │ ├── SysUser.java │ │ ├── ColumnEntity.java │ │ └── TableEntity.java │ │ ├── controller │ │ ├── UserRoleController.java │ │ ├── api │ │ │ └── TestController.java │ │ ├── SysGeneratorController.java │ │ ├── SysFilesController.java │ │ ├── SysLogController.java │ │ └── SysContentController.java │ │ └── CompanyProjectApplication.java └── test │ └── java │ └── com │ └── company │ └── project │ └── CompanyFrameApplicationTests.java ├── Dockerfile └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | .DS_Store 3 | .gitignore 4 | .idea/* 5 | .mvn/ 6 | aitangbao.iml 7 | log/ 8 | target/ 9 | -------------------------------------------------------------------------------- /src/main/resources/static/css/images/403.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/css/images/403.png -------------------------------------------------------------------------------- /src/main/resources/static/css/images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/css/images/404.png -------------------------------------------------------------------------------- /src/main/resources/static/css/images/500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/css/images/500.png -------------------------------------------------------------------------------- /src/main/resources/static/css/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/css/images/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/css/403.css: -------------------------------------------------------------------------------- 1 | #banner { 2 | background: url("images/403.png") no-repeat; 3 | background-size: 100%; 4 | overflow: hidden; 5 | } 6 | 7 | h1 { 8 | font-size: 40px; 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/404.css: -------------------------------------------------------------------------------- 1 | #banner { 2 | background: url("images/404.png") no-repeat; 3 | background-size: 100%; 4 | overflow: hidden; 5 | } 6 | 7 | h1 { 8 | font-size: 40px; 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/500.css: -------------------------------------------------------------------------------- 1 | #banner { 2 | background: url("images/500.png") no-repeat; 3 | background-size: 100%; 4 | overflow: hidden; 5 | } 6 | 7 | h1 { 8 | font-size: 40px; 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aitangbao/springboot-manager/HEAD/src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 基础镜像 2 | FROM registry.cn-hangzhou.aliyuncs.com/wb_public/openjdk:8-jre 3 | # author 4 | MAINTAINER manager 5 | # 复制jar文件到路径 6 | ADD ./target/manager.jar ./ 7 | # 时间 8 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 9 | RUN echo 'Asia/Shanghai' >/etc/timezone 10 | # 启动服务 11 | ENTRYPOINT ["java","-jar","/manager.jar"] 12 | # 暴露端口 13 | EXPOSE 8080 14 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysDeptMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysDept; 5 | 6 | /** 7 | * 部门 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysDeptMapper extends BaseMapper { 14 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysLog; 5 | 6 | /** 7 | * 操作日志 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysLogMapper extends BaseMapper { 14 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysUser; 5 | 6 | /** 7 | * 用户 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysUserMapper extends BaseMapper { 14 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/LogService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysLog; 5 | 6 | /** 7 | * 系统日志 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface LogService extends IService { 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysRole; 5 | 6 | /** 7 | * 角色 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysRoleMapper extends BaseMapper { 14 | 15 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysDictMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysDictEntity; 5 | 6 | /** 7 | * 字典 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysDictMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysUserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysUserRole; 5 | 6 | /** 7 | * 用户角色 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysUserRoleMapper extends BaseMapper { 14 | 15 | } -------------------------------------------------------------------------------- /src/main/resources/template/Service.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import ${package}.entity.${className}Entity; 5 | 6 | /** 7 | * ${comments} 8 | * 9 | * @author ${author} 10 | * @email ${email} 11 | * @date ${datetime} 12 | */ 13 | public interface ${className}Service extends IService<${className}Entity> { 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysFilesMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysFilesEntity; 5 | 6 | /** 7 | * 文件上传 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysFilesMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysPermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysPermission; 5 | 6 | /** 7 | * 菜单权限 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysPermissionMapper extends BaseMapper { 14 | 15 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/SysDictService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysDictEntity; 5 | 6 | /** 7 | * 数据字典 服务类 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysDictService extends IService { 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysContentMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysContentEntity; 5 | 6 | /** 7 | * 内容管理 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysContentMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/SysContentService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysContentEntity; 5 | 6 | /** 7 | * 内容 服务类 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysContentService extends IService { 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/treetable-lay/treetable.css: -------------------------------------------------------------------------------- 1 | .treeTable-empty { 2 | width: 20px; 3 | display: inline-block; 4 | } 5 | 6 | .treeTable-icon { 7 | cursor: pointer; 8 | } 9 | 10 | .treeTable-icon .layui-icon-triangle-d:before { 11 | content: "\e623"; 12 | } 13 | 14 | .treeTable-icon.open .layui-icon-triangle-d:before { 15 | content: "\e625"; 16 | background-color: transparent; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysDictDetailMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysDictDetailEntity; 5 | 6 | /** 7 | * 字典详情 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysDictDetailMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysRolePermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysRolePermission; 5 | 6 | /** 7 | * 角色权限 Mapper 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public interface SysRolePermissionMapper extends BaseMapper { 14 | 15 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/SysRoleDeptMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.company.project.entity.SysRoleDeptEntity; 5 | 6 | /** 7 | * 角色部门 8 | * 9 | * @author wenbin 10 | * @email *****@mail.com 11 | * @date 2020-09-27 17:30:15 12 | */ 13 | public interface SysRoleDeptMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/SysRoleDeptService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysRoleDeptEntity; 5 | 6 | /** 7 | * 角色部门 8 | * 9 | * @author wenbin 10 | * @email *****@mail.com 11 | * @date 2020-09-27 17:30:15 12 | */ 13 | public interface SysRoleDeptService extends IService { 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/template/Dao.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.mapper; 2 | 3 | import ${package}.entity.${className}Entity; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * ${comments} 9 | * 10 | * @author ${author} 11 | * @email ${email} 12 | * @date ${datetime} 13 | */ 14 | public interface ${className}Mapper extends BaseMapper<${className}Entity> { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/HomeService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.company.project.vo.resp.HomeRespVO; 4 | 5 | /** 6 | * 首页 7 | * 8 | * @author wenbin 9 | * @version V1.0 10 | * @date 2020年3月18日 11 | */ 12 | public interface HomeService { 13 | 14 | /** 15 | * 获取首页信息 16 | * 17 | * @param userId userId 18 | * @return HomeRespVO 19 | */ 20 | HomeRespVO getHomeInfo(String userId); 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/com/company/project/CompanyFrameApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.company.project; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class CompanyFrameApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/exception/code/ResponseCodeInterface.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.exception.code; 2 | 3 | /** 4 | * ResponseCodeInterface 5 | * 6 | * @author wenbin 7 | * @version V1.0 8 | * @date 2020年3月18日 9 | */ 10 | public interface ResponseCodeInterface { 11 | /** 12 | * 获取code 13 | * 14 | * @return code 15 | */ 16 | int getCode(); 17 | 18 | /** 19 | * 获取信息 20 | * 21 | * @return msg 22 | */ 23 | String getMsg(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/template/Dao.xml.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | #foreach($column in $columns) 9 | 10 | #end 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/HomeRespVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * HomeRespVO 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | @Data 16 | public class HomeRespVO { 17 | @ApiModelProperty(value = "用户信息") 18 | private UserInfoRespVO userInfo; 19 | @ApiModelProperty(value = "目录菜单") 20 | private List menus; 21 | 22 | } -------------------------------------------------------------------------------- /src/main/resources/template/ServiceImpl.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 5 | 6 | import ${package}.mapper.${className}Mapper; 7 | import ${package}.entity.${className}Entity; 8 | import ${package}.service.${className}Service; 9 | 10 | 11 | @Service("${classname}Service") 12 | public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${className}Entity> implements ${className}Service { 13 | 14 | 15 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/aop/annotation/LogAnnotation.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.aop.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * LogAnnotation 7 | * 8 | * @author wenbin 9 | * @version V1.0 10 | * @date 2020年3月18日 11 | */ 12 | @Target(ElementType.METHOD) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | @Documented 15 | public @interface LogAnnotation { 16 | /** 17 | * 模块 18 | */ 19 | String title() default ""; 20 | 21 | /** 22 | * 功能 23 | */ 24 | String action() default ""; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 12 |
13 |

403

14 |

对不起您没有权限访问

15 |
16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/config/SaTokenConfigure.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.config; 2 | 3 | import cn.dev33.satoken.thymeleaf.dialect.SaTokenDialect; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | * Thymeleaf中使用saToken需要此配置 9 | * 10 | * @author wenbin 11 | */ 12 | @Configuration 13 | public class SaTokenConfigure { 14 | // Sa-Token 标签方言 (Thymeleaf版) 15 | @Bean 16 | public SaTokenDialect getSaTokenDialect() { 17 | return new SaTokenDialect(); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/SysRoleDeptServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.company.project.entity.SysRoleDeptEntity; 5 | import com.company.project.mapper.SysRoleDeptMapper; 6 | import com.company.project.service.SysRoleDeptService; 7 | import org.springframework.stereotype.Service; 8 | 9 | 10 | @Service("sysRoleDeptService") 11 | public class SysRoleDeptServiceImpl extends ServiceImpl implements SysRoleDeptService { 12 | 13 | 14 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/UserOwnRoleRespVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import com.company.project.entity.SysRole; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * UserOwnRoleRespVO 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | @Data 17 | public class UserOwnRoleRespVO { 18 | @ApiModelProperty("所有角色集合") 19 | private List allRole; 20 | @ApiModelProperty(value = "用户所拥有角色集合") 21 | private List ownRoles; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/LogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.company.project.entity.SysLog; 5 | import com.company.project.mapper.SysLogMapper; 6 | import com.company.project.service.LogService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * 系统日志 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | @Service 17 | public class LogServiceImpl extends ServiceImpl implements LogService { 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Title 9 | 10 | 11 | 13 |
14 |

500

15 |

服务器好像除了点问题!请稍后试试...

16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("textcolor",function(){o.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/ui/oxide-dark/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/RolePermissionService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysRolePermission; 5 | import com.company.project.vo.req.RolePermissionOperationReqVO; 6 | 7 | /** 8 | * 角色权限关联 9 | * 10 | * @author wenbin 11 | * @version V1.0 12 | * @date 2020年3月18日 13 | */ 14 | public interface RolePermissionService extends IService { 15 | 16 | /** 17 | * 角色绑定权限 18 | * 19 | * @param vo vo 20 | */ 21 | void addRolePermission(RolePermissionOperationReqVO vo); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/config/MyBatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.config; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | * mybatis plus config 9 | * 10 | * @author wenbin 11 | * @version V1.0 12 | * @date 2020年3月18日 13 | */ 14 | @Configuration 15 | public class MyBatisPlusConfig { 16 | /** 17 | * 配置mybatis-plus 分页查件 18 | */ 19 | @Bean 20 | public PaginationInterceptor paginationInterceptor() { 21 | return new PaginationInterceptor(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/SysContentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.company.project.entity.SysContentEntity; 5 | import com.company.project.mapper.SysContentMapper; 6 | import com.company.project.service.SysContentService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * 内容 服务类 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | @Service("sysContentService") 17 | public class SysContentServiceImpl extends ServiceImpl implements SysContentService { 18 | 19 | 20 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/HttpContextUtils.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | import org.springframework.web.context.request.RequestContextHolder; 4 | import org.springframework.web.context.request.ServletRequestAttributes; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import java.util.Objects; 8 | 9 | /** 10 | * HttpContextUtils 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | public class HttpContextUtils { 17 | 18 | public static HttpServletRequest getHttpServletRequest() { 19 | return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysGenerator.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import lombok.experimental.Accessors; 6 | 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | 10 | /** 11 | * 代码生成 12 | * 13 | * @author wenbin 14 | * @version V1.0 15 | * @date 2020年3月18日 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class SysGenerator extends BaseEntity implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | private String tableName; 25 | 26 | private Date createTime; 27 | 28 | private String tableComment; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/req/UserRoleOperationReqVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.req; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotEmpty; 8 | import java.util.List; 9 | 10 | /** 11 | * UserRoleOperationReqVO 12 | * 13 | * @author wenbin 14 | * @version V1.0 15 | * @date 2020年3月18日 16 | */ 17 | @Data 18 | public class UserRoleOperationReqVO { 19 | @ApiModelProperty(value = "用户id") 20 | @NotBlank(message = "用户id不能为空") 21 | private String userId; 22 | @ApiModelProperty(value = "角色id集合") 23 | @NotEmpty(message = "角色id集合不能为空") 24 | private List roleIds; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 12 |
13 |

404

14 |

您访问的页面好像不存在哦!

15 |
16 | 17 | 23 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysUserRole.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | * 用户角色 13 | * 14 | * @author wenbin 15 | * @version V1.0 16 | * @date 2020年3月18日 17 | */ 18 | @Data 19 | public class SysUserRole implements Serializable { 20 | @TableId 21 | private String id; 22 | 23 | private String userId; 24 | 25 | private String roleId; 26 | 27 | @TableField(fill = FieldFill.INSERT) 28 | private Date createTime; 29 | 30 | 31 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysRolePermission.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | * 角色权限 13 | * 14 | * @author wenbin 15 | * @version V1.0 16 | * @date 2020年3月18日 17 | */ 18 | @Data 19 | public class SysRolePermission implements Serializable { 20 | @TableId 21 | private String id; 22 | 23 | private String roleId; 24 | 25 | private String permissionId; 26 | 27 | @TableField(fill = FieldFill.INSERT) 28 | private Date createTime; 29 | 30 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/req/RolePermissionOperationReqVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.req; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotEmpty; 8 | import java.util.List; 9 | 10 | /** 11 | * RolePermissionOperationReqVO 12 | * 13 | * @author wenbin 14 | * @version V1.0 15 | * @date 2020年3月18日 16 | */ 17 | @Data 18 | public class RolePermissionOperationReqVO { 19 | @ApiModelProperty(value = "角色id") 20 | @NotBlank(message = "角色id不能为空") 21 | private String roleId; 22 | @ApiModelProperty(value = "菜单权限集合") 23 | @NotEmpty(message = "菜单权限集合不能为空") 24 | private List permissionIds; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/LoginRespVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * LoginRespVO 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | @Data 16 | public class LoginRespVO { 17 | @ApiModelProperty(value = "token") 18 | private String accessToken; 19 | @ApiModelProperty(value = "用户名") 20 | private String username; 21 | @ApiModelProperty(value = "用户id") 22 | private String id; 23 | @ApiModelProperty(value = "电话") 24 | private String phone; 25 | @ApiModelProperty(value = "用户所拥有的菜单权限(前后端分离返回给前端控制菜单和按钮的显示和隐藏)") 26 | private List list; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/SysDictDetailService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | import com.company.project.entity.SysDictDetailEntity; 7 | 8 | /** 9 | * 数据字典 服务类 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | public interface SysDictDetailService extends IService { 16 | 17 | /** 18 | * 分页 19 | * 20 | * @param page page 21 | * @param dictId dictId 22 | * @return IPage 23 | */ 24 | IPage listByPage(Page page, String dictId); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/textcolor/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function (domGlobals) { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('textcolor', function () { 16 | domGlobals.console.warn('Text color plugin is now built in to the core editor, please remove it from your editor configuration'); 17 | }); 18 | } 19 | 20 | Plugin(); 21 | 22 | }(window)); 23 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/colorpicker/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function (domGlobals) { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('colorpicker', function () { 16 | domGlobals.console.warn('Color picker plugin is now built in to the core editor, please remove it from your editor configuration'); 17 | }); 18 | } 19 | 20 | Plugin(); 21 | 22 | }(window)); 23 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/contextmenu/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function (domGlobals) { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('contextmenu', function () { 16 | domGlobals.console.warn('Context menu plugin is now built in to the core editor, please remove it from your editor configuration'); 17 | }); 18 | } 19 | 20 | Plugin(); 21 | 22 | }(window)); 23 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/UserRoleService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysUserRole; 5 | import com.company.project.vo.req.UserRoleOperationReqVO; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 用户角色 服务类 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | public interface UserRoleService extends IService { 17 | 18 | /** 19 | * 根据userId获取绑定的角色id 20 | * 21 | * @param userId userId 22 | * @return List 23 | */ 24 | List getRoleIdsByUserId(String userId); 25 | 26 | /** 27 | * 用户绑定角色 28 | * 29 | * @param vo vo 30 | */ 31 | void addUserRoleInfo(UserRoleOperationReqVO vo); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/DateUtils.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | /** 7 | * 日期处理 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public class DateUtils { 14 | /** 15 | * 时间格式(yyyy-MM-dd HH:mm:ss) 16 | */ 17 | public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; 18 | /** 19 | * 时间格式(yyyyMMdd) 20 | */ 21 | public final static String DATEPATTERN = "yyyyMMdd"; 22 | 23 | public static String format(Date date, String pattern) { 24 | if (date != null) { 25 | SimpleDateFormat df = new SimpleDateFormat(pattern); 26 | return df.format(date); 27 | } 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/ISysGeneratorService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 | import com.company.project.entity.SysGenerator; 6 | 7 | /** 8 | * 代码生成 9 | * 10 | * @author wenbin 11 | * @version V1.0 12 | * @date 2020年3月18日 13 | */ 14 | public interface ISysGeneratorService { 15 | 16 | /** 17 | * 获取所有表 18 | * 19 | * @param page page 20 | * @param vo vo 21 | * @return IPage 22 | */ 23 | IPage selectAllTables(Page page, SysGenerator vo); 24 | 25 | /** 26 | * 生成代码 27 | * 28 | * @param tables tables 29 | * @return byte[] 30 | */ 31 | byte[] generatorCode(String[] tables); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/UserInfoRespVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | /** 7 | * UserInfoRespVO 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | @Data 14 | public class UserInfoRespVO { 15 | @ApiModelProperty(value = "用户id") 16 | private String id; 17 | @ApiModelProperty(value = "账号") 18 | private String username; 19 | @ApiModelProperty(value = "手机号") 20 | private String phone; 21 | @ApiModelProperty(value = "昵称") 22 | private String nickName; 23 | @ApiModelProperty(value = "真实姓名") 24 | private String realName; 25 | @ApiModelProperty(value = "所属机构id") 26 | private String deptId; 27 | @ApiModelProperty(value = "所属机构名称") 28 | private String deptName; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/mapper/GeneratorMapper.java: -------------------------------------------------------------------------------- 1 | package com.company.project.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.company.project.entity.SysGenerator; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * 代码生成 Mapper 14 | * 15 | * @author wenbin 16 | * @version V1.0 17 | * @date 2020年3月18日 18 | */ 19 | public interface GeneratorMapper extends BaseMapper { 20 | 21 | IPage selectAllTables(Page page, @Param(value = "vo") SysGenerator vo); 22 | 23 | Map queryTable(String tableName); 24 | 25 | List> queryColumns(String tableName); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");!function o(){n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"
")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}()}(); -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/SysFilesService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysFilesEntity; 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import java.util.List; 9 | 10 | /** 11 | * 文件上传 服务类 12 | * 13 | * @author wenbin 14 | * @version V1.0 15 | * @date 2020年3月18日 16 | */ 17 | public interface SysFilesService extends IService { 18 | 19 | /** 20 | * 保存图片返回url 21 | * 22 | * @param file 23 | * @param request 24 | * @return 25 | */ 26 | String saveFile(MultipartFile file, HttpServletRequest request); 27 | 28 | /** 29 | * 删除图片 30 | * 31 | * @param ids 32 | */ 33 | void removeByIdsAndFiles(List ids); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env");!function t(){n.add("print",function(n){var t,i;(t=n).addCommand("mcePrint",function(){e.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return i.execCommand("mcePrint")}}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return i.execCommand("mcePrint")}}),n.addShortcut("Meta+P","","mcePrint")})}()}(); -------------------------------------------------------------------------------- /src/main/resources/static/css/custom.form.css: -------------------------------------------------------------------------------- 1 | .panel-heading{ 2 | padding:10px 10px; 3 | border-bottom:1px solid transparent; 4 | border-radius:2px 2px 0 0; 5 | font-size:14px; 6 | background: #eeeeee 7 | } 8 | .panel{ 9 | margin-bottom:20px; 10 | background-color:#fff; 11 | border:1px solid transparent; 12 | border-radius:4px; 13 | -webkit-box-shadow:0 1px 1px rgba(0,0,0,.05); 14 | box-shadow:0 1px 1px rgba(0,0,0,.05) 15 | } 16 | .panel-default{ 17 | border-color:#ddd; 18 | } 19 | 20 | .layui-input, .layui-textarea { 21 | display: block; 22 | width: 96%; 23 | padding-left: 10px; 24 | } 25 | 26 | .layui-form-pane .layui-form-label { 27 | width: 125px; 28 | padding: 8px 15px; 29 | height: 38px; 30 | line-height: 20px; 31 | border-width: 1px; 32 | border-style: solid; 33 | border-radius: 2px 0 0 2px; 34 | text-align: center; 35 | background-color: #FBFBFB; 36 | overflow: hidden; 37 | box-sizing: border-box; 38 | } -------------------------------------------------------------------------------- /src/main/resources/templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Manager 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 27 | -------------------------------------------------------------------------------- /src/main/resources/application-test.yml: -------------------------------------------------------------------------------- 1 | # 开发环境配置 2 | spring: 3 | thymeleaf: 4 | cache: false 5 | datasource: 6 | dynamic: 7 | primary: master #设置默认的数据源或者数据源组,默认值即为master 8 | datasource: 9 | master: 10 | username: root 11 | password: 123456 12 | driver-class-name: com.mysql.cj.jdbc.Driver 13 | url: jdbc:mysql://localhost:3306/company_project?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 14 | oracle: 15 | username: root 16 | password: 123456 17 | driver-class-name: oracle.jdbc.driver.OracleDriver 18 | url: jdbc:oracle:thin:@localhost:1521/company_project 19 | sqlServer: 20 | username: sa 21 | password: 123456 22 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver 23 | url: jdbc:sqlserver://localhost:1433;databaseName=company_project 24 | 25 | file: 26 | #文件上传目录 绝对路径 末尾请加 / 27 | path: F:/files/ #windows 28 | #path: /data/files/ #linux 29 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | # 开发环境配置 2 | spring: 3 | thymeleaf: 4 | cache: false 5 | datasource: 6 | dynamic: 7 | primary: master #设置默认的数据源或者数据源组,默认值即为master 8 | datasource: 9 | master: 10 | username: root 11 | password: Lwb123456 12 | driver-class-name: com.mysql.cj.jdbc.Driver 13 | url: jdbc:mysql://1.94.23.145:3306/company_project?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 14 | oracle: 15 | username: root 16 | password: 123456 17 | driver-class-name: oracle.jdbc.driver.OracleDriver 18 | url: jdbc:oracle:thin:@localhost:1521/company_project 19 | sqlServer: 20 | username: sa 21 | password: 123456 22 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver 23 | url: jdbc:sqlserver://localhost:1433;databaseName=company_project 24 | 25 | file: 26 | #文件上传目录 绝对路径 末尾不需要加 / 27 | path: D:/files #windows 28 | #path: /data/files #linux 29 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/DeptService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysDept; 5 | import com.company.project.vo.resp.DeptRespNodeVO; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 部门 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | public interface DeptService extends IService { 17 | 18 | /** 19 | * 添加部门 20 | * 21 | * @param vo vo 22 | */ 23 | void addDept(SysDept vo); 24 | 25 | /** 26 | * 更新部门 27 | * 28 | * @param vo vo 29 | */ 30 | void updateDept(SysDept vo); 31 | 32 | /** 33 | * 删除部门 34 | * 35 | * @param id id 36 | */ 37 | void deleted(String id); 38 | 39 | /** 40 | * 部门树形列表 41 | * 42 | * @param deptId deptId 43 | * @param disabled 最顶级是否可用 44 | * @return 树形列表 45 | */ 46 | List deptTreeList(String deptId, Boolean disabled); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/SpringContextUtils.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | import org.springframework.beans.BeansException; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * SpringContextUtils 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | @Component 16 | public class SpringContextUtils implements ApplicationContextAware { 17 | private static ApplicationContext applicationContext; 18 | 19 | @Override 20 | public void setApplicationContext(ApplicationContext applicationContext) 21 | throws BeansException { 22 | SpringContextUtils.applicationContext = applicationContext; 23 | } 24 | 25 | public static Object getBean(String name) { 26 | try { 27 | return applicationContext.getBean(name); 28 | } catch (Exception e) { 29 | return null; 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/main/resources/application-prod.yml: -------------------------------------------------------------------------------- 1 | # 生产环境配置 2 | spring: 3 | thymeleaf: 4 | cache: false 5 | datasource: 6 | dynamic: 7 | primary: master #设置默认的数据源或者数据源组,默认值即为master 8 | datasource: 9 | master: 10 | username: root 11 | password: 123456 12 | driver-class-name: com.mysql.cj.jdbc.Driver 13 | url: jdbc:mysql://localhost:3306/company_project?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 14 | oracle: 15 | username: root 16 | password: 123456 17 | driver-class-name: oracle.jdbc.driver.OracleDriver 18 | url: jdbc:oracle:thin:@localhost:1521/company_project 19 | sqlServer: 20 | username: sa 21 | password: 123456 22 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver 23 | url: jdbc:sqlserver://localhost:1433;databaseName=company_project 24 | 25 | file: 26 | #文件上传目录 绝对路径 末尾请加 / 27 | path: F:/files/ #windows 28 | #path: /data/files/ #linux 29 | knife4j: 30 | production: true #生成环境禁用查看文档 -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysRole; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 角色 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | public interface RoleService extends IService { 16 | 17 | /** 18 | * 添加角色 19 | * 20 | * @param vo SysRole 21 | */ 22 | void addRole(SysRole vo); 23 | 24 | /** 25 | * 更新角色 26 | * 27 | * @param vo SysRole 28 | */ 29 | void updateRole(SysRole vo); 30 | 31 | /** 32 | * 根据id获取角色详情 33 | * 34 | * @param id id 35 | * @return SysRole 36 | */ 37 | SysRole detailInfo(String id); 38 | 39 | /** 40 | * 根据id删除 41 | * 42 | * @param id id 43 | */ 44 | void deletedRole(String id); 45 | 46 | /** 47 | * 根据userId获取绑定的角色 48 | * 49 | * @param userId userId 50 | * @return List 51 | */ 52 | List getRoleInfoByUserId(String userId); 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/PasswordUtils.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | import java.util.UUID; 4 | 5 | 6 | /** 7 | * 密码工具类 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public class PasswordUtils { 14 | 15 | /** 16 | * 匹配密码 17 | * 18 | * @param salt 盐 19 | * @param rawPass 明文 20 | * @param encPass 密文 21 | * @return 是否匹配 22 | */ 23 | public static boolean matches(String salt, String rawPass, String encPass) { 24 | return new PasswordEncoder(salt).matches(encPass, rawPass); 25 | } 26 | 27 | /** 28 | * 明文密码加密 29 | * 30 | * @param rawPass 明文 31 | * @param salt 盐 32 | * @reture 加密后 33 | */ 34 | public static String encode(String rawPass, String salt) { 35 | return new PasswordEncoder(salt).encode(rawPass); 36 | } 37 | 38 | /** 39 | * 获取加密盐 40 | * 41 | * @return 盐值 42 | */ 43 | public static String getSalt() { 44 | return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 20); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/Constant.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | /** 4 | * Constant 5 | * 6 | * @author wenbin 7 | * @version V1.0 8 | * @date 2020年3月18日 9 | */ 10 | public class Constant { 11 | 12 | /** 13 | * 未删除值 14 | */ 15 | public static final Integer DATA_NOT_DELETED = 1; 16 | 17 | /** 18 | * 数据库类型 19 | */ 20 | public static final String DB_TYPE_MYSQL = "mysql"; 21 | public static final String DB_TYPE_ORACLE = "oracle"; 22 | public static final String DB_TYPE_SQL_SERVER = "sqlServer"; 23 | 24 | /** 25 | * 定时任务状态 26 | */ 27 | public static final Integer SCHEDULER_STATUS_NORMAL = 0; 28 | public static final Integer SCHEDULER_STATUS_PAUSE = 1; 29 | 30 | /** 31 | * 数据范围类型 1:所有/2:自定义/3:本部门及一下/4:仅本部门/5:自己 32 | */ 33 | public static final Integer DATA_SCOPE_ALL = 1; 34 | public static final Integer DATA_SCOPE_CUSTOM = 2; 35 | public static final Integer DATA_SCOPE_DEPT_AND_CHILD = 3; 36 | public static final Integer DATA_SCOPE_DEPT = 4; 37 | public static final Integer DATA_SCOPE_DEPT_SELF = 5; 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 wenbin 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 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysLog.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | 12 | /** 13 | * 操作日志 14 | * 15 | * @author wenbin 16 | * @version V1.0 17 | * @date 2020年3月18日 18 | */ 19 | @EqualsAndHashCode(callSuper = true) 20 | @Data 21 | public class SysLog extends BaseEntity implements Serializable { 22 | @TableId 23 | private String id; 24 | 25 | private String userId; 26 | 27 | private String username; 28 | 29 | private String operation; 30 | 31 | private Integer time; 32 | 33 | private String method; 34 | 35 | private String params; 36 | 37 | private String ip; 38 | 39 | @TableField(fill = FieldFill.INSERT) 40 | private Date createTime; 41 | 42 | @TableField(exist = false) 43 | private String startTime; 44 | 45 | @TableField(exist = false) 46 | private String endTime; 47 | 48 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysRoleDeptEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | 12 | /** 13 | * 角色部门 14 | * 15 | * @author wenbin 16 | * @email *****@mail.com 17 | * @date 2020-09-27 17:30:15 18 | */ 19 | @Data 20 | @TableName("sys_role_dept") 21 | public class SysRoleDeptEntity extends BaseEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | /** 25 | * 主键 26 | */ 27 | @TableId("id") 28 | private String id; 29 | 30 | /** 31 | * 角色id 32 | */ 33 | @TableField("role_id") 34 | private String roleId; 35 | 36 | /** 37 | * 菜单权限id 38 | */ 39 | @TableField("dept_id") 40 | private String deptId; 41 | 42 | /** 43 | * 创建时间 44 | */ 45 | @TableField(value = "create_time", fill = FieldFill.INSERT) 46 | private Date createTime; 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/generator.properties: -------------------------------------------------------------------------------- 1 | #\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F 2 | 3 | mainPath=com.company 4 | #\u5305\u540D 5 | package=com.company.project 6 | #\u4F5C\u8005 7 | author=wenbin 8 | #Email 9 | email=*****@mail.com 10 | #表前缀 11 | tablePrefix= 12 | 13 | #\u7C7B\u578B\u8F6C\u6362\uFF0C\u914D\u7F6E\u4FE1\u606F 14 | tinyint=Integer 15 | smallint=Integer 16 | mediumint=Integer 17 | int=Integer 18 | integer=Integer 19 | bigint=Long 20 | float=Float 21 | double=Double 22 | decimal=BigDecimal 23 | bit=Boolean 24 | 25 | char=String 26 | varchar=String 27 | tinytext=String 28 | text=String 29 | mediumtext=String 30 | longtext=String 31 | 32 | date=Date 33 | datetime=Date 34 | timestamp=Date 35 | 36 | NUMBER=Integer 37 | INT=Integer 38 | INTEGER=Integer 39 | BINARY_INTEGER=Integer 40 | LONG=String 41 | FLOAT=Float 42 | BINARY_FLOAT=Float 43 | DOUBLE=Double 44 | BINARY_DOUBLE=Double 45 | DECIMAL=BigDecimal 46 | CHAR=String 47 | VARCHAR=String 48 | VARCHAR2=String 49 | NVARCHAR=String 50 | NVARCHAR2=String 51 | CLOB=String 52 | BLOB=String 53 | DATE=Date 54 | DATETIME=Date 55 | TIMESTAMP=Date 56 | TIMESTAMP(6)=Date 57 | 58 | int8=Long 59 | int4=Integer 60 | int2=Integer 61 | numeric=BigDecimal -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/BaseEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.alibaba.fastjson.annotation.JSONField; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import lombok.Data; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * BaseEntity 13 | * 14 | * @author wenbin 15 | * @version V1.0 16 | * @date 2020年3月18日 17 | */ 18 | @Data 19 | @JsonIgnoreProperties(value = {"page", "limit", "getQueryPage"}) 20 | public class BaseEntity { 21 | @JSONField(serialize = false) 22 | @TableField(exist = false) 23 | private Integer page = 1; 24 | 25 | @JSONField(serialize = false) 26 | @TableField(exist = false) 27 | private Integer limit = 10; 28 | 29 | /** 30 | * 数据权限:用户id 31 | */ 32 | @TableField(exist = false) 33 | private List createIds; 34 | 35 | /** 36 | * page条件 37 | * 38 | * @param 39 | * @return 40 | */ 41 | @JSONField(serialize = false) 42 | public Page getQueryPage() { 43 | return new Page(page, limit); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/config/StpInterfaceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.config; 2 | 3 | import cn.dev33.satoken.stp.StpInterface; 4 | import cn.dev33.satoken.stp.StpUtil; 5 | import com.company.project.service.PermissionService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * SaToken自定义权限加载接口实现类 13 | * 14 | * @author wenbin 15 | */ 16 | @Component // 保证此类被 SpringBoot 扫描,完成 Sa-Token 的自定义权限验证扩展 17 | public class StpInterfaceImpl implements StpInterface { 18 | 19 | @Autowired 20 | PermissionService permissionService; 21 | 22 | /** 23 | * 返回一个账号所拥有的权限码集合 24 | */ 25 | @Override 26 | public List getPermissionList(Object loginId, String loginType) { 27 | if (loginType.equals(StpUtil.TYPE)) { 28 | return permissionService.getPermissionsByUserId(String.valueOf(loginId)); 29 | } 30 | return null; 31 | } 32 | 33 | /** 34 | * 返回一个账号所拥有的角色标识集合 35 | */ 36 | @Override 37 | public List getRoleList(Object loginId, String loginType) { 38 | return null; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};!function t(){e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}()}(); -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysDictEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | 13 | /** 14 | * 字典管理 15 | * 16 | * @author wenbin 17 | * @version V1.0 18 | * @date 2020年3月18日 19 | */ 20 | @EqualsAndHashCode(callSuper = true) 21 | @Data 22 | @TableName("sys_dict") 23 | public class SysDictEntity extends BaseEntity implements Serializable { 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId("id") 30 | private String id; 31 | 32 | /** 33 | * 字典名称 34 | */ 35 | @TableField("name") 36 | private String name; 37 | 38 | /** 39 | * 备注 40 | */ 41 | @TableField("remark") 42 | private String remark; 43 | 44 | /** 45 | * 创建时间 46 | */ 47 | @TableField(value = "create_time", fill = FieldFill.INSERT) 48 | private Date createTime; 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysFilesEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | 13 | /** 14 | * 文件上传 15 | * 16 | * @author wenbin 17 | * @version V1.0 18 | * @date 2020年3月18日 19 | */ 20 | @EqualsAndHashCode(callSuper = true) 21 | @Data 22 | @TableName("sys_files") 23 | public class SysFilesEntity extends BaseEntity implements Serializable { 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId("id") 30 | private String id; 31 | 32 | /** 33 | * URL地址 34 | */ 35 | @TableField("url") 36 | private String url; 37 | 38 | /** 39 | * 创建时间 40 | */ 41 | @TableField(value = "create_date", fill = FieldFill.INSERT) 42 | private Date createDate; 43 | 44 | @TableField("file_name") 45 | private String fileName; 46 | 47 | @TableField("file_path") 48 | private String filePath; 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/resources/template/Entity.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableId; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import com.baomidou.mybatisplus.annotation.TableField; 6 | import com.company.project.entity.BaseEntity; 7 | import com.baomidou.mybatisplus.annotation.FieldFill; 8 | 9 | #if(${hasBigDecimal}) 10 | #end 11 | import java.io.Serializable; 12 | import java.util.Date; 13 | 14 | import lombok.Data; 15 | 16 | /** 17 | * ${comments} 18 | * 19 | * @author ${author} 20 | * @email ${email} 21 | * @date ${datetime} 22 | */ 23 | @Data 24 | @TableName("${tableName}") 25 | public class ${className}Entity extends BaseEntity implements Serializable { 26 | private static final long serialVersionUID = 1L; 27 | 28 | #foreach ($column in $columns) 29 | /** 30 | * $column.comments 31 | */ 32 | #if($column.columnName == $pk.columnName) 33 | @TableId("$column.columnName") 34 | private $column.attrType $column.attrname; 35 | #end 36 | #if($column.columnName != $pk.columnName) 37 | #if($column.attrname == "deleted") 38 | @TableField(value = "$column.columnName", fill = FieldFill.INSERT) 39 | #else 40 | @TableField("$column.columnName") 41 | #end 42 | private $column.attrType $column.attrname; 43 | #end 44 | 45 | #end 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/controller/UserRoleController.java: -------------------------------------------------------------------------------- 1 | package com.company.project.controller; 2 | 3 | import com.company.project.common.aop.annotation.LogAnnotation; 4 | import com.company.project.service.UserRoleService; 5 | import com.company.project.vo.req.UserRoleOperationReqVO; 6 | import io.swagger.annotations.Api; 7 | import io.swagger.annotations.ApiOperation; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import javax.annotation.Resource; 14 | import javax.validation.Valid; 15 | 16 | /** 17 | * 用户和角色关联 18 | * 19 | * @author wenbin 20 | * @version V1.0 21 | * @date 2020年3月18日 22 | */ 23 | @RequestMapping("/sys") 24 | @RestController 25 | @Api(tags = "组织管理-用户和角色关联接口") 26 | public class UserRoleController { 27 | @Resource 28 | private UserRoleService userRoleService; 29 | 30 | @PostMapping("/user/role") 31 | @ApiOperation(value = "修改或者新增用户角色接口") 32 | @LogAnnotation(title = "用户和角色关联接口", action = "修改或者新增用户角色") 33 | public void operationUserRole(@RequestBody @Valid UserRoleOperationReqVO vo) { 34 | userRoleService.addUserRoleInfo(vo); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/DeptRespNodeVO.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * DeptRespNodeVO 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | @Data 16 | public class DeptRespNodeVO { 17 | @ApiModelProperty(value = "组织id") 18 | private String id; 19 | 20 | @ApiModelProperty(value = "组织编码") 21 | private String deptNo; 22 | 23 | @ApiModelProperty(value = "组织名称") 24 | private String title; 25 | 26 | @ApiModelProperty(value = "组织名称") 27 | private String label; 28 | 29 | @ApiModelProperty(value = "组织父级id") 30 | private String pid; 31 | 32 | @ApiModelProperty(value = "组织状态") 33 | private Integer status; 34 | 35 | @ApiModelProperty(value = "组织关系id") 36 | private String relationCode; 37 | 38 | @ApiModelProperty(value = "是否展开 默认不展开(false)") 39 | private boolean spread = true; 40 | 41 | @ApiModelProperty(value = "是否选中") 42 | private boolean checked = false; 43 | 44 | private boolean disabled = false; 45 | 46 | @ApiModelProperty(value = "子集") 47 | private List children; 48 | 49 | public String getLabel() { 50 | return title; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none} -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysDept.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | 8 | import javax.validation.constraints.NotBlank; 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | 12 | /** 13 | * 部门 14 | * 15 | * @author wenbin 16 | * @version V1.0 17 | * @date 2020年3月18日 18 | */ 19 | @Data 20 | public class SysDept implements Serializable { 21 | @TableId 22 | private String id; 23 | 24 | private String deptNo; 25 | 26 | @NotBlank(message = "机构名称不能为空") 27 | private String name; 28 | 29 | @NotBlank(message = "父级不能为空") 30 | private String pid; 31 | 32 | @TableField(exist = false) 33 | private String pidName; 34 | 35 | private Integer status; 36 | 37 | private String relationCode; 38 | 39 | private String deptManagerId; 40 | 41 | private String managerName; 42 | 43 | private String phone; 44 | 45 | @TableField(fill = FieldFill.INSERT) 46 | private Date createTime; 47 | 48 | @TableField(fill = FieldFill.INSERT_UPDATE) 49 | private Date updateTime; 50 | 51 | @TableField(fill = FieldFill.INSERT) 52 | private Integer deleted; 53 | 54 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/vo/resp/PermissionRespNode.java: -------------------------------------------------------------------------------- 1 | package com.company.project.vo.resp; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * PermissionRespNode 10 | * 11 | * @author wenbin 12 | * @version V1.0 13 | * @date 2020年3月18日 14 | */ 15 | @Data 16 | public class PermissionRespNode { 17 | @ApiModelProperty(value = "id") 18 | private String id; 19 | @ApiModelProperty(value = "菜单权限名称") 20 | private String title; 21 | 22 | @ApiModelProperty(value = "菜单权限标识,shiro 适配restful") 23 | private String perms; 24 | 25 | @ApiModelProperty(value = "接口地址") 26 | private String url; 27 | 28 | @ApiModelProperty(value = "icon") 29 | private String icon; 30 | 31 | private String target; 32 | 33 | @ApiModelProperty(value = "父级id") 34 | private String pid; 35 | 36 | @ApiModelProperty(value = "父级名称") 37 | private String pidName; 38 | 39 | @ApiModelProperty(value = "菜单权限类型(1:目录;2:菜单;3:按钮)") 40 | private Integer type; 41 | 42 | @ApiModelProperty(value = "排序码") 43 | private Integer orderNum; 44 | 45 | @ApiModelProperty(value = "是否展开 默认不展开(false)") 46 | private boolean spread = true; 47 | 48 | @ApiModelProperty(value = "是否选中 默认false") 49 | private boolean checked; 50 | private List children; 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/controller/api/TestController.java: -------------------------------------------------------------------------------- 1 | package com.company.project.controller.api; 2 | 3 | import cn.dev33.satoken.stp.SaTokenInfo; 4 | import cn.dev33.satoken.stp.StpUtil; 5 | import cn.dev33.satoken.util.SaResult; 6 | import io.swagger.annotations.Api; 7 | import io.swagger.annotations.ApiOperation; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | 14 | /** 15 | * api test示例 16 | * 17 | * @author wenbin 18 | * @version V1.0 19 | * @date 2020年5月11日 20 | */ 21 | @RestController 22 | @RequestMapping("/app/api") 23 | @Api(tags = "test") 24 | public class TestController { 25 | 26 | 27 | @PostMapping("/login") 28 | @ApiOperation(value = "登录接口") 29 | public SaResult login() { 30 | // 第1步,先登录上 31 | StpUtil.login(10001); 32 | // 第2步,获取 Token 相关参数 33 | SaTokenInfo tokenInfo = StpUtil.getTokenInfo(); 34 | // 第3步,返回给前端 35 | return SaResult.data(tokenInfo); 36 | } 37 | 38 | 39 | @GetMapping("/getCurUserInfo") 40 | @ApiOperation(value = "获取当前登录人信息示例") 41 | public void getAppUserInfo() { 42 | //拿userId与userName 43 | String userId = StpUtil.getLoginIdAsString(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/exception/BusinessException.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.exception; 2 | 3 | import com.company.project.common.exception.code.BaseResponseCode; 4 | import com.company.project.common.exception.code.ResponseCodeInterface; 5 | 6 | /** 7 | * BusinessException 8 | * 9 | * @author wenbin 10 | * @version V1.0 11 | * @date 2020年3月18日 12 | */ 13 | public class BusinessException extends RuntimeException { 14 | /** 15 | * 异常编号 16 | */ 17 | private final int messageCode; 18 | 19 | /** 20 | * 对messageCode 异常信息进行补充说明 21 | */ 22 | private final String detailMessage; 23 | 24 | public BusinessException(int messageCode, String message) { 25 | super(message); 26 | this.messageCode = messageCode; 27 | this.detailMessage = message; 28 | } 29 | 30 | public BusinessException(String message) { 31 | super(message); 32 | this.messageCode = BaseResponseCode.OPERATION_ERRO.getCode(); 33 | this.detailMessage = message; 34 | } 35 | 36 | /** 37 | * 构造函数 38 | * 39 | * @param code 异常码 40 | */ 41 | public BusinessException(ResponseCodeInterface code) { 42 | this(code.getCode(), code.getMsg()); 43 | } 44 | 45 | public int getMessageCode() { 46 | return messageCode; 47 | } 48 | 49 | public String getDetailMessage() { 50 | return detailMessage; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/content/default/content.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem} 8 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/hr/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var register = function (editor) { 15 | editor.addCommand('InsertHorizontalRule', function () { 16 | editor.execCommand('mceInsertContent', false, '
'); 17 | }); 18 | }; 19 | 20 | var register$1 = function (editor) { 21 | editor.ui.registry.addButton('hr', { 22 | icon: 'horizontal-rule', 23 | tooltip: 'Horizontal line', 24 | onAction: function () { 25 | return editor.execCommand('InsertHorizontalRule'); 26 | } 27 | }); 28 | editor.ui.registry.addMenuItem('hr', { 29 | icon: 'horizontal-rule', 30 | text: 'Horizontal line', 31 | onAction: function () { 32 | return editor.execCommand('InsertHorizontalRule'); 33 | } 34 | }); 35 | }; 36 | 37 | function Plugin () { 38 | global.add('hr', function (editor) { 39 | register(editor); 40 | register$1(editor); 41 | }); 42 | } 43 | 44 | Plugin(); 45 | 46 | }()); 47 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/content/writer/content.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem} 8 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysPermission.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | 13 | /** 14 | * 权限菜单 15 | * 16 | * @author wenbin 17 | * @version V1.0 18 | * @date 2020年3月18日 19 | */ 20 | @Data 21 | public class SysPermission implements Serializable { 22 | 23 | 24 | @TableId 25 | private String id; 26 | 27 | @NotBlank(message = "菜单权限名称不能为空") 28 | private String name; 29 | 30 | private String perms; 31 | 32 | private String url; 33 | 34 | private String icon; 35 | 36 | private String target; 37 | 38 | @NotNull(message = "所属菜单不能为空") 39 | private String pid; 40 | 41 | private Integer orderNum; 42 | 43 | @NotNull(message = "菜单权限类型不能为空") 44 | private Integer type; 45 | 46 | /** 47 | * 1正常 2禁用 48 | */ 49 | private Integer status; 50 | 51 | @TableField(fill = FieldFill.INSERT) 52 | private Date createTime; 53 | 54 | @TableField(fill = FieldFill.INSERT_UPDATE) 55 | private Date updateTime; 56 | 57 | @TableField(fill = FieldFill.INSERT) 58 | private Integer deleted; 59 | 60 | @TableField(exist = false) 61 | private String pidName; 62 | 63 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/RolePermissionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 5 | import com.company.project.entity.SysRolePermission; 6 | import com.company.project.mapper.SysRolePermissionMapper; 7 | import com.company.project.service.RolePermissionService; 8 | import com.company.project.vo.req.RolePermissionOperationReqVO; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | * 角色权限关联 16 | * 17 | * @author wenbin 18 | * @version V1.0 19 | * @date 2020年3月18日 20 | */ 21 | @Service 22 | public class RolePermissionServiceImpl extends ServiceImpl implements RolePermissionService { 23 | @Override 24 | public void addRolePermission(RolePermissionOperationReqVO vo) { 25 | List list = new ArrayList<>(); 26 | for (String permissionId : vo.getPermissionIds()) { 27 | SysRolePermission sysRolePermission = new SysRolePermission(); 28 | sysRolePermission.setPermissionId(permissionId); 29 | sysRolePermission.setRoleId(vo.getRoleId()); 30 | list.add(sysRolePermission); 31 | } 32 | this.remove(Wrappers.lambdaQuery().eq(SysRolePermission::getRoleId, vo.getRoleId())); 33 | this.saveBatch(list); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t,o,e){var n,i;t.dom.toggleClass(t.getBody(),"mce-visualblocks"),e.set(!e.get()),n=t,i=e.get(),n.fire("VisualBlocks",{state:i})},f=function(e,n){return function(o){o.setActive(n.get());var t=function(t){return o.setActive(t.state)};return e.on("VisualBlocks",t),function(){return e.off("VisualBlocks",t)}}};!function o(){t.add("visualblocks",function(t,o){var e,n,i,s,c,u,l,a=(e=!1,{get:function(){return e},set:function(t){e=t}});i=a,(n=t).addCommand("mceVisualBlocks",function(){r(n,0,i)}),c=a,(s=t).ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return s.execCommand("mceVisualBlocks")},onSetup:f(s,c)}),s.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return s.execCommand("mceVisualBlocks")},onSetup:f(s,c)}),l=a,(u=t).on("PreviewFormats AfterPreviewFormats",function(t){l.get()&&u.dom.toggleClass(u.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),u.on("init",function(){u.getParam("visualblocks_default_state",!1,"boolean")&&r(u,0,l)})})}()}(); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/content/dark/content.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#6d737b}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem} 8 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){for(var a="",o=0;o'+i(" ",e)+"":i(" ",e);n.undoManager.transact(function(){return n.insertContent(o)})},c=tinymce.util.Tools.resolve("tinymce.util.VK");!function e(){n.add("nonbreaking",function(n){var e,a,o,i,t;(e=n).addCommand("mceNonBreaking",function(){r(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),0<(t="boolean"==typeof(i=(o=n).getParam("nonbreaking_force_tab",0))?!0===i?3:0:i)&&o.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(o,t)}})})}()}(); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/skins/content/document/content.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | @media screen{html{background:#f4f4f4;min-height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;margin:1rem auto 0;max-width:820px;min-height:calc(100vh - 1rem);padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem} 8 | -------------------------------------------------------------------------------- /src/main/resources/template/menu.sql.vm: -------------------------------------------------------------------------------- 1 | -- 默认上级目录菜单为其他 2 | INSERT INTO sys_permission (id, name, pid, url,target, type,order_num, deleted, status) 3 | VALUES ('${identity}', '${comments}' ,'21', 'index/${classname}','_self', '2', '10',1, 1); 4 | -- 菜单对应按钮SQL 5 | INSERT INTO sys_permission (id,pid, name, url, perms, type, deleted, status) 6 | VALUES ('${selectId}', '${identity}', '列表' , '${classname}/listByPage','${classname}:list', '3',1, 1); 7 | INSERT INTO sys_permission (id,pid, name, url, perms, type, deleted, status) 8 | VALUES ('${addId}', '${identity}', '新增' , '${classname}/add','${classname}:add', '3',1, 1); 9 | INSERT INTO sys_permission (id,pid, name, url, perms, type, deleted, status) 10 | VALUES ('${updateId}', '${identity}', '修改' , '${classname}/update','${classname}:update', '3',1, 1); 11 | INSERT INTO sys_permission (id,pid, name, url, perms, type, deleted, status) 12 | VALUES ('${deleteId}', '${identity}', '删除' , '${classname}/delete','${classname}:delete', '3',1, 1); 13 | -- 赋予admin用户权限 14 | INSERT INTO sys_role_permission(id, role_id, permission_id) VALUES ('${identityJoinId}', '1', '${identity}'); 15 | INSERT INTO sys_role_permission(id, role_id, permission_id) VALUES ('${selectIdJoinId}', '1', '${selectId}'); 16 | INSERT INTO sys_role_permission(id, role_id, permission_id) VALUES ('${addIdJoinId}', '1', '${addId}'); 17 | INSERT INTO sys_role_permission(id, role_id, permission_id) VALUES ('${updateIdJoinId}', '1', '${updateId}'); 18 | INSERT INTO sys_role_permission(id, role_id, permission_id) VALUES ('${deleteIdJoinId}', '1', '${deleteId}'); 19 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysDictDetailEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | 13 | /** 14 | * 字典明细 15 | * 16 | * @author wenbin 17 | * @version V1.0 18 | * @date 2020年3月18日 19 | */ 20 | @EqualsAndHashCode(callSuper = true) 21 | @Data 22 | @TableName("sys_dict_detail") 23 | public class SysDictDetailEntity extends BaseEntity implements Serializable { 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId("id") 30 | private String id; 31 | 32 | /** 33 | * 字典标签 34 | */ 35 | @TableField("label") 36 | private String label; 37 | 38 | /** 39 | * 字典值 40 | */ 41 | @TableField("value") 42 | private String value; 43 | 44 | /** 45 | * 排序 46 | */ 47 | @TableField("sort") 48 | private Integer sort; 49 | 50 | /** 51 | * 字典id 52 | */ 53 | @TableField("dict_id") 54 | private String dictId; 55 | 56 | /** 57 | * 创建日期 58 | */ 59 | @TableField(value = "create_time", fill = FieldFill.INSERT) 60 | private Date createTime; 61 | 62 | /** 63 | * 字典name 64 | */ 65 | @TableField(exist = false) 66 | private String dictName; 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/main/resources/templates/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 后台管理系统 介绍 7 | 8 |

springboot-manager

9 | 10 |

介绍

11 | 12 |

基于SpringBoot 、Apache Shiro、Redis、Mybatis Plus 、Thymeleaf、Layui 后台管理系统
提供代码生成器,基本增删改查无需编写,可快速完成开发任务。开发最精简,可当脚手架,适合你来diy 13 |

14 | 15 |

特征&提供

16 | 17 |
    18 |
  • 后台接口RESTful 风格,支持前后端分离,可与app公用一套接口。
  • 19 |
  • 采用RBAC的权限控制
  • 20 |
  • 统一响应结果封装及生成工具
  • 21 |
  • 统一异常处理
  • 22 |
  • 采用shiro redis token 角色权限管理认证
  • 23 |
  • 使用Druid Spring Boot Starter 集成Druid数据库连接池与监控
  • 24 |
  • 集成MyBatis-Plus,实现单表业务零SQL
  • 25 |
  • 支持多数据源,自由切换,只需方法或类上用 @DS 切换数据源
  • 26 |
  • 集成国人风格的knife4j,自动生成接口文档
  • 27 |
  • 提供代码生成器,生成从html到mapper,自动赋给admin超级权限,爽歪歪
  • 28 |
29 | 30 |

技术

31 | 32 |
    33 |
  • 核心框架:spring boot 2.1.6
  • 34 |
  • 持久层框架:mybatis plus
  • 35 |
  • 数据库连接池:alibaba druid
  • 36 |
  • 安全框架:apache shiro
  • 37 |
  • 缓存框架:redis
  • 38 |
  • 日志框架:logback
  • 39 |
  • 接口文档:Knife4j
  • 40 |
  • 前端模板:thymeleaf+layui2x
  • 41 |
42 | 43 |

开发

44 | 45 |
    46 |
  • Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建VO,否则需在扩展的成员变量上加@TableField(exist = false)
  • 47 |
  • 如果表有是否删除字段,需要在Model注解@TableLogic 默认1未删 0删除, 或@TableLogic(value="逻辑未删除值",delval="逻辑删除值")
  • 48 |
  • 登录密码 admin/123456
  • 49 |
50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # 端口 2 | server: 3 | port: 8080 4 | servlet: 5 | context-path: /manager 6 | 7 | spring: 8 | profiles: 9 | active: dev 10 | mvc: 11 | throw-exception-if-no-handler-found: true 12 | resources: 13 | add-mappings: false 14 | application: 15 | name: springboot-manager 16 | jackson: 17 | date-format: yyyy-MM-dd HH:mm:ss 18 | time-zone: GMT+8 19 | # 文件大小限制 20 | servlet: 21 | multipart: 22 | max-file-size: 10MB 23 | max-request-size: 100MB 24 | 25 | mybatis-plus: 26 | configuration: 27 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 28 | mapper-locations: classpath:mapper/${project.database}/**/*.xml,classpath:mapper/*.xml 29 | global-config: 30 | db-config: 31 | logic-delete-value: 0 32 | logic-not-delete-value: 1 33 | logic-delete-field: deleted 34 | 35 | ############## Sa-Token 配置 (文档: https://sa-token.cc) ############## 36 | sa-token: 37 | # token 名称(同时也是 cookie 名称) 38 | token-name: satoken 39 | # token 有效期(单位:秒) 默认30天,-1 代表永久有效 40 | timeout: 2592000 41 | # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结 42 | active-timeout: -1 43 | # 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录) 44 | is-concurrent: true 45 | # 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token) 46 | is-share: true 47 | # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik) 48 | token-style: uuid 49 | # 是否输出操作日志 50 | is-log: true 51 | 52 | #使用代码生成模块时 指定要生成的表存在于哪种数据库,可选值有【mysql、oracle、sqlServer】 53 | project: 54 | database: mysql 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/mapper/mysql/SysGeneratorMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | id, table_name, menu_name, pid, gen_time 8 | 9 | 10 | 28 | 29 | 30 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.company.project.entity.SysUser; 6 | import com.company.project.vo.resp.LoginRespVO; 7 | import com.company.project.vo.resp.UserOwnRoleRespVO; 8 | 9 | /** 10 | * 用户 服务类 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | public interface UserService extends IService { 17 | 18 | /** 19 | * 注册 20 | * 21 | * @param vo vo 22 | */ 23 | void register(SysUser vo); 24 | 25 | /** 26 | * 登陆 27 | * 28 | * @param vo vo 29 | * @return LoginRespVO 30 | */ 31 | LoginRespVO login(SysUser vo); 32 | 33 | /** 34 | * 更新用户信息 35 | * 36 | * @param vo vo 37 | */ 38 | void updateUserInfo(SysUser vo); 39 | 40 | /** 41 | * 分页 42 | * 43 | * @param vo vo 44 | * @return IPage 45 | */ 46 | IPage pageInfo(SysUser vo); 47 | 48 | /** 49 | * 添加用户 50 | * 51 | * @param vo vo 52 | */ 53 | void addUser(SysUser vo); 54 | 55 | /** 56 | * 修改密码 57 | * 58 | * @param vo vo 59 | */ 60 | void updatePwd(SysUser vo); 61 | 62 | /** 63 | * 根据userid获取绑定角色 64 | * 65 | * @param userId userId 66 | * @return UserOwnRoleRespVO 67 | */ 68 | UserOwnRoleRespVO getUserOwnRole(String userId); 69 | 70 | /** 71 | * 修改自己信息 72 | * 73 | * @param vo vo 74 | */ 75 | void updateUserInfoMy(SysUser vo); 76 | } 77 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/print/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var global$1 = tinymce.util.Tools.resolve('tinymce.Env'); 15 | 16 | var register = function (editor) { 17 | editor.addCommand('mcePrint', function () { 18 | if (global$1.browser.isIE()) { 19 | editor.getDoc().execCommand('print', false, null); 20 | } else { 21 | editor.getWin().print(); 22 | } 23 | }); 24 | }; 25 | 26 | var register$1 = function (editor) { 27 | editor.ui.registry.addButton('print', { 28 | icon: 'print', 29 | tooltip: 'Print', 30 | onAction: function () { 31 | return editor.execCommand('mcePrint'); 32 | } 33 | }); 34 | editor.ui.registry.addMenuItem('print', { 35 | text: 'Print...', 36 | icon: 'print', 37 | onAction: function () { 38 | return editor.execCommand('mcePrint'); 39 | } 40 | }); 41 | }; 42 | 43 | function Plugin () { 44 | global.add('print', function (editor) { 45 | register(editor); 46 | register$1(editor); 47 | editor.addShortcut('Meta+P', '', 'mcePrint'); 48 | }); 49 | } 50 | 51 | Plugin(); 52 | 53 | }()); 54 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysContentEntity.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | 13 | /** 14 | * 内容管理 15 | * 16 | * @author wenbin 17 | * @version V1.0 18 | * @date 2020年3月18日 19 | */ 20 | @EqualsAndHashCode(callSuper = true) 21 | @Data 22 | @TableName("sys_content") 23 | public class SysContentEntity extends BaseEntity implements Serializable { 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键id 28 | */ 29 | @TableId("id") 30 | private String id; 31 | 32 | /** 33 | * 主题 34 | */ 35 | @TableField("title") 36 | private String title; 37 | 38 | /** 39 | * 内容 40 | */ 41 | @TableField("content") 42 | private String content; 43 | 44 | /** 45 | * 单个图片url 46 | */ 47 | private String oneImg; 48 | 49 | /** 50 | * 多个图片url 51 | */ 52 | private String multipleImg; 53 | 54 | /** 55 | * 关键字 56 | */ 57 | private String keywords; 58 | 59 | /** 60 | * 类型(数据字典) 61 | */ 62 | @TableField("type") 63 | private String type; 64 | 65 | /** 66 | * 创建人 67 | */ 68 | @TableField(value = "create_id", fill = FieldFill.INSERT) 69 | private String createId; 70 | 71 | /** 72 | * 创建时间 73 | */ 74 | @TableField(value = "create_time", fill = FieldFill.INSERT) 75 | private Date createTime; 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){return e.getParam("pagebreak_split_block",!1)},g=function(){return"mce-pagebreak"},u=function(){return''};!function n(){e.add("pagebreak",function(e){var a,n,o,c,t,r;(a=e).addCommand("mcePageBreak",function(){i(a)?a.insertContent("

"+u()+"

"):a.insertContent(u())}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return n.execCommand("mcePageBreak")}}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return n.execCommand("mcePageBreak")}}),c=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,u())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,a.remove();continue}a.type=3,a.value=c,a.raw=!0}})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,g())&&(e.name="pagebreak")})})}()}(); -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/utils/ValidatorUtils.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.utils; 2 | 3 | 4 | import com.company.project.common.exception.BusinessException; 5 | import org.apache.commons.lang.StringUtils; 6 | 7 | import javax.validation.ConstraintViolation; 8 | import javax.validation.Validation; 9 | import javax.validation.Validator; 10 | import java.util.Set; 11 | 12 | /** 13 | * hibernate-validator校验工具类 14 | */ 15 | public class ValidatorUtils { 16 | private static Validator validator; 17 | 18 | static { 19 | validator = Validation.buildDefaultValidatorFactory().getValidator(); 20 | } 21 | 22 | /** 23 | * 校验对象 24 | * 25 | * @param object 待校验对象 26 | * @param groups 待校验的组 27 | * @throws BusinessException 校验不通过,则报RRException异常 28 | */ 29 | public static void validateEntity(Object object, Class... groups) 30 | throws BusinessException { 31 | Set> constraintViolations = validator.validate(object, groups); 32 | if (!constraintViolations.isEmpty()) { 33 | ConstraintViolation constraint = (ConstraintViolation) constraintViolations.iterator().next(); 34 | throw new BusinessException(constraint.getMessage()); 35 | } 36 | } 37 | 38 | /** 39 | * 空判断处理 40 | * 41 | * @param str 42 | * @param message 43 | */ 44 | public static void isBlank(Object str, String message) { 45 | if (str == null) { 46 | throw new BusinessException(message); 47 | } 48 | if (str instanceof String) { 49 | if (StringUtils.isBlank(String.valueOf(str))) { 50 | throw new BusinessException(message); 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("save_enablewhendirty",!0)},c=function(e,n){e.notificationManager.open({text:n,type:"error"})},t=function(t){t.addCommand("mceSave",function(){!function(e){var n=o.DOM.getParent(e.id,"form");if(!i(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():c(e,"Error: Form submit field collision.")),e.nodeChanged()):c(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e,n;e=t,n=a.trim(e.startContent),e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})},r=function(t){return function(e){var n=function(){e.setDisabled(i(t)&&!t.isDirty())};return t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}};!function n(){e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:r(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:r(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}()}(); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},f=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},s=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return''+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+""}},n=function(n){var t,r="contenteditable",e=" "+l.trim(n.getParam("noneditable_editable_class","mceEditable"))+" ",a=" "+l.trim(u(n))+" ",i=f(e),o=f(a),c=(t=n.getParam("noneditable_regexp",[]))&&t.constructor===RegExp?[t]:t;n.on("PreInit",function(){0 permissionRespNodes; 51 | @TableField(exist = false) 52 | private List deptRespNodes; 53 | 54 | @TableField(exist = false) 55 | private String startTime; 56 | 57 | @TableField(exist = false) 58 | private String endTime; 59 | 60 | @TableField(exist = false) 61 | private List permissions; 62 | 63 | @TableField(exist = false) 64 | private List depts; 65 | 66 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/SysDictServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONArray; 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import com.company.project.entity.SysDictDetailEntity; 8 | import com.company.project.entity.SysDictEntity; 9 | import com.company.project.mapper.SysDictDetailMapper; 10 | import com.company.project.mapper.SysDictMapper; 11 | import com.company.project.service.SysDictService; 12 | import org.springframework.stereotype.Service; 13 | import org.springframework.util.StringUtils; 14 | 15 | import javax.annotation.Resource; 16 | import java.util.List; 17 | 18 | /** 19 | * 数据字典 服务类 20 | * 21 | * @author wenbin 22 | * @version V1.0 23 | * @date 2020年3月18日 24 | */ 25 | @Service("sysDictService") 26 | public class SysDictServiceImpl extends ServiceImpl implements SysDictService { 27 | 28 | @Resource 29 | private SysDictDetailMapper sysDictDetailMapper; 30 | 31 | /** 32 | * 根据字典类型查询字典数据信息 33 | * 34 | * @param name 字典名称 35 | * @return 参数键值 36 | **/ 37 | public JSONArray getType(String name) { 38 | if (StringUtils.isEmpty(name)) { 39 | return new JSONArray(); 40 | } 41 | //根据名称获取字典 42 | SysDictEntity dict = this.getOne(Wrappers.lambdaQuery().eq(SysDictEntity::getName, name)); 43 | if (dict == null || dict.getId() == null) { 44 | return new JSONArray(); 45 | } 46 | //获取明细 47 | List list = sysDictDetailMapper.selectList(Wrappers.lambdaQuery().eq(SysDictDetailEntity::getDictId, dict.getId())); 48 | return JSONArray.parseArray(JSON.toJSONString(list)); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/CompanyProjectApplication.java: -------------------------------------------------------------------------------- 1 | package com.company.project; 2 | 3 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.mybatis.spring.annotation.MapperScan; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | import org.springframework.boot.web.servlet.ServletComponentScan; 9 | import org.springframework.context.ConfigurableApplicationContext; 10 | import org.springframework.core.env.Environment; 11 | 12 | import java.net.InetAddress; 13 | 14 | /** 15 | * 启动类 16 | * 17 | * @author wenbin 18 | */ 19 | @SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class) 20 | @MapperScan("com.company.project.mapper") 21 | @Slf4j 22 | @ServletComponentScan(basePackages = {"com.company.project.common.filter"}) //这一句完成了配置,Springboot的”懒理念“真的厉害。 23 | public class CompanyProjectApplication { 24 | 25 | public static void main(String[] args) throws Exception { 26 | ConfigurableApplicationContext application = SpringApplication.run(CompanyProjectApplication.class, args); 27 | 28 | Environment env = application.getEnvironment(); 29 | log.info("\n----------------------------------------------------------\n\t" + 30 | "Application '{}' is running! Access URLs:\n\t" + 31 | "Login: \thttp://{}:{}/manager\n\t" + 32 | "Doc: \thttp://{}:{}/manager/doc.html\n" + 33 | "----------------------------------------------------------", 34 | env.getProperty("spring.application.name"), 35 | InetAddress.getLocalHost().getHostAddress(), 36 | env.getProperty("server.port"), 37 | InetAddress.getLocalHost().getHostAddress(), 38 | env.getProperty("server.port")); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/impl/HomeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service.impl; 2 | 3 | import com.company.project.entity.SysDept; 4 | import com.company.project.entity.SysUser; 5 | import com.company.project.service.DeptService; 6 | import com.company.project.service.HomeService; 7 | import com.company.project.service.PermissionService; 8 | import com.company.project.service.UserService; 9 | import com.company.project.vo.resp.HomeRespVO; 10 | import com.company.project.vo.resp.PermissionRespNode; 11 | import com.company.project.vo.resp.UserInfoRespVO; 12 | import org.springframework.beans.BeanUtils; 13 | import org.springframework.stereotype.Service; 14 | 15 | import javax.annotation.Resource; 16 | import java.util.List; 17 | 18 | /** 19 | * 首页 20 | * 21 | * @author wenbin 22 | * @version V1.0 23 | * @date 2020年3月18日 24 | */ 25 | @Service 26 | public class HomeServiceImpl implements HomeService { 27 | @Resource 28 | private UserService userService; 29 | @Resource 30 | private DeptService deptService; 31 | @Resource 32 | private PermissionService permissionService; 33 | 34 | @Override 35 | public HomeRespVO getHomeInfo(String userId) { 36 | 37 | 38 | SysUser sysUser = userService.getById(userId); 39 | UserInfoRespVO vo = new UserInfoRespVO(); 40 | 41 | if (sysUser != null) { 42 | BeanUtils.copyProperties(sysUser, vo); 43 | SysDept sysDept = deptService.getById(sysUser.getDeptId()); 44 | if (sysDept != null) { 45 | vo.setDeptId(sysDept.getId()); 46 | vo.setDeptName(sysDept.getName()); 47 | } 48 | } 49 | 50 | List menus = permissionService.permissionTreeList(userId); 51 | 52 | HomeRespVO respVO = new HomeRespVO(); 53 | respVO.setMenus(menus); 54 | respVO.setUserInfo(vo); 55 | 56 | return respVO; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(s){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),v=t.DOM,n=function(e){e.keyCode!==m.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(c){function e(n){var i,o,l;if(!(n.keyCode!==m.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())){var e,t=d.explode((e=c).getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next")));if(1===t.length&&(t[1]=t[0],t[0]=":prev"),o=n.shiftKey?":prev"===t[0]?r(-1):v.get(t[0]):":next"===t[1]?r(1):v.get(t[1])){var u=a.get(o.id||o.name);o.id&&u?u.focus():f.setTimeout(function(){y.webkit||s.window.focus(),o.focus()},10),n.preventDefault()}}function r(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&a.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),d.each(o,function(e,t){if(e.id===c.id)return i=t,!1}),0';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/java/com/company/project/controller/SysGeneratorController.java: -------------------------------------------------------------------------------- 1 | package com.company.project.controller; 2 | 3 | import cn.dev33.satoken.annotation.SaCheckPermission; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.company.project.entity.SysGenerator; 6 | import com.company.project.service.ISysGeneratorService; 7 | import io.swagger.annotations.Api; 8 | import io.swagger.annotations.ApiOperation; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.apache.commons.io.IOUtils; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.annotation.Resource; 14 | import javax.servlet.http.HttpServletResponse; 15 | import java.io.IOException; 16 | 17 | /** 18 | * 代码生成 19 | * 20 | * @author wenbin 21 | * @version V1.0 22 | * @date 2020年3月18日 23 | */ 24 | @Api(tags = "系统模块-代码生成") 25 | @Slf4j 26 | @RestController 27 | @RequestMapping("/sysGenerator") 28 | public class SysGeneratorController { 29 | @Resource 30 | private ISysGeneratorService sysGeneratorService; 31 | 32 | /** 33 | * 生成代码 34 | */ 35 | @ApiOperation(value = "生成") 36 | @GetMapping("/gen") 37 | @SaCheckPermission("sysGenerator:add") 38 | public void code(String tables, HttpServletResponse response) throws IOException { 39 | byte[] data = sysGeneratorService.generatorCode(tables.split(",")); 40 | 41 | response.reset(); 42 | response.setHeader("Content-Disposition", "attachment; filename=\"manager.zip\""); 43 | response.addHeader("Content-Length", "" + data.length); 44 | response.setContentType("application/octet-stream; charset=UTF-8"); 45 | 46 | IOUtils.write(data, response.getOutputStream()); 47 | } 48 | 49 | @ApiOperation(value = "查询分页数据") 50 | @PostMapping("/listByPage") 51 | @SaCheckPermission("sysGenerator:list") 52 | public IPage findListByPage(@RequestBody SysGenerator vo) { 53 | return sysGeneratorService.selectAllTables(vo.getQueryPage(), vo); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/resources/static/css/login.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | width: 100%; 3 | height: 100%; 4 | overflow: hidden 5 | } 6 | 7 | body { 8 | background: #1E9FFF; 9 | } 10 | 11 | body:after { 12 | content: ''; 13 | background-repeat: no-repeat; 14 | background-size: cover; 15 | -webkit-filter: blur(3px); 16 | -moz-filter: blur(3px); 17 | -o-filter: blur(3px); 18 | -ms-filter: blur(3px); 19 | filter: blur(3px); 20 | position: absolute; 21 | top: 0; 22 | left: 0; 23 | right: 0; 24 | bottom: 0; 25 | z-index: -1; 26 | } 27 | 28 | .layui-container { 29 | width: 100%; 30 | height: 100%; 31 | overflow: hidden 32 | } 33 | 34 | .admin-login-background { 35 | width: 360px; 36 | height: 300px; 37 | position: absolute; 38 | left: 50%; 39 | top: 40%; 40 | margin-left: -180px; 41 | margin-top: -100px; 42 | } 43 | 44 | .logo-title { 45 | text-align: center; 46 | letter-spacing: 2px; 47 | padding: 14px 0; 48 | } 49 | 50 | .logo-title h1 { 51 | color: #1E9FFF; 52 | font-size: 25px; 53 | font-weight: bold; 54 | } 55 | 56 | .login-form { 57 | background-color: #fff; 58 | border: 1px solid #fff; 59 | border-radius: 3px; 60 | padding: 14px 20px; 61 | box-shadow: 0 0 8px #eeeeee; 62 | } 63 | 64 | .login-form .layui-form-item { 65 | position: relative; 66 | } 67 | 68 | .login-form .layui-form-item label { 69 | position: absolute; 70 | left: 1px; 71 | top: 1px; 72 | width: 38px; 73 | line-height: 36px; 74 | text-align: center; 75 | color: #d2d2d2; 76 | } 77 | 78 | .login-form .layui-form-item input { 79 | padding-left: 36px; 80 | } 81 | 82 | .captcha { 83 | width: 60%; 84 | display: inline-block; 85 | } 86 | 87 | .captcha-img { 88 | display: inline-block; 89 | width: 34%; 90 | float: right; 91 | } 92 | 93 | .captcha-img img { 94 | height: 34px; 95 | border: 1px solid #e6e6e6; 96 | height: 36px; 97 | width: 100%; 98 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/service/PermissionService.java: -------------------------------------------------------------------------------- 1 | package com.company.project.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.company.project.entity.SysPermission; 5 | import com.company.project.vo.resp.PermissionRespNode; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 菜单权限 11 | * 12 | * @author wenbin 13 | * @version V1.0 14 | * @date 2020年3月18日 15 | */ 16 | public interface PermissionService extends IService { 17 | 18 | /** 19 | * 根据userId获取权限 20 | * 21 | * @param userId userId 22 | * @return 权限 23 | */ 24 | List getPermission(String userId); 25 | 26 | /** 27 | * 删除权限 28 | * 29 | * @param permissionId 权限id 30 | */ 31 | void deleted(String permissionId); 32 | 33 | /** 34 | * 获取所有 35 | * 36 | * @return List 37 | */ 38 | List selectAll(Integer status); 39 | 40 | /** 41 | * 根据userId获取权限标志 42 | * 43 | * @param userId userId 44 | * @return Set 45 | */ 46 | List getPermissionsByUserId(String userId); 47 | 48 | /** 49 | * 根据userId获取权限树 50 | * 51 | * @param userId 52 | * @return List 53 | */ 54 | List permissionTreeList(String userId); 55 | 56 | /** 57 | * 根据权限树 58 | * 59 | * @return List 60 | */ 61 | List selectAllByTree(Integer status); 62 | 63 | /** 64 | * 根据目录树 65 | * 66 | * @param permissionId permissionId 67 | * @return List 68 | */ 69 | List selectAllMenuByTree(String permissionId); 70 | 71 | 72 | /** 73 | * 根据权限id获取绑定的userId 74 | * 75 | * @param permissionId permissionId 76 | * @return List 77 | */ 78 | List getUserIdsById(String permissionId); 79 | 80 | /** 81 | * 更新 82 | * 83 | * @param vo vo 84 | */ 85 | void updatePermission(SysPermission vo); 86 | } 87 | -------------------------------------------------------------------------------- /src/main/resources/static/css/login2.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-image: url("images/bg.jpg"); 3 | height: 100%; 4 | width: 100% 5 | } 6 | 7 | #container { 8 | height: 100%; 9 | width: 100% 10 | } 11 | 12 | input:-webkit-autofill { 13 | -webkit-box-shadow: inset 0 0 0 1000px #fff; 14 | background-color: transparent 15 | } 16 | 17 | .admin-login-background { 18 | width: 300px; 19 | height: 300px; 20 | position: absolute; 21 | left: 50%; 22 | top: 40%; 23 | margin-left: -150px; 24 | margin-top: -100px 25 | } 26 | 27 | .admin-header { 28 | text-align: center; 29 | margin-bottom: 20px; 30 | color: #ffffff; 31 | font-weight: bold; 32 | font-size: 40px 33 | } 34 | 35 | .admin-input { 36 | border-top-style: none; 37 | border-right-style: solid; 38 | border-bottom-style: solid; 39 | border-left-style: solid; 40 | height: 50px; 41 | width: 300px; 42 | padding-bottom: 0px 43 | } 44 | 45 | .admin-input::-webkit-input-placeholder { 46 | color: #a78369 47 | } 48 | 49 | .layui-icon-username { 50 | color: #a78369 !important 51 | } 52 | 53 | .layui-icon-username:hover { 54 | color: #9dadce !important 55 | } 56 | 57 | .layui-icon-password { 58 | color: #a78369 !important 59 | } 60 | 61 | .layui-icon-password:hover { 62 | color: #9dadce !important 63 | } 64 | 65 | .admin-input-username { 66 | border-top-style: solid; 67 | border-radius: 10px 10px 0 0 68 | } 69 | 70 | .admin-input-verify { 71 | border-radius: 0 0 10px 10px 72 | } 73 | 74 | .admin-button { 75 | margin-top: 20px; 76 | font-weight: bold; 77 | font-size: 18px; 78 | width: 300px; 79 | height: 50px; 80 | border-radius: 5px; 81 | background-color: #a78369; 82 | border: 1px solid #d8b29f 83 | } 84 | 85 | .admin-icon { 86 | margin-left: 260px; 87 | margin-top: 10px; 88 | font-size: 30px 89 | } 90 | 91 | i { 92 | position: absolute 93 | } 94 | 95 | .admin-captcha { 96 | position: absolute; 97 | margin-left: 205px; 98 | margin-top: -45px 99 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/entity/SysUser.java: -------------------------------------------------------------------------------- 1 | package com.company.project.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | 9 | import javax.validation.constraints.NotBlank; 10 | import java.io.Serializable; 11 | import java.util.Date; 12 | import java.util.List; 13 | 14 | /** 15 | * 用户 16 | * 17 | * @author wenbin 18 | * @version V1.0 19 | * @date 2020年3月18日 20 | */ 21 | @EqualsAndHashCode(callSuper = true) 22 | @Data 23 | public class SysUser extends BaseEntity implements Serializable { 24 | @TableId 25 | private String id; 26 | 27 | @NotBlank(message = "账号不能为空") 28 | private String username; 29 | 30 | private String salt; 31 | 32 | @NotBlank(message = "密码不能为空") 33 | private String password; 34 | 35 | @TableField(exist = false) 36 | private String oldPwd; 37 | 38 | @TableField(exist = false) 39 | private String newPwd; 40 | 41 | private String phone; 42 | 43 | private String deptId; 44 | 45 | @TableField(exist = false) 46 | private String deptName; 47 | 48 | @TableField(exist = false) 49 | private String deptNo; 50 | 51 | 52 | private String realName; 53 | 54 | private String nickName; 55 | 56 | private String email; 57 | 58 | private Integer status; 59 | 60 | private Integer sex; 61 | 62 | @TableField(fill = FieldFill.INSERT) 63 | private Integer deleted; 64 | 65 | private String createId; 66 | 67 | private String updateId; 68 | 69 | private Integer createWhere; 70 | 71 | @TableField(fill = FieldFill.INSERT) 72 | private Date createTime; 73 | 74 | @TableField(fill = FieldFill.INSERT_UPDATE) 75 | private Date updateTime; 76 | 77 | @TableField(exist = false) 78 | private String startTime; 79 | 80 | @TableField(exist = false) 81 | private String endTime; 82 | 83 | @TableField(exist = false) 84 | private List roleIds; 85 | 86 | @TableField(exist = false) 87 | private String captcha; 88 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){var t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","");n+='',e&&(n+='");var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='"});var r,a,c,s,d,m,l,u=-1===(s=(r=t).getParam("body_id","tinymce","string")).indexOf("=")?s:(c=(a=r).getParam("body_id","","hash"))[a.id]||c,y=-1===(l=(d=t).getParam("body_class","","string")).indexOf("=")?l:(m=d).getParam("body_class","","hash")[m.id]||"",v=' 44 | 45 | 46 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/indent2em/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add('indent2em', function(editor, url) { 2 | var pluginName='首行缩进'; 3 | var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); 4 | var indent2em_val = editor.getParam('indent2em_val', '2em'); 5 | var doAct = function () { 6 | var dom = editor.dom; 7 | var blocks = editor.selection.getSelectedBlocks(); 8 | var act = ''; 9 | global$1.each(blocks, function (block) { 10 | if(act==''){ 11 | act = dom.getStyle(block,'text-indent')==indent2em_val ? 'remove' : 'add'; 12 | } 13 | if( act=='add' ){ 14 | dom.setStyle(block, 'text-indent', indent2em_val); 15 | }else{ 16 | var style=dom.getAttrib(block,'style'); 17 | var reg = new RegExp('text-indent:[\\s]*' + indent2em_val + ';', 'ig'); 18 | style = style.replace(reg, ''); 19 | dom.setAttrib(block,'style',style); 20 | } 21 | 22 | }); 23 | }; 24 | 25 | editor.ui.registry.getAll().icons.indent2em || editor.ui.registry.addIcon('indent2em',''); 26 | 27 | var stateSelectorAdapter = function (editor, selector) { 28 | return function (buttonApi) { 29 | return editor.selection.selectorChangedWithUnbind(selector.join(','), buttonApi.setActive).unbind; 30 | }; 31 | }; 32 | 33 | editor.ui.registry.addToggleButton('indent2em', { 34 | icon: 'indent2em', 35 | tooltip: pluginName, 36 | onAction: function () { 37 | doAct(); 38 | }, 39 | onSetup: stateSelectorAdapter(editor, [ 40 | '*[style*="text-indent"]', 41 | '*[data-mce-style*="text-indent"]', 42 | ]) 43 | }); 44 | 45 | editor.ui.registry.addMenuItem('indent2em', { 46 | text: pluginName, 47 | onAction: function() { 48 | doAct(); 49 | } 50 | }); 51 | 52 | editor.addCommand('indent2em', doAct ); 53 | 54 | return { 55 | getMetadata: function () { 56 | return { 57 | name: pluginName, 58 | url: "http://tinymce.ax-z.cn/more-plugins/indent2em.php", 59 | }; 60 | } 61 | }; 62 | }); 63 | -------------------------------------------------------------------------------- /src/main/resources/static/css/home.css: -------------------------------------------------------------------------------- 1 | .layui-tab-title .layui-this { 2 | background-color: #009688; 3 | color: #eee; 4 | } 5 | 6 | .first-tab i.layui-tab-close { 7 | display: none !important; 8 | } 9 | 10 | .layui-layout-admin .layui-header { 11 | background-color: #1aa094 !important; 12 | } 13 | 14 | .layui-layout-admin .layui-logo { 15 | background-color: #0c0c0c !important; 16 | } 17 | 18 | .layuimini-color .color-title { 19 | padding: 10px 0 10px 20px; 20 | border-bottom: 1px solid #d9dada; 21 | margin-bottom: 8px; 22 | } 23 | 24 | .layuimini-color .color-content { 25 | padding: 0 5px 0 5px; 26 | } 27 | 28 | .layuimini-color .color-content ul { 29 | list-style: none; 30 | text-align: center; 31 | } 32 | 33 | .layuimini-color .color-content ul li { 34 | position: relative; 35 | display: inline-block; 36 | vertical-align: top; 37 | width: 80px; 38 | height: 50px; 39 | margin: 0 15px 15px 0; 40 | padding: 2px 2px 4px 2px; 41 | background-color: #f2f2f2; 42 | cursor: pointer; 43 | font-size: 12px; 44 | color: #666; 45 | } 46 | 47 | .layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { 48 | width: 100%; 49 | height: 100%; 50 | padding: 4px; 51 | top: -5px; 52 | left: -5px; 53 | border-color: #d8d8d8; 54 | opacity: 1; 55 | } 56 | 57 | .layuimini-color .color-content li:after { 58 | content: ''; 59 | position: absolute; 60 | z-index: 20; 61 | top: 50%; 62 | left: 50%; 63 | width: 1px; 64 | height: 0; 65 | border: 1px solid #f2f2f2; 66 | transition: all .3s; 67 | -webkit-transition: all .3s; 68 | opacity: 0; 69 | } 70 | 71 | .layuimini-tool-left { 72 | position: absolute !important; 73 | top: 0; 74 | left: 200px; 75 | width: 60px; 76 | height: 100%; 77 | line-height: 60px; 78 | text-align: center; 79 | color: #ffffff !important; 80 | } 81 | 82 | .closeBox { 83 | height: 35px !important; 84 | } 85 | 86 | .closeBox > li { 87 | line-height: 35px !important; 88 | } 89 | 90 | .closeBox { 91 | position: absolute; 92 | right: -10px; 93 | top: 16px; 94 | background-color: #fff !important; 95 | color: #000; 96 | border-bottom: 1px solid #e2e2e2; 97 | padding: 0 10px !important; 98 | } 99 | 100 | .closeBox .layui-nav-item { 101 | line-height: 40px; 102 | } 103 | 104 | .closeBox .layui-nav-item > a, .closeBox .layui-nav-item > a:hover { 105 | color: #000; 106 | } 107 | 108 | .closeBox .layui-nav-child { 109 | top: 40px; 110 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui-ext/tinymce/tinymce/plugins/code/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.4.2 (2020-08-17) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var setContent = function (editor, html) { 15 | editor.focus(); 16 | editor.undoManager.transact(function () { 17 | editor.setContent(html); 18 | }); 19 | editor.selection.setCursorLocation(); 20 | editor.nodeChanged(); 21 | }; 22 | var getContent = function (editor) { 23 | return editor.getContent({ source_view: true }); 24 | }; 25 | 26 | var open = function (editor) { 27 | var editorContent = getContent(editor); 28 | editor.windowManager.open({ 29 | title: 'Source Code', 30 | size: 'large', 31 | body: { 32 | type: 'panel', 33 | items: [{ 34 | type: 'textarea', 35 | name: 'code' 36 | }] 37 | }, 38 | buttons: [ 39 | { 40 | type: 'cancel', 41 | name: 'cancel', 42 | text: 'Cancel' 43 | }, 44 | { 45 | type: 'submit', 46 | name: 'save', 47 | text: 'Save', 48 | primary: true 49 | } 50 | ], 51 | initialData: { code: editorContent }, 52 | onSubmit: function (api) { 53 | setContent(editor, api.getData().code); 54 | api.close(); 55 | } 56 | }); 57 | }; 58 | 59 | var register = function (editor) { 60 | editor.addCommand('mceCodeEditor', function () { 61 | open(editor); 62 | }); 63 | }; 64 | 65 | var register$1 = function (editor) { 66 | editor.ui.registry.addButton('code', { 67 | icon: 'sourcecode', 68 | tooltip: 'Source code', 69 | onAction: function () { 70 | return open(editor); 71 | } 72 | }); 73 | editor.ui.registry.addMenuItem('code', { 74 | icon: 'sourcecode', 75 | text: 'Source code', 76 | onAction: function () { 77 | return open(editor); 78 | } 79 | }); 80 | }; 81 | 82 | function Plugin () { 83 | global.add('code', function (editor) { 84 | register(editor); 85 | register$1(editor); 86 | return {}; 87 | }); 88 | } 89 | 90 | Plugin(); 91 | 92 | }()); 93 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
    ",u=1;u<=i.length;u++){var r='
  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
  • ":n+=r}n+="
"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/java/com/company/project/common/filter/AuthFilter.java: -------------------------------------------------------------------------------- 1 | package com.company.project.common.filter; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.company.project.common.utils.DataResult; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.apache.commons.lang.StringUtils; 7 | import org.springframework.core.annotation.Order; 8 | 9 | import javax.servlet.*; 10 | import javax.servlet.annotation.WebFilter; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | import java.io.IOException; 14 | import java.util.Arrays; 15 | 16 | 17 | @Slf4j 18 | @WebFilter(filterName = "authFilter", urlPatterns = "/app/api/*") 19 | @Order(1) 20 | public class AuthFilter implements Filter { 21 | /** 22 | * 白名单 23 | */ 24 | private static final String[] whiteList = {"/app/api/login", "/app/api/open/test"}; 25 | 26 | //需要拦截的地址 27 | @Override 28 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { 29 | HttpServletRequest req = (HttpServletRequest) request; 30 | HttpServletResponse resp = (HttpServletResponse) response; 31 | resp.setHeader("Access-Control-Allow-Origin", "*"); 32 | resp.setHeader("Access-Control-Allow-Credentials", "true"); 33 | resp.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT"); 34 | resp.setHeader("Access-Control-Allow-Headers", "*"); 35 | String url = req.getRequestURI(); 36 | log.info("url:{}", url); 37 | if (Arrays.asList(whiteList).contains(url)) { 38 | chain.doFilter(request, response); 39 | } else { 40 | //拦截接口 41 | //从header中获取token 42 | String token = req.getHeader("satoken"); 43 | //如果header中不存在token,则从参数中获取token 44 | if (StringUtils.isBlank(token)) { 45 | token = request.getParameter("satoken"); 46 | } 47 | //token为空返回 48 | if (StringUtils.isBlank(token)) { 49 | responseResult(resp, DataResult.fail("token不能为空")); 50 | } 51 | } 52 | 53 | } 54 | 55 | /** 56 | * responseResult 57 | * 58 | * @param response 59 | * @param result 60 | */ 61 | private void responseResult(HttpServletResponse response, DataResult result) { 62 | response.setCharacterEncoding("UTF-8"); 63 | response.setHeader("Content-type", "application/json;charset=UTF-8"); 64 | response.setStatus(200); 65 | try { 66 | response.getWriter().write(JSON.toJSONString(result)); 67 | } catch (IOException ex) { 68 | log.error(ex.getMessage()); 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/main/java/com/company/project/controller/SysContentController.java: -------------------------------------------------------------------------------- 1 | package com.company.project.controller; 2 | 3 | import cn.dev33.satoken.annotation.SaCheckPermission; 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 7 | import com.company.project.entity.SysContentEntity; 8 | import com.company.project.service.SysContentService; 9 | import io.swagger.annotations.Api; 10 | import io.swagger.annotations.ApiOperation; 11 | import io.swagger.annotations.ApiParam; 12 | import org.springframework.util.CollectionUtils; 13 | import org.springframework.util.StringUtils; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import javax.annotation.Resource; 17 | import java.util.List; 18 | 19 | 20 | /** 21 | * 文章管理 22 | * 23 | * @author wenbin 24 | * @version V1.0 25 | * @date 2020年3月18日 26 | */ 27 | @Api(tags = "文章管理") 28 | @RestController 29 | @RequestMapping("/sysContent") 30 | public class SysContentController { 31 | @Resource 32 | private SysContentService sysContentService; 33 | 34 | 35 | @ApiOperation(value = "新增") 36 | @PostMapping("/add") 37 | @SaCheckPermission("sysContent:add") 38 | public void add(@RequestBody SysContentEntity sysContent) { 39 | sysContentService.save(sysContent); 40 | } 41 | 42 | @ApiOperation(value = "删除") 43 | @DeleteMapping("/delete") 44 | @SaCheckPermission("sysContent:delete") 45 | public void delete(@RequestBody @ApiParam(value = "id集合") List ids) { 46 | sysContentService.removeByIds(ids); 47 | } 48 | 49 | @ApiOperation(value = "更新") 50 | @PutMapping("/update") 51 | @SaCheckPermission("sysContent:update") 52 | public void update(@RequestBody SysContentEntity sysContent) { 53 | sysContentService.updateById(sysContent); 54 | } 55 | 56 | @ApiOperation(value = "查询分页数据") 57 | @PostMapping("/listByPage") 58 | @SaCheckPermission("sysContent:list") 59 | public IPage findListByPage(@RequestBody SysContentEntity sysContent) { 60 | LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); 61 | //查询条件示例 62 | if (!StringUtils.isEmpty(sysContent.getTitle())) { 63 | queryWrapper.like(SysContentEntity::getTitle, sysContent.getTitle()); 64 | } 65 | //数据权限示例, 需手动添加此条件 begin 66 | if (!CollectionUtils.isEmpty(sysContent.getCreateIds())) { 67 | queryWrapper.in(SysContentEntity::getCreateId, sysContent.getCreateIds()); 68 | } 69 | //数据权限示例, 需手动添加此条件 end 70 | return sysContentService.page(sysContent.getQueryPage(), queryWrapper); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/static/css/build.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /*元素面板*/ 4 | .element-panel{ 5 | padding-top: 10px; 6 | } 7 | .element-panel .layui-form-item, 8 | .element-panel .layui-form-item .layui-form-label, 9 | .build-panel .build-item, 10 | .build-panel .build-item .layui-form-label 11 | { 12 | cursor: move; 13 | } 14 | .drag-box{ 15 | position: absolute; 16 | top: 100px; 17 | left: 100px; 18 | background-color: #FFFFFF; 19 | box-shadow: 0 0 2px 1px rgba(0,0,0,.12); 20 | opacity: 0.6; 21 | } 22 | .drag-box .layui-form-item{ 23 | margin-bottom: 10px; 24 | } 25 | 26 | /*构建面板*/ 27 | .build-card{ 28 | overflow: hidden; 29 | } 30 | .build-panel{ 31 | min-height: 500px; 32 | overflow: hidden; 33 | padding: 0; 34 | margin: 15px; 35 | } 36 | .build-panel.active{ 37 | background-color: #fdffcd; 38 | } 39 | .build-panel #shell-item{ 40 | background-color: #eeeeee; 41 | border: 1px dashed #c3c3c3; 42 | } 43 | .build-panel .build-item{ 44 | position: relative; 45 | } 46 | .build-panel .build-item:hover{ 47 | padding-top: 10px; 48 | border: 1px dashed #ffc664; 49 | } 50 | .build-panel .build-item:hover .control{ 51 | display: block; 52 | } 53 | .build-panel .build-item .control{ 54 | position: absolute; 55 | top: 0; 56 | right: 6px; 57 | font-size: 12px; 58 | color: #009688; 59 | display: none; 60 | z-index: 999999; 61 | } 62 | .build-panel .build-item .control a{ 63 | color: #009688; 64 | } 65 | .build-item-edit .build-edit-box{ 66 | position: relative; 67 | width: 500px; 68 | height: 317px; 69 | display: block; 70 | } 71 | .build-item-edit .build-edit{ 72 | display: block; 73 | width: 460px; 74 | height: 287px; 75 | border: 10px solid #F8F8F8; 76 | border-top-width: 0; 77 | padding: 10px; 78 | line-height: 20px; 79 | overflow: auto; 80 | background-color: #3F3F3F; 81 | color: #eee; 82 | font-size: 12px; 83 | font-family: Courier New, serif; 84 | } 85 | .build-item-edit .build-edit-btn{ 86 | position: absolute; 87 | z-index: 99999; 88 | right: 34px; 89 | bottom: 26px; 90 | width: 58px; 91 | height: 30px; 92 | border: none; 93 | color: #ffffff; 94 | border-radius: 2px; 95 | background-color: #009688; 96 | cursor: pointer; 97 | } 98 | .build-item-edit .build-edit-btn:hover{ 99 | background-color: #007c6e; 100 | } 101 | .build-generate{ 102 | float: right; 103 | margin-top: 6px; 104 | margin-right: 2px; 105 | color: #009688; 106 | border-color: #009688; 107 | } 108 | .build-generate:hover{ 109 | background-color: #009688; 110 | color: #FFFFFF; 111 | } --------------------------------------------------------------------------------