├── .gitee ├── ISSUE_TEMPLATE.zh-CN.md └── PULL_REQUEST_TEMPLATE.zh-CN.md ├── .gitignore ├── LICENSE ├── README.md ├── blog-admin ├── .gitignore ├── Dockerfile ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zyd │ │ │ └── blog │ │ │ ├── BlogAdminApplication.java │ │ │ ├── controller │ │ │ ├── KaptchaController.java │ │ │ ├── PassportController.java │ │ │ ├── RenderController.java │ │ │ ├── RestApiController.java │ │ │ ├── RestArticleController.java │ │ │ ├── RestBizAdController.java │ │ │ ├── RestCommentController.java │ │ │ ├── RestConfigController.java │ │ │ ├── RestFileController.java │ │ │ ├── RestLinkController.java │ │ │ ├── RestNoticeController.java │ │ │ ├── RestPageController.java │ │ │ ├── RestResourcesController.java │ │ │ ├── RestRoleController.java │ │ │ ├── RestSocialConfigController.java │ │ │ ├── RestStatisticsController.java │ │ │ ├── RestTagController.java │ │ │ ├── RestTemplateController.java │ │ │ ├── RestTypeController.java │ │ │ ├── RestUpdateController.java │ │ │ └── RestUserController.java │ │ │ └── core │ │ │ ├── config │ │ │ ├── MyClassResolvingObjectInputStream.java │ │ │ ├── MySecSerializer.java │ │ │ ├── PageHelperConfig.java │ │ │ ├── ShiroConfig.java │ │ │ └── WebMvcConfig.java │ │ │ ├── interceptor │ │ │ └── RememberAuthenticationInterceptor.java │ │ │ ├── schedule │ │ │ └── FriendlyLinkTask.java │ │ │ ├── shiro │ │ │ ├── ShiroService.java │ │ │ ├── ShiroServiceImpl.java │ │ │ ├── credentials │ │ │ │ ├── CredentialsMatcher.java │ │ │ │ └── RetryLimitCredentialsMatcher.java │ │ │ └── realm │ │ │ │ └── ShiroRealm.java │ │ │ └── websocket │ │ │ ├── config │ │ │ └── WebSocketConfig.java │ │ │ ├── server │ │ │ └── ZydWebsocketServer.java │ │ │ └── util │ │ │ └── WebSocketUtil.java │ └── resources │ │ ├── HunterConfig.json │ │ ├── application-dev.yml │ │ ├── application.yml │ │ ├── banner.txt │ │ ├── logback-spring.xml │ │ ├── static │ │ └── assets │ │ │ ├── css │ │ │ ├── bootstrap-datetimepicker.min.css │ │ │ ├── bootstrap-table.min.css │ │ │ ├── bootstrap-tagsinput-typeahead.css │ │ │ ├── bootstrap-tagsinput.css │ │ │ ├── bootstrap-treetable.css │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── daterangepicker.min.css │ │ │ ├── font-awesome.min.css │ │ │ ├── iCheck-green.css │ │ │ ├── jquery-confirm.min.css │ │ │ ├── jquery.fancybox.min.css │ │ │ ├── nprogress.min.css │ │ │ ├── switchery.min.css │ │ │ ├── toastr.min.css │ │ │ ├── wangeditor-style.min.css │ │ │ ├── zTree.v3.metroStyle.min.css │ │ │ └── zhyd.core.css │ │ │ ├── images │ │ │ ├── cdn │ │ │ │ ├── fancybox │ │ │ │ │ ├── blank.gif │ │ │ │ │ ├── fancybox_loading.gif │ │ │ │ │ ├── fancybox_loading@2x.gif │ │ │ │ │ ├── fancybox_overlay.png │ │ │ │ │ ├── fancybox_sprite.png │ │ │ │ │ └── fancybox_sprite@2x.png │ │ │ │ ├── icheck │ │ │ │ │ ├── green.png │ │ │ │ │ └── green@2x.png │ │ │ │ ├── xxx │ │ │ │ └── ztree │ │ │ │ │ ├── line_conn.png │ │ │ │ │ ├── loading.gif │ │ │ │ │ └── metro.png │ │ │ ├── favicon.ico │ │ │ ├── icons │ │ │ │ ├── aliyun.svg │ │ │ │ ├── local.svg │ │ │ │ └── qiniu.svg │ │ │ ├── loading.gif │ │ │ ├── other │ │ │ │ ├── AD_ARTICLE.png │ │ │ │ ├── AD_ARTICLE_BOTTOM.png │ │ │ │ ├── AD_ARTICLE_TOP.png │ │ │ │ ├── AD_COMMENT_BOX_TOP.png │ │ │ │ ├── AD_HOMEPAGE_OPEN_SCREEN.png │ │ │ │ ├── AD_HOMEPAGE_TOP.png │ │ │ │ ├── AD_SIDEBAR_BOTTOM.png │ │ │ │ ├── AD_SIDEBAR_TOP.png │ │ │ │ ├── article_scroll_type.png │ │ │ │ ├── article_top_type.png │ │ │ │ ├── bubbleWord.gif │ │ │ │ ├── nav_search_word.png │ │ │ │ └── site_annotation.png │ │ │ ├── reward │ │ │ │ ├── wx_code.png │ │ │ │ ├── wx_reward_code.png │ │ │ │ └── zfb_code.png │ │ │ ├── selected_mask.png │ │ │ ├── user.png │ │ │ └── wechat_account_500x500.jpg │ │ │ └── js │ │ │ ├── ajaxfileupload.js │ │ │ ├── bootstrap-datetimepicker.min.js │ │ │ ├── bootstrap-progressbar.min.js │ │ │ ├── bootstrap-table-zh-CN.min.js │ │ │ ├── bootstrap-table.min.js │ │ │ ├── bootstrap-tagsinput.min.js │ │ │ ├── bootstrap-treetable.js │ │ │ ├── bootstrap.min.js │ │ │ ├── codemirror.inline-attachment.js │ │ │ ├── daterangepicker.min.js │ │ │ ├── gentelella.core.js │ │ │ ├── icheck.min.js │ │ │ ├── inline-attachment.js │ │ │ ├── jquery-confirm.min.js │ │ │ ├── jquery-form.js │ │ │ ├── jquery.fancybox.min.js │ │ │ ├── jquery.lazyload.min.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.ztree.core.min.js │ │ │ ├── jquery.ztree.excheck.min.js │ │ │ ├── moment.min.js │ │ │ ├── mustache.min.js │ │ │ ├── nprogress.min.js │ │ │ ├── switchery.min.js │ │ │ ├── toastr.min.js │ │ │ ├── validator.js │ │ │ ├── wangeditor-index.min.js │ │ │ ├── xss.min.js │ │ │ ├── zhyd.core.js │ │ │ ├── zhyd.echarts.js │ │ │ ├── zhyd.publish-article.js │ │ │ ├── zhyd.table.js │ │ │ ├── zhyd.tool.js │ │ │ ├── zhyd.treetable.js │ │ │ └── zhyd.upload-preview.js │ │ └── templates │ │ ├── article │ │ ├── list.ftl │ │ ├── publish-md.ftl │ │ ├── publish-tiny.ftl │ │ ├── publish-we.ftl │ │ ├── tags.ftl │ │ └── types.ftl │ │ ├── bizAd │ │ └── bizAd.ftl │ │ ├── comment │ │ └── list.ftl │ │ ├── config.ftl │ │ ├── error │ │ ├── 401.ftl │ │ ├── 403.ftl │ │ ├── 404.ftl │ │ └── 500.ftl │ │ ├── file │ │ └── list.ftl │ │ ├── include │ │ └── macros.ftl │ │ ├── index.ftl │ │ ├── laboratory │ │ └── notification.ftl │ │ ├── layout │ │ ├── footer.ftl │ │ ├── setting.ftl │ │ └── sidebar.ftl │ │ ├── link │ │ └── list.ftl │ │ ├── login.ftl │ │ ├── notice │ │ └── list.ftl │ │ ├── other │ │ ├── editor.ftl │ │ ├── icons.ftl │ │ └── shiro.ftl │ │ ├── page │ │ └── page.ftl │ │ ├── resources │ │ └── list.ftl │ │ ├── role │ │ └── list.ftl │ │ ├── social │ │ └── list.ftl │ │ ├── template │ │ └── list.ftl │ │ ├── update │ │ └── list.ftl │ │ └── user │ │ └── list.ftl │ └── test │ └── java │ └── com │ └── zyd │ └── blog │ └── BlogAdminApplicationTests.java ├── blog-codegen ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── zyd │ │ └── blog │ │ └── codegen │ │ └── BlogCodegenApplication.java │ └── resources │ └── template │ ├── ${table.classNameFirstLower} │ └── ${table.classNameFirstLower}.ftl │ ├── annotation.include │ ├── business │ ├── entity │ │ └── ${table.className}Bo.java │ ├── service │ │ ├── ${table.className}Service.java │ │ └── impl │ │ │ └── ${table.className}ServiceImpl.java │ └── vo │ │ └── ${table.className}ConditionVO.java │ ├── controller │ ├── RenderController.java │ └── Rest${table.className}Controller.java │ ├── java_copyright.include │ ├── macro.include │ ├── persistence │ ├── beans │ │ └── ${table.className}.java │ └── mapper │ │ ├── ${table.className}Mapper.java │ │ └── ${table.className}Mapper.xml │ └── sql │ └── update.sql ├── blog-core ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zyd │ │ │ └── blog │ │ │ ├── business │ │ │ ├── annotation │ │ │ │ ├── BussinessLog.java │ │ │ │ └── RedisCache.java │ │ │ ├── aspect │ │ │ │ ├── BussinessLogAspect.java │ │ │ │ ├── FreemarkerSharedVariableMonitorAspects.java │ │ │ │ └── RedisCacheAspect.java │ │ │ ├── consts │ │ │ │ ├── ApiUrlConst.java │ │ │ │ ├── CommonConst.java │ │ │ │ ├── DateConst.java │ │ │ │ ├── FileConst.java │ │ │ │ ├── HttpConsts.java │ │ │ │ └── SessionConst.java │ │ │ ├── dto │ │ │ │ ├── ArticleLookDtoV2.java │ │ │ │ ├── BizCommentDTO.java │ │ │ │ └── SysNoticeDTO.java │ │ │ ├── entity │ │ │ │ ├── Article.java │ │ │ │ ├── ArticleArchives.java │ │ │ │ ├── ArticleLook.java │ │ │ │ ├── ArticleLove.java │ │ │ │ ├── ArticleTags.java │ │ │ │ ├── BizAdBo.java │ │ │ │ ├── BizArticleContentBo.java │ │ │ │ ├── Comment.java │ │ │ │ ├── File.java │ │ │ │ ├── Link.java │ │ │ │ ├── Log.java │ │ │ │ ├── MailDetail.java │ │ │ │ ├── Notice.java │ │ │ │ ├── Page.java │ │ │ │ ├── Resources.java │ │ │ │ ├── Role.java │ │ │ │ ├── RoleResources.java │ │ │ │ ├── SocialConfig.java │ │ │ │ ├── Statistics.java │ │ │ │ ├── Tags.java │ │ │ │ ├── Template.java │ │ │ │ ├── Type.java │ │ │ │ ├── UpdateRecorde.java │ │ │ │ ├── User.java │ │ │ │ ├── UserPwd.java │ │ │ │ └── UserRole.java │ │ │ ├── enums │ │ │ │ ├── AdPositionEnum.java │ │ │ │ ├── AdTypeEnum.java │ │ │ │ ├── ArticleStatusEnum.java │ │ │ │ ├── BaiduPushTypeEnum.java │ │ │ │ ├── CachePrefixEnum.java │ │ │ │ ├── CommentStatusEnum.java │ │ │ │ ├── ConfigKeyEnum.java │ │ │ │ ├── ExtraCommentTypeEnum.java │ │ │ │ ├── FileUploadType.java │ │ │ │ ├── LinkSourceEnum.java │ │ │ │ ├── LinkStatusEnum.java │ │ │ │ ├── LogLevelEnum.java │ │ │ │ ├── LogTypeEnum.java │ │ │ │ ├── NoticeStatusEnum.java │ │ │ │ ├── PlatformEnum.java │ │ │ │ ├── ResourceTypeEnum.java │ │ │ │ ├── ResponseStatus.java │ │ │ │ ├── TemplateKeyEnum.java │ │ │ │ ├── UserGenderEnum.java │ │ │ │ ├── UserNotificationEnum.java │ │ │ │ ├── UserPrivacyEnum.java │ │ │ │ ├── UserStatusEnum.java │ │ │ │ └── UserTypeEnum.java │ │ │ ├── service │ │ │ │ ├── BizAdService.java │ │ │ │ ├── BizArticleArchivesService.java │ │ │ │ ├── BizArticleContentService.java │ │ │ │ ├── BizArticleLookService.java │ │ │ │ ├── BizArticleService.java │ │ │ │ ├── BizArticleTagsService.java │ │ │ │ ├── BizCommentService.java │ │ │ │ ├── BizFileService.java │ │ │ │ ├── BizPageService.java │ │ │ │ ├── BizStatisticsService.java │ │ │ │ ├── BizTagsService.java │ │ │ │ ├── BizTypeService.java │ │ │ │ ├── MailService.java │ │ │ │ ├── RedisService.java │ │ │ │ ├── SysConfigService.java │ │ │ │ ├── SysLinkService.java │ │ │ │ ├── SysLogService.java │ │ │ │ ├── SysNoticeService.java │ │ │ │ ├── SysResourcesService.java │ │ │ │ ├── SysRoleResourcesService.java │ │ │ │ ├── SysRoleService.java │ │ │ │ ├── SysSocialConfigService.java │ │ │ │ ├── SysTemplateService.java │ │ │ │ ├── SysUpdateRecordeService.java │ │ │ │ ├── SysUserRoleService.java │ │ │ │ ├── SysUserService.java │ │ │ │ └── impl │ │ │ │ │ ├── BizAdServiceImpl.java │ │ │ │ │ ├── BizArticleArchivesServiceImpl.java │ │ │ │ │ ├── BizArticleContentServiceImpl.java │ │ │ │ │ ├── BizArticleLookServiceImpl.java │ │ │ │ │ ├── BizArticleServiceImpl.java │ │ │ │ │ ├── BizArticleTagsServiceImpl.java │ │ │ │ │ ├── BizCommentServiceImpl.java │ │ │ │ │ ├── BizFileServiceImpl.java │ │ │ │ │ ├── BizPageServiceImpl.java │ │ │ │ │ ├── BizStatisticsServiceImpl.java │ │ │ │ │ ├── BizTagsServiceImpl.java │ │ │ │ │ ├── BizTypeServiceImpl.java │ │ │ │ │ ├── MailServiceImpl.java │ │ │ │ │ ├── RedisServiceImpl.java │ │ │ │ │ ├── SysConfigServiceImpl.java │ │ │ │ │ ├── SysLinkServiceImpl.java │ │ │ │ │ ├── SysLogServiceImpl.java │ │ │ │ │ ├── SysNoticeServiceImpl.java │ │ │ │ │ ├── SysResourcesServiceImpl.java │ │ │ │ │ ├── SysRoleResourcesServiceImpl.java │ │ │ │ │ ├── SysRoleServiceImpl.java │ │ │ │ │ ├── SysSocialConfigServiceImpl.java │ │ │ │ │ ├── SysTemplateServiceImpl.java │ │ │ │ │ ├── SysUpdateRecordeServiceImpl.java │ │ │ │ │ ├── SysUserRoleServiceImpl.java │ │ │ │ │ └── SysUserServiceImpl.java │ │ │ ├── util │ │ │ │ ├── BaiduPushUtil.java │ │ │ │ ├── ImageDownloadUtil.java │ │ │ │ ├── LinksUtil.java │ │ │ │ └── WebSpiderUtils.java │ │ │ └── vo │ │ │ │ ├── ArticleConditionVO.java │ │ │ │ ├── ArticleLookConditionVO.java │ │ │ │ ├── ArticleLoveConditionVO.java │ │ │ │ ├── ArticleTagsConditionVO.java │ │ │ │ ├── BizAdConditionVO.java │ │ │ │ ├── CommentConditionVO.java │ │ │ │ ├── FileConditionVO.java │ │ │ │ ├── LinkConditionVO.java │ │ │ │ ├── LogConditionVO.java │ │ │ │ ├── NoticeConditionVO.java │ │ │ │ ├── PageConditionVO.java │ │ │ │ ├── ResourceConditionVO.java │ │ │ │ ├── RoleConditionVO.java │ │ │ │ ├── SocialConfigConditionVO.java │ │ │ │ ├── TagsConditionVO.java │ │ │ │ ├── TemplateConditionVO.java │ │ │ │ ├── TypeConditionVO.java │ │ │ │ ├── UpdateRecordeConditionVO.java │ │ │ │ └── UserConditionVO.java │ │ │ ├── framework │ │ │ ├── advice │ │ │ │ ├── ErrorPagesController.java │ │ │ │ └── ExceptionHandleController.java │ │ │ ├── config │ │ │ │ ├── AsyncConfig.java │ │ │ │ ├── ErrorPagesConfig.java │ │ │ │ ├── FreeMarkerConfig.java │ │ │ │ ├── MybatisConfig.java │ │ │ │ ├── RedisConfig.java │ │ │ │ ├── SchedulingConfig.java │ │ │ │ ├── TomcatConfig.java │ │ │ │ └── ValidatorConfig.java │ │ │ ├── exception │ │ │ │ ├── ZhydArticleException.java │ │ │ │ ├── ZhydCommentException.java │ │ │ │ ├── ZhydException.java │ │ │ │ ├── ZhydFileException.java │ │ │ │ └── ZhydLinkException.java │ │ │ ├── holder │ │ │ │ ├── RequestHolder.java │ │ │ │ └── SpringContextHolder.java │ │ │ ├── object │ │ │ │ ├── AbstractBO.java │ │ │ │ ├── AbstractDO.java │ │ │ │ ├── AbstractService.java │ │ │ │ ├── BaseConditionVO.java │ │ │ │ ├── BaseController.java │ │ │ │ ├── PageResult.java │ │ │ │ └── ResponseVO.java │ │ │ ├── property │ │ │ │ ├── AppProperties.java │ │ │ │ ├── RedisProperties.java │ │ │ │ └── ShiroProperties.java │ │ │ ├── redis │ │ │ │ └── CustomRedisManager.java │ │ │ ├── runner │ │ │ │ └── BlogApplicationRunner.java │ │ │ └── tag │ │ │ │ ├── ArticleTags.java │ │ │ │ ├── BaseTag.java │ │ │ │ └── CustomTags.java │ │ │ ├── persistence │ │ │ ├── beans │ │ │ │ ├── BizAd.java │ │ │ │ ├── BizArticle.java │ │ │ │ ├── BizArticleArchives.java │ │ │ │ ├── BizArticleContent.java │ │ │ │ ├── BizArticleLookV2.java │ │ │ │ ├── BizArticleLove.java │ │ │ │ ├── BizArticleTags.java │ │ │ │ ├── BizComment.java │ │ │ │ ├── BizFile.java │ │ │ │ ├── BizPage.java │ │ │ │ ├── BizStatistics.java │ │ │ │ ├── BizTags.java │ │ │ │ ├── BizType.java │ │ │ │ ├── SysConfig.java │ │ │ │ ├── SysLink.java │ │ │ │ ├── SysLog.java │ │ │ │ ├── SysNotice.java │ │ │ │ ├── SysResources.java │ │ │ │ ├── SysRole.java │ │ │ │ ├── SysRoleResources.java │ │ │ │ ├── SysSocialConfig.java │ │ │ │ ├── SysTemplate.java │ │ │ │ ├── SysUpdateRecorde.java │ │ │ │ ├── SysUser.java │ │ │ │ └── SysUserRole.java │ │ │ └── mapper │ │ │ │ ├── BizAdMapper.java │ │ │ │ ├── BizAdMapper.xml │ │ │ │ ├── BizArticleArchivesMapper.java │ │ │ │ ├── BizArticleContentMapper.java │ │ │ │ ├── BizArticleLookV2Mapper.java │ │ │ │ ├── BizArticleLoveMapper.java │ │ │ │ ├── BizArticleMapper.java │ │ │ │ ├── BizArticleTagsMapper.java │ │ │ │ ├── BizCommentMapper.java │ │ │ │ ├── BizFileMapper.java │ │ │ │ ├── BizPageMapper.java │ │ │ │ ├── BizStatisticsMapper.java │ │ │ │ ├── BizTagsMapper.java │ │ │ │ ├── BizTypeMapper.java │ │ │ │ ├── SysConfigMapper.java │ │ │ │ ├── SysLinkMapper.java │ │ │ │ ├── SysLogMapper.java │ │ │ │ ├── SysNoticeMapper.java │ │ │ │ ├── SysResourceMapper.java │ │ │ │ ├── SysRoleMapper.java │ │ │ │ ├── SysRoleResourcesMapper.java │ │ │ │ ├── SysSocialConfigMapper.java │ │ │ │ ├── SysTemplateMapper.java │ │ │ │ ├── SysUpdateRecordeMapper.java │ │ │ │ ├── SysUserMapper.java │ │ │ │ └── SysUserRoleMapper.java │ │ │ ├── plugin │ │ │ ├── BaseMapper.java │ │ │ ├── file │ │ │ │ ├── BaseFileUploader.java │ │ │ │ └── GlobalFileUploader.java │ │ │ ├── kaptcha │ │ │ │ ├── Captcha.java │ │ │ │ ├── Encoder.java │ │ │ │ ├── GifCaptcha.java │ │ │ │ ├── GifEncoder.java │ │ │ │ ├── Quant.java │ │ │ │ ├── Randoms.java │ │ │ │ └── SpecCaptcha.java │ │ │ └── oauth │ │ │ │ ├── JapSocialUserServiceImpl.java │ │ │ │ └── JapUtil.java │ │ │ └── util │ │ │ ├── AesUtil.java │ │ │ ├── ArticleUtil.java │ │ │ ├── AspectUtil.java │ │ │ ├── BeanConvertUtil.java │ │ │ ├── CacheKeyUtil.java │ │ │ ├── FreeMarkerUtil.java │ │ │ ├── GetAccessTokenComponent.java │ │ │ ├── HtmlUtil.java │ │ │ ├── IpUtil.java │ │ │ ├── JsApiTicketComponent.java │ │ │ ├── Md5Util.java │ │ │ ├── PasswordUtil.java │ │ │ ├── RegexUtils.java │ │ │ ├── RequestUtil.java │ │ │ ├── RestClientUtil.java │ │ │ ├── ResultUtil.java │ │ │ ├── SessionUtil.java │ │ │ ├── UrlBuildUtil.java │ │ │ └── XssKillerUtil.java │ └── resources │ │ ├── config │ │ └── application-center.yml │ │ └── mybatis │ │ ├── BizAdMapper.xml │ │ ├── BizArticleArchivesMapper.xml │ │ ├── BizArticleContentMapper.xml │ │ ├── BizArticleLookV2Mapper.xml │ │ ├── BizArticleLoveMapper.xml │ │ ├── BizArticleMapper.xml │ │ ├── BizArticleTagsMapper.xml │ │ ├── BizCommentMapper.xml │ │ ├── BizFileMapper.xml │ │ ├── BizPageMapper.xml │ │ ├── BizStatisticsMapper.xml │ │ ├── BizTagsMapper.xml │ │ ├── BizTypeMapper.xml │ │ ├── SysConfigMapper.xml │ │ ├── SysLinkMapper.xml │ │ ├── SysNoticeMapper.xml │ │ ├── SysResourceMapper.xml │ │ ├── SysRoleMapper.xml │ │ ├── SysRoleResourcesMapper.xml │ │ ├── SysSocialConfigMapper.xml │ │ ├── SysTemplateMapper.xml │ │ ├── SysUpdateRecordeMapper.xml │ │ ├── SysUserMapper.xml │ │ └── SysUserRoleMapper.xml │ └── test │ └── java │ └── com │ └── zyd │ └── blog │ └── util │ ├── ImageDownloadUtilTest.java │ ├── PasswordUtilTest.java │ └── XssKillerTest.java ├── blog-file ├── .gitignore ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── zyd │ │ └── blog │ │ └── file │ │ ├── AliyunOssApiClient.java │ │ ├── ApiClient.java │ │ ├── BaseApiClient.java │ │ ├── FileUploader.java │ │ ├── LocalApiClient.java │ │ ├── QiniuApiClient.java │ │ ├── alioss │ │ ├── api │ │ │ └── OssApi.java │ │ └── entity │ │ │ ├── AbstractEntity.java │ │ │ ├── BucketEntity.java │ │ │ ├── CorsRoleEntity.java │ │ │ ├── ObjectsRequestEntity.java │ │ │ └── RefererEntity.java │ │ ├── entity │ │ └── VirtualFile.java │ │ ├── exception │ │ ├── GlobalFileException.java │ │ ├── LocalApiException.java │ │ ├── OssApiException.java │ │ └── QiniuApiException.java │ │ └── util │ │ ├── FileUtil.java │ │ ├── ImageUtil.java │ │ └── StreamUtil.java │ └── test │ └── java │ └── com │ └── zyd │ └── blog │ └── file │ └── OSSTest.java ├── blog-web ├── .gitignore ├── Dockerfile ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zyd │ │ │ └── blog │ │ │ ├── BlogWebApplication.java │ │ │ ├── controller │ │ │ ├── OAuthController.java │ │ │ ├── RenderController.java │ │ │ ├── RestApiController.java │ │ │ ├── RestPageController.java │ │ │ └── RestWebSiteController.java │ │ │ ├── core │ │ │ ├── WebMvcConfig.java │ │ │ ├── aspects │ │ │ │ └── ArticleLookAspects.java │ │ │ ├── intercepter │ │ │ │ └── BraumIntercepter.java │ │ │ └── schedule │ │ │ │ └── ArticleLookTask.java │ │ │ └── runner │ │ │ └── AppRunner.java │ └── resources │ │ ├── application-dev.yml │ │ ├── application.yml │ │ ├── banner.txt │ │ ├── logback-spring.xml │ │ ├── static │ │ ├── css │ │ │ ├── zhyd.comment.css │ │ │ └── zhyd.core.css │ │ ├── img │ │ │ ├── ad │ │ │ │ ├── 1519637085022.jpg │ │ │ │ ├── aliyun_sale.png │ │ │ │ ├── aliyun_sale1000-60.png │ │ │ │ └── gratuity.jpg │ │ │ ├── author.png │ │ │ ├── back-top.png │ │ │ ├── default.png │ │ │ ├── default_article_cover.jpg │ │ │ ├── defaultbanner.png │ │ │ ├── favicon.ico │ │ │ ├── forbidden.jpg │ │ │ ├── icons.png │ │ │ ├── loading.gif │ │ │ ├── loading.png │ │ │ ├── mayima.jpg │ │ │ ├── notification.png │ │ │ ├── qq_group.png │ │ │ ├── random │ │ │ │ └── user │ │ │ │ │ ├── 1.jpg │ │ │ │ │ ├── 10.jpg │ │ │ │ │ ├── 11.jpg │ │ │ │ │ ├── 12.jpg │ │ │ │ │ ├── 13.jpg │ │ │ │ │ ├── 14.jpg │ │ │ │ │ ├── 15.jpg │ │ │ │ │ ├── 16.jpg │ │ │ │ │ ├── 17.jpg │ │ │ │ │ ├── 18.jpg │ │ │ │ │ ├── 19.jpg │ │ │ │ │ ├── 2.jpg │ │ │ │ │ ├── 20.jpg │ │ │ │ │ ├── 3.jpg │ │ │ │ │ ├── 4.jpg │ │ │ │ │ ├── 5.jpg │ │ │ │ │ ├── 6.jpg │ │ │ │ │ ├── 7.jpg │ │ │ │ │ ├── 8.jpg │ │ │ │ │ └── 9.jpg │ │ │ ├── user.png │ │ │ ├── wechat_account.jpg │ │ │ ├── wrong.gif │ │ │ └── wrong.jpg │ │ └── js │ │ │ ├── zhyd.comment.js │ │ │ ├── zhyd.core.js │ │ │ └── zhyd.js │ │ └── templates │ │ ├── about.ftl │ │ ├── archives.ftl │ │ ├── article.ftl │ │ ├── common │ │ └── annotation.ftl │ │ ├── disclaimer.ftl │ │ ├── error │ │ ├── 401.ftl │ │ ├── 403.ftl │ │ ├── 404.ftl │ │ └── 500.ftl │ │ ├── guestbook.ftl │ │ ├── include │ │ └── macros.ftl │ │ ├── index.ftl │ │ ├── layout │ │ ├── footer.ftl │ │ ├── header.ftl │ │ ├── quote.ftl │ │ └── sidebar.ftl │ │ ├── links.ftl │ │ ├── recommended.ftl │ │ └── updateLog.ftl │ └── test │ └── java │ └── com │ └── zyd │ └── blog │ ├── BaseJunitTest.java │ ├── controller │ └── RestApiControllerTest.java │ └── service │ ├── BizCommentServiceImplTest.java │ └── SysConfigServiceImplTest.java ├── cli.sh ├── contribution.md ├── demo.md ├── docs ├── _media │ ├── 1601f937.png │ ├── ad │ │ ├── img1.png │ │ ├── img2.png │ │ ├── img3.png │ │ ├── img4.png │ │ └── img5.png │ ├── baidu-site.png │ ├── blog-page-baidu.png │ ├── blog-page-verify.png │ ├── blog-page-verify2.png │ ├── blog-page.png │ ├── cd37ba37.png │ ├── codegen.png │ ├── customCdnConfig.png │ ├── e922c529.png │ ├── ff9a84a3.png │ ├── img.png │ └── logo.png ├── ad │ ├── form-1.png │ ├── form-2.png │ ├── view-1.png │ ├── view-2.png │ └── 广告模板.md ├── bin │ ├── blog-admin.sh │ ├── blog-web.sh │ ├── build-docker.sh │ ├── build.sh │ ├── deploy-docker.sh │ ├── push-dev.sh │ ├── push.sh │ ├── repVersion.sh │ ├── updVersion.sh │ └── version.txt ├── db │ ├── dblog.sql │ ├── init_data.sql │ └── update.sql ├── docker │ ├── .env │ ├── docker-compose.yml │ ├── docker-compose.yml.template │ └── mysql │ │ ├── Dockerfile │ │ ├── config │ │ └── mysqld.cnf │ │ ├── dblog.sql │ │ └── init_data.sql ├── nginx │ ├── nginx-local-file-storage-443.conf │ └── nginx-local-file-storage-80.conf ├── old_css.css ├── readme.md ├── yuicompressor │ ├── gzjs.sh │ └── yuicompressor-2.4.8.jar └── 数据库支持emoji的配置.md ├── pom.xml └── update.md /.gitee/ISSUE_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | 为更快的帮您定位问题,推荐您用以下模板反馈问题: 2 | 3 | ### 1. 出现问题时,您做了哪些操作? 4 | 5 | ### 2. 在哪个步骤出现了问题? 6 | 7 | ### 3. 您希望得到什么结果? 8 | 9 | ### 4. 您实际得到什么结果? 10 | 11 | ### 5. 请附上您出现问题的整屏截图或者整个异常堆栈信息 12 | 13 | -------------------------------------------------------------------------------- /.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | [ ] 是否为解决Issue? 2 | 3 | 4 | ### 您做了哪些更新? 5 | 6 | #### 新增 7 | 8 | #### 修改 9 | 10 | #### 修复 11 | 12 | #### 其他 13 | 14 | 15 | ### 是否做了充分测试? 16 | 17 | - [ ] 是,已经做过测试,并且测试通过 18 | - [ ] 否,还没做测试,需要作者自测 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.war 15 | *.ear 16 | *.zip 17 | *.tar.gz 18 | *.rar 19 | 20 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 21 | hs_err_pid* 22 | /.idea/ 23 | *.iml 24 | *.versionsBackup 25 | /logdir_IS_UNDEFINED/ 26 | /blog-codegen/generator-output/ 27 | */target/ 28 | -------------------------------------------------------------------------------- /blog-admin/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /src/main/resources/application-prod.yml 27 | -------------------------------------------------------------------------------- /blog-admin/Dockerfile: -------------------------------------------------------------------------------- 1 | # 环境版本 2 | FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:8-8.6 3 | 4 | MAINTAINER yadong.zhang0415@gmail.com 5 | 6 | # JVM调优参数等额外参数 7 | ENV PARAMS "" 8 | 9 | ENV TZ=PRC 10 | 11 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 12 | 13 | # 指定容器端口 14 | EXPOSE 8085 15 | 16 | # 添加本地 JAR 到容器内 17 | ADD target/blog-admin.jar app.jar 18 | 19 | # 容器启动后执行的命令 20 | ENTRYPOINT ["java", "-jar","app.jar" , "-Djava.security.egd=file:/dev/./urandom","$PARAMS"] 21 | -------------------------------------------------------------------------------- /blog-admin/src/main/java/com/zyd/blog/BlogAdminApplication.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.web.servlet.ServletComponentScan; 6 | import org.springframework.transaction.annotation.EnableTransactionManagement; 7 | 8 | /** 9 | * 程序启动类 10 | * 11 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 12 | * @version 1.0 13 | * @website https://docs.zhyd.me 14 | * @date 2018/4/24 14:37 15 | * @since 1.0 16 | */ 17 | @SpringBootApplication 18 | @ServletComponentScan 19 | @EnableTransactionManagement 20 | public class BlogAdminApplication { 21 | 22 | public static void main(String[] args) { 23 | SpringApplication.run(BlogAdminApplication.class, args); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /blog-admin/src/main/java/com/zyd/blog/core/config/PageHelperConfig.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.core.config; 2 | 3 | import com.github.pagehelper.PageInterceptor; 4 | import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration; 5 | import org.apache.ibatis.session.SqlSessionFactory; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.autoconfigure.AutoConfigureAfter; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | import javax.annotation.PostConstruct; 11 | import java.util.List; 12 | 13 | /** 14 | * 解决后台分页失败的问题 15 | * 16 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 17 | * @version 1.0.0 18 | * @since 1.0.0 19 | */ 20 | @Configuration 21 | @AutoConfigureAfter(PageHelperAutoConfiguration.class) 22 | public class PageHelperConfig { 23 | @Autowired 24 | private List sqlSessionFactoryList; 25 | 26 | @PostConstruct 27 | public void addMyInterceptor() { 28 | PageInterceptor pageInterceptor = new PageInterceptor(); 29 | for (SqlSessionFactory sqlSessionFactory : sqlSessionFactoryList) { 30 | sqlSessionFactory.getConfiguration().addInterceptor(pageInterceptor); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /blog-admin/src/main/java/com/zyd/blog/core/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.core.config; 2 | 3 | import com.zyd.blog.core.interceptor.RememberAuthenticationInterceptor; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 8 | 9 | /** 10 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 11 | * @version 1.0 12 | * @website https://docs.zhyd.me 13 | * @date 2018/7/15 15:03 14 | * @since 1.0 15 | */ 16 | @Configuration 17 | public class WebMvcConfig implements WebMvcConfigurer { 18 | 19 | @Autowired 20 | private RememberAuthenticationInterceptor rememberAuthenticationInterceptor; 21 | 22 | @Override 23 | public void addInterceptors(InterceptorRegistry registry) { 24 | registry.addInterceptor(rememberAuthenticationInterceptor) 25 | .excludePathPatterns("/passport/**", "/error/**", "/assets/**", "/getKaptcha/**", "/websocket", "favicon.ico") 26 | .addPathPatterns("/**"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /blog-admin/src/main/java/com/zyd/blog/core/shiro/ShiroService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.core.shiro; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 7 | * @version 1.0 8 | * @website https://docs.zhyd.me 9 | * @date 2019/2/11 10:07 10 | * @since 1.8 11 | */ 12 | public interface ShiroService { 13 | 14 | Map loadFilterChainDefinitions(); 15 | 16 | void updatePermission(); 17 | 18 | void reloadAuthorizingByRoleId(Long roleId); 19 | } 20 | -------------------------------------------------------------------------------- /blog-admin/src/main/java/com/zyd/blog/core/websocket/config/WebSocketConfig.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.core.websocket.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.socket.server.standard.ServerEndpointExporter; 6 | 7 | /** 8 | * websocket配置类 9 | * 10 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 11 | * @version 1.0 12 | * @website https://docs.zhyd.me 13 | * @date 2018/4/18 11:48 14 | * @since 1.0 15 | */ 16 | @Configuration 17 | public class WebSocketConfig { 18 | 19 | /** 20 | * ServerEndpointExporter会自动注册使用了@ServerEndpoint注解声明的Websocket endpoint 21 | * @return 22 | */ 23 | @Bean 24 | public ServerEndpointExporter serverEndpointExporter() { 25 | return new ServerEndpointExporter(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /blog-admin/src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | # Server settings 2 | server: 3 | tomcat: 4 | basedir: /var/tmp/oneblog/blog-admin 5 | # SPRING PROFILES 6 | spring: 7 | profiles: 8 | include: [center] 9 | 10 | # logging settings 11 | logging: 12 | config: classpath:logback-spring.xml 13 | file: 14 | path: /var/tmp/oneblog/logs 15 | 16 | ####################################自定义配置########################################## 17 | app: 18 | # 是否启用kaptcha验证码 19 | enableKaptcha: ${ONEBLOG_APP_ENABLE_KAPTCHA:false} 20 | # 是否启用自动校验友情链接的功能 21 | # 请选择打开,一旦打开,每晚凌晨12点会自动检查友联,对于不包含本站链接的网站实行自动封禁 22 | # 目前暂时没实现白名单的功能 23 | enableAutoCheckLink: ${ONEBLOG_APP_ENABLE_CHECK_LINK:false} 24 | # 启用后,项目在启动时会打印数据库(Mysql和Redis)链接信息(包含密码) 25 | # 代码请参考 26 | enabledPrintConfig: ${ONEBLOG_APP_ENABLE_PRINT_CONFIG:false} 27 | # shiro配置项 28 | shiro: 29 | loginUrl: "/passport/login/" 30 | successUrl: "/" 31 | unauthorizedUrl: "/error/403" 32 | ####################################自定义配置########################################## 33 | -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/bootstrap-tagsinput-typeahead.css: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-tagsinput v0.8.0 3 | * 4 | */ 5 | 6 | .twitter-typeahead .tt-query, 7 | .twitter-typeahead .tt-hint { 8 | margin-bottom: 0; 9 | } 10 | 11 | .twitter-typeahead .tt-hint 12 | { 13 | display: none; 14 | } 15 | 16 | .tt-menu { 17 | position: absolute; 18 | top: 100%; 19 | left: 0; 20 | z-index: 1000; 21 | display: none; 22 | float: left; 23 | min-width: 160px; 24 | padding: 5px 0; 25 | margin: 2px 0 0; 26 | list-style: none; 27 | font-size: 14px; 28 | background-color: #ffffff; 29 | border: 1px solid #cccccc; 30 | border: 1px solid rgba(0, 0, 0, 0.15); 31 | border-radius: 4px; 32 | -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); 33 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); 34 | background-clip: padding-box; 35 | cursor: pointer; 36 | } 37 | 38 | .tt-suggestion { 39 | display: block; 40 | padding: 3px 20px; 41 | clear: both; 42 | font-weight: normal; 43 | line-height: 1.428571429; 44 | color: #333333; 45 | white-space: nowrap; 46 | } 47 | 48 | .tt-suggestion:hover, 49 | .tt-suggestion:focus { 50 | color: #ffffff; 51 | text-decoration: none; 52 | outline: 0; 53 | background-color: #428bca; 54 | } 55 | -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/css/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/nprogress.min.css: -------------------------------------------------------------------------------- 1 | #nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0,-4px);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/css/switchery.min.css: -------------------------------------------------------------------------------- 1 | .switchery{background-color:#fff;border:1px solid #dfdfdf;border-radius:20px;cursor:pointer;display:inline-block;height:30px;position:relative;vertical-align:middle;width:50px;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;background-clip:content-box}.switchery>small{background:#fff;border-radius:100%;box-shadow:0 1px 3px rgba(0,0,0,0.4);height:30px;position:absolute;top:0;width:30px}.switchery-small{border-radius:20px;height:20px;width:33px}.switchery-small>small{height:20px;width:20px}.switchery-large{border-radius:40px;height:40px;width:66px}.switchery-large>small{height:40px;width:40px} -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/blank.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/icheck/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/icheck/green.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/icheck/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/icheck/green@2x.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/xxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/xxx -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/ztree/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/ztree/line_conn.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/ztree/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/ztree/loading.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/cdn/ztree/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/cdn/ztree/metro.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/favicon.ico -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/icons/aliyun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/icons/local.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/loading.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE_BOTTOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE_BOTTOM.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE_TOP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_ARTICLE_TOP.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_COMMENT_BOX_TOP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_COMMENT_BOX_TOP.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_HOMEPAGE_OPEN_SCREEN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_HOMEPAGE_OPEN_SCREEN.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_HOMEPAGE_TOP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_HOMEPAGE_TOP.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_SIDEBAR_BOTTOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_SIDEBAR_BOTTOM.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/AD_SIDEBAR_TOP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/AD_SIDEBAR_TOP.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/article_scroll_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/article_scroll_type.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/article_top_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/article_top_type.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/bubbleWord.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/bubbleWord.gif -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/nav_search_word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/nav_search_word.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/other/site_annotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/other/site_annotation.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/reward/wx_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/reward/wx_code.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/reward/wx_reward_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/reward/wx_reward_code.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/reward/zfb_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/reward/zfb_code.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/selected_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/selected_mask.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/user.png -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/images/wechat_account_500x500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyd-c/OneBlog/e0a0cc89232f93a9e72c6fac32eb1e0c6c76808b/blog-admin/src/main/resources/static/assets/images/wechat_account_500x500.jpg -------------------------------------------------------------------------------- /blog-admin/src/main/resources/static/assets/js/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.11.0 - 2016-07-02 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2016 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery); -------------------------------------------------------------------------------- /blog-admin/src/main/resources/templates/other/icons.ftl: -------------------------------------------------------------------------------- 1 | <#include "/include/macros.ftl"> 2 | <@header> 3 |
4 | 5 |
6 |
7 |
8 |
9 |

Font Awesome Icons 10 | different icon design elements 11 |

12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 | 21 | <@footer> -------------------------------------------------------------------------------- /blog-admin/src/test/java/com/zyd/blog/BlogAdminApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog; 2 | 3 | import com.zyd.blog.business.enums.FileUploadType; 4 | import com.zyd.blog.file.FileUploader; 5 | import com.zyd.blog.file.entity.VirtualFile; 6 | import com.zyd.blog.plugin.file.GlobalFileUploader; 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | import org.springframework.boot.test.context.SpringBootTest; 10 | import org.springframework.test.context.junit4.SpringRunner; 11 | 12 | import java.io.File; 13 | 14 | import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; 15 | 16 | @RunWith(SpringRunner.class) 17 | @SpringBootTest(webEnvironment = RANDOM_PORT) 18 | public class BlogAdminApplicationTests { 19 | 20 | @Test 21 | public void uploadFile() { 22 | FileUploader uploader = new GlobalFileUploader(); 23 | File file = new File("C:\\Users\\yadon\\Desktop\\新建文件夹\\web-index-pc.png"); 24 | VirtualFile virtualFile = uploader.upload(file, FileUploadType.SIMPLE.getPath(), true); 25 | System.out.println(virtualFile); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blog-codegen/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | blog-codegen 7 | jar 8 | 9 | blog-codegen 10 | 代码生成工具 11 | 12 | 13 | com.zyd 14 | blog 15 | 2.3.9 16 | 17 | 18 | 19 | 20 | me.zhyd.houtu 21 | HouTu 22 | 1.0.1 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/annotation.include: -------------------------------------------------------------------------------- 1 | /** 2 | * ${table.remark} 3 | * @author generate by HouTu Generator 4 | * @version 1.0 5 | * @date ${.now?string('yyyy/MM/dd HH:mm')} 6 | * @since 1.8 7 | */ 8 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/business/service/${table.className}Service.java: -------------------------------------------------------------------------------- 1 | <#include "/blog-codegen/src/main/resources/template/java_copyright.include"/> 2 | <#assign className = table.className> 3 | <#assign classNameLower = className?uncap_first> 4 | package ${basePackage}.business.service; 5 | 6 | 7 | import ${basePackage}.framework.object.AbstractService; 8 | import ${basePackage}.business.entity.${table.className}Bo; 9 | import ${basePackage}.business.vo.${table.className}ConditionVO; 10 | import com.github.pagehelper.PageInfo; 11 | 12 | <#include "/blog-codegen/src/main/resources/template/annotation.include"/> 13 | public interface ${table.className}Service extends AbstractService<${table.className}Bo, Long> { 14 | 15 | /** 16 | * 分页查询 17 | * 18 | * @param vo 19 | * @return 20 | */ 21 | PageInfo<${table.className}Bo> findPageBreakByCondition(${table.className}ConditionVO vo); 22 | } 23 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/business/vo/${table.className}ConditionVO.java: -------------------------------------------------------------------------------- 1 | <#include "/blog-codegen/src/main/resources/template/java_copyright.include"/> 2 | <#include "/blog-codegen/src/main/resources/template/macro.include"/> 3 | package ${basePackage}.business.vo; 4 | 5 | import ${basePackage}.framework.object.BaseConditionVO; 6 | import ${basePackage}.business.entity.${table.className}Bo; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | <#assign po = table.classNameFirstLower> 10 | 11 | <#include "/blog-codegen/src/main/resources/template/annotation.include"/> 12 | @Data 13 | @EqualsAndHashCode(callSuper = false) 14 | public class ${table.className}ConditionVO extends BaseConditionVO { 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/controller/RenderController.java: -------------------------------------------------------------------------------- 1 | <#assign po = table.classNameFirstLower> 2 | 3 | ${r"@"}RequiresPermissions("${po}s") 4 | ${r"@"}BussinessLog("进入${table.remark}页面") 5 | ${r"@"}GetMapping("/${po}") 6 | public ModelAndView ${po}(Model model) { 7 | return ResultUtil.view("${po}/${po}"); 8 | } 9 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/java_copyright.include: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/macro.include: -------------------------------------------------------------------------------- 1 | <#-- 本文件包含一些公共的函数,本文件会被其它模板自动include --> 2 | 3 | <#-- 将value变成jsp el表达式,主要由于FreeMarker生成表达式不方便 --> 4 | <#macro jspEl value>${r"${"}${value}} 5 | 6 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/persistence/beans/${table.className}.java: -------------------------------------------------------------------------------- 1 | <#include "/blog-codegen/src/main/resources/template/java_copyright.include"/> 2 | <#include "/blog-codegen/src/main/resources/template/macro.include"/> 3 | <#assign className = table.className> 4 | <#assign classNameLower = className?uncap_first> 5 | package ${basePackage}.persistence.beans; 6 | 7 | import ${basePackage}.framework.object.AbstractDO; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | import javax.persistence.GeneratedValue; 12 | import javax.persistence.GenerationType; 13 | import javax.persistence.Id; 14 | import java.util.Date; 15 | 16 | <#include "/blog-codegen/src/main/resources/template/annotation.include"/> 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | public class ${table.className} extends AbstractDO{ 20 | <#list table.columns as column> 21 | <#if column.columnNameFirstLower != 'id' && column.columnNameFirstLower != 'insertTime' && column.columnNameFirstLower != 'createTime' && column.columnNameFirstLower != 'updateTime'> 22 | private ${column.possibleShortJavaType} ${column.columnNameFirstLower}; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/persistence/mapper/${table.className}Mapper.java: -------------------------------------------------------------------------------- 1 | <#include "/blog-codegen/src/main/resources/template/java_copyright.include"/> 2 | <#assign className = table.className> 3 | <#assign classNameLower = className?uncap_first> 4 | package ${basePackage}.persistence.mapper; 5 | 6 | import ${basePackage}.business.vo.${table.className}ConditionVO; 7 | import ${basePackage}.persistence.beans.${table.className}; 8 | import ${basePackage}.plugin.BaseMapper; 9 | import org.springframework.stereotype.Repository; 10 | 11 | import java.util.List; 12 | 13 | <#include "/blog-codegen/src/main/resources/template/annotation.include"/> 14 | @Repository 15 | public interface ${table.className}Mapper extends BaseMapper<${table.className}>{ 16 | 17 | /** 18 | * 分页查询 19 | * @param vo 20 | * 21 | * @return 22 | */ 23 | List<${table.className}> findPageBreakByCondition(${table.className}ConditionVO vo); 24 | } 25 | -------------------------------------------------------------------------------- /blog-codegen/src/main/resources/template/sql/update.sql: -------------------------------------------------------------------------------- 1 | <#assign po = table.classNameFirstLower> 2 | # 新添加的业务默认都归到了 【网站管理(ID:40)】节点下 3 | ## 第一条的第6个列值(40)表示 【网站管理(ID:40)】 的 ID,一般不需要修改,如果需要修改,请自行操作 4 | ## 第一条的第1个列值为这个业务功能对应权限的根 ID,建议修改为 sys_resources 表最后一条记录的 ID + 1 5 | INSERT INTO `${table.db}`.`sys_resources` VALUES (200, '${table.remark}管理', 'menu', '/${po}', '${po}s', 40, 7, 0, 1, '', now(), now()); 6 | 7 | ## 剩余4条记录的 第6个列值填写上面一条父记录的 ID,参考本例应都为200 8 | INSERT INTO `${table.db}`.`sys_resources` VALUES (201, '新增${table.remark}', 'button', NULL, '${po}:add', 200, 2, 0, 1, NULL, now(), now()); 9 | INSERT INTO `${table.db}`.`sys_resources` VALUES (202, '批量删除${table.remark}', 'button', NULL, '${po}:batchDelete', 200, 3, 0, 1, NULL, now(), now()); 10 | INSERT INTO `${table.db}`.`sys_resources` VALUES (203, '编辑${table.remark}', 'button', NULL, '${po}:edit,${po}:get', 200, 4, 0, 1, NULL, now(), now()); 11 | INSERT INTO `${table.db}`.`sys_resources` VALUES (204, '删除${table.remark}', 'button', NULL, '${po}:delete', 200, 5, 0, 1, NULL, now(), now()); 12 | -------------------------------------------------------------------------------- /blog-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/annotation/BussinessLog.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.annotation; 2 | 3 | import com.zyd.blog.business.enums.PlatformEnum; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * 日志记录、自定义注解 12 | * 13 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 14 | * @website https://docs.zhyd.me 15 | * @version 1.0 16 | * @date 2018/4/16 16:26 17 | * @since 1.0 18 | */ 19 | @Target({ElementType.METHOD}) 20 | @Retention(RetentionPolicy.RUNTIME) 21 | public @interface BussinessLog { 22 | /** 23 | * 业务的名称 24 | */ 25 | String value() default ""; 26 | 27 | /** 28 | * 平台,默认为后台管理 29 | */ 30 | PlatformEnum platform() default PlatformEnum.ADMIN; 31 | 32 | /** 33 | * 是否将当前日志记录到数据库中 34 | */ 35 | boolean save() default true; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/annotation/RedisCache.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.annotation; 2 | 3 | import java.lang.annotation.*; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | /** 7 | * Redis缓存自定义注解 8 | * 9 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 10 | * @version 1.0 11 | * @website https://docs.zhyd.me 12 | * @date 2018/4/16 16:26 13 | * @since 1.0 14 | */ 15 | @Target({ElementType.METHOD}) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Inherited 18 | public @interface RedisCache { 19 | 20 | /** 21 | * 业务的名称 22 | */ 23 | String value() default ""; 24 | 25 | /** 26 | * redis缓存的Key(默认类名-方法名-自定义key) 27 | */ 28 | String key() default ""; 29 | 30 | /** 31 | * 是否刷新缓存,默认false 32 | */ 33 | boolean flush() default false; 34 | 35 | /** 36 | * 缓存失效时间,默认30天 37 | */ 38 | long expire() default 30L; 39 | 40 | /** 41 | * 缓存时间单位,默认天 42 | */ 43 | TimeUnit unit() default TimeUnit.DAYS; 44 | 45 | /** 46 | * 是否启用缓存,默认启用 47 | */ 48 | boolean enable() default true; 49 | } 50 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/ApiUrlConst.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * 各api需要的url常量类 5 | * 6 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 7 | * @website https://docs.zhyd.me 8 | * @version 1.0 9 | * @date 2018/4/16 16:26 10 | * @since 1.0 11 | */ 12 | public class ApiUrlConst { 13 | 14 | /** 15 | * 通过百度API 根据ip获取定位的接口 16 | */ 17 | public static final String BAIDU_API_GET_LOCATION_BY_IP = "https://api.map.baidu.com/location/ip"; 18 | 19 | /** 20 | * 百度提交链接时的Url 21 | */ 22 | public static final String BAIDU_PUSH_URL = "http://data.zz.baidu.com/"; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/CommonConst.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * 程序中公用的常量类 5 | * 6 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 7 | * @version 1.0 8 | * @website https://docs.zhyd.me 9 | * @date 2018/4/16 16:26 10 | * @since 1.0 11 | */ 12 | public class CommonConst { 13 | /** 14 | * 安全密码(UUID生成),作为盐值用于用户密码的加密 15 | */ 16 | public static final String ZYD_SECURITY_KEY = "929123f8f17944e8b0a531045453e1f1"; 17 | 18 | /** 19 | * 程序默认的错误状态码 20 | */ 21 | public static final int DEFAULT_ERROR_CODE = 500; 22 | 23 | /** 24 | * 程序默认的成功状态码 25 | */ 26 | public static final int DEFAULT_SUCCESS_CODE = 200; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/DateConst.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * 日期工具用到的常量 5 | * 6 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 7 | * @website https://docs.zhyd.me 8 | * @version 1.0 9 | * @date 2018/4/16 16:26 10 | * @since 1.0 11 | */ 12 | public class DateConst { 13 | 14 | /** 15 | * yyyy-MM-dd HH:mm:ss 16 | */ 17 | public static final String YYYY_MM_DD_HH_MM_SS_EN = "yyyy-MM-dd HH:mm:ss"; 18 | 19 | /** 20 | * yyyyMMddHHmmss 21 | */ 22 | public static final String YYYYMMDDHHMMSSEN = "yyyyMMddHHmmss"; 23 | 24 | /** 25 | * yyyyMMddHHmmssSSS 26 | */ 27 | public static final String MILLISECOND = "yyyyMMddHHmmssSSS"; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/FileConst.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * 文件常量类 5 | * 6 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 7 | * @website https://docs.zhyd.me 8 | * @version 1.0 9 | * @date 2018/4/16 16:26 10 | * @since 1.0 11 | */ 12 | public class FileConst { 13 | 14 | /** 15 | * 默认图片的宽度:为一数组,如果为一个元素则必须等于该值才合格,如果为两个值,则为图片宽度应符合的区间值。元素个数最多只可为两个 16 | */ 17 | public static final int[] DEFAULT_IMG_WIDTH = {0, 1366}; 18 | 19 | /** 20 | * 默认图片的高度 21 | */ 22 | public static final int[] DEFAULT_IMG_HEIGHT = {0, 768}; 23 | 24 | /** 25 | * 默认图片的大小:单位B, 52428800B = 51200KB = 50M 26 | */ 27 | public static final int[] DEFAULT_IMG_SIZE = {1024, 52428800}; 28 | } 29 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/HttpConsts.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * 5 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 6 | * @website https://docs.zhyd.me 7 | * @version 1.0 8 | * @date 2018/4/16 16:26 9 | * @since 1.0 10 | */ 11 | public class HttpConsts { 12 | 13 | public static final String HTTP_PROROCOL = "http://"; 14 | 15 | public static final String HTTPS_PROROCOL = "https://"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/consts/SessionConst.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.consts; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public class SessionConst { 11 | /** 12 | * User 的 session key;k 13 | */ 14 | public static final String USER_SESSION_KEY = "user"; 15 | 16 | /** 17 | * kaptcha 的 session key 18 | */ 19 | public final static String KAPTCHA_SESSION_KEY = "KAPTCHA_SESSION_KEY"; 20 | } 21 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/dto/ArticleLookDtoV2.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.dto; 2 | 3 | import com.zyd.blog.persistence.beans.BizArticleLookV2; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ArticleLookDtoV2 extends BizArticleLookV2 { 8 | private String articleName; 9 | } 10 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/dto/SysNoticeDTO.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.dto; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 系统通知详情,用于页面传输 7 | * 8 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 9 | * @website https://docs.zhyd.me 10 | * @version 1.0 11 | * @date 2018/4/16 16:26 12 | * @since 1.0 13 | */ 14 | @Data 15 | public class SysNoticeDTO { 16 | private String title; 17 | private String content; 18 | } 19 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/entity/Statistics.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.zyd.blog.persistence.beans.BizStatistics; 5 | 6 | /** 7 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 8 | * @version 1.0 9 | * @website https://docs.zhyd.me 10 | * @date 2018/4/16 16:26 11 | * @since 1.0 12 | */ 13 | public class Statistics { 14 | 15 | private BizStatistics bizStatistics; 16 | 17 | public Statistics(BizStatistics bizStatistics) { 18 | this.bizStatistics = bizStatistics; 19 | } 20 | 21 | public Statistics() { 22 | } 23 | 24 | @JsonIgnore 25 | public BizStatistics getBizStatistics() { 26 | return bizStatistics; 27 | } 28 | 29 | public String getName() { 30 | return this.bizStatistics.getName(); 31 | } 32 | 33 | public void setName(String name) { 34 | this.bizStatistics.setName(name); 35 | } 36 | 37 | public Integer getValue() { 38 | return this.bizStatistics.getValue(); 39 | } 40 | 41 | public void setValue(Integer value) { 42 | this.bizStatistics.setValue(value); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/entity/UserPwd.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.entity; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import org.hibernate.validator.constraints.Length; 6 | 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 11 | * @version 1.0 12 | * @website https://docs.zhyd.me 13 | * @date 2018/6/6 16:34 14 | * @since 1.0 15 | */ 16 | @Data 17 | @EqualsAndHashCode(callSuper = false) 18 | public class UserPwd { 19 | @NotNull(message = "用户ID不可为空") 20 | private Long id; 21 | @NotNull(message = "原密码不可为空") 22 | private String password; 23 | @NotNull(message = "新密码不可为空") 24 | @Length(max = 20, min = 6, message = "新密码长度建议保持在6~20个字符以内") 25 | private String newPassword; 26 | @NotNull(message = "新密码不可为空") 27 | @Length(max = 20, min = 6, message = "新密码长度建议保持在6~20个字符以内") 28 | private String newPasswordRepeat; 29 | } 30 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/AdTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | import java.util.HashMap; 7 | import java.util.LinkedList; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * 广告类型 13 | * 14 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 15 | * @version 1.0.0 16 | * @since 1.0.0 17 | */ 18 | @Getter 19 | @AllArgsConstructor 20 | public enum AdTypeEnum { 21 | 22 | /** 23 | * 24 | */ 25 | IMG("图片"), 26 | POP("弹窗"), 27 | /** 28 | * 第三方的广告 29 | */ 30 | JS("JS"), 31 | TXT("纯文本"), 32 | ARTICLE("文章") 33 | ; 34 | 35 | private String desc; 36 | 37 | public static List> toListMap() { 38 | AdTypeEnum[] adTypeEnums = AdTypeEnum.values(); 39 | List> res = new LinkedList<>(); 40 | Map map = null; 41 | for (AdTypeEnum adTypeEnum : adTypeEnums) { 42 | map = new HashMap<>(); 43 | map.put("name", adTypeEnum.name()); 44 | map.put("desc", adTypeEnum.getDesc()); 45 | res.add(map); 46 | } 47 | return res; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/ArticleStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum ArticleStatusEnum { 11 | PUBLISHED(1, "发布"), 12 | UNPUBLISHED(0, "草稿"); 13 | private int code; 14 | private String desc; 15 | 16 | ArticleStatusEnum(int code, String desc) { 17 | this.code = code; 18 | this.desc = desc; 19 | } 20 | 21 | public static ArticleStatusEnum get(Integer code) { 22 | if (code == null) { 23 | return UNPUBLISHED; 24 | } 25 | ArticleStatusEnum[] statusEnums = ArticleStatusEnum.values(); 26 | for (ArticleStatusEnum statusEnum : statusEnums) { 27 | if (statusEnum.getCode() == code) { 28 | return statusEnum; 29 | } 30 | } 31 | return UNPUBLISHED; 32 | } 33 | 34 | public int getCode() { 35 | return code; 36 | } 37 | 38 | public String getDesc() { 39 | return desc; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/BaiduPushTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum BaiduPushTypeEnum { 11 | // urls: 推送, update: 更新, del: 删除 12 | urls, update, del 13 | } 14 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/CachePrefixEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @version 1.0 6 | * @date 2018/7/15 22:00 7 | * @since 1.0 8 | */ 9 | public enum CachePrefixEnum { 10 | 11 | BIZ("biz_cache_"), 12 | VIEW("view_cache_"), 13 | DDOS("ddos_cache_"), 14 | WX("wx_api_cache_"), 15 | SPIDER("spider_cache_"), 16 | ; 17 | private String prefix; 18 | 19 | CachePrefixEnum(String prefix) { 20 | this.prefix = prefix; 21 | } 22 | 23 | public String getPrefix() { 24 | return prefix; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/CommentStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum CommentStatusEnum { 11 | VERIFYING("正在审核"), 12 | APPROVED("审核通过"), 13 | REJECT("审核失败"), 14 | DELETED("已删除"); 15 | private String desc; 16 | 17 | CommentStatusEnum(String desc) { 18 | this.desc = desc; 19 | } 20 | 21 | public String getDesc() { 22 | return desc; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/FileUploadType.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @version 1.0 6 | * @website https://docs.zhyd.me 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum FileUploadType { 11 | COMMON("oneblog/"), 12 | QRCODE("oneblog/qrcode/"), 13 | SIMPLE("oneblog/article/"), 14 | COVER_IMAGE("oneblog/cover/"); 15 | 16 | private String path; 17 | 18 | FileUploadType(String path) { 19 | this.path = path; 20 | } 21 | 22 | public String getPath() { 23 | return path; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/LinkSourceEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum LinkSourceEnum { 11 | 12 | AUTOMATIC("自动申请"), 13 | ADMIN("管理员添加"), 14 | OTHER("其他"); 15 | private String desc; 16 | 17 | LinkSourceEnum(String desc) { 18 | this.desc = desc; 19 | } 20 | 21 | public String getDesc() { 22 | return desc; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/LinkStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum LinkStatusEnum { 11 | ENABLE("可用"), 12 | DISABLE("禁用"); 13 | private String desc; 14 | 15 | LinkStatusEnum(String desc) { 16 | this.desc = desc; 17 | } 18 | 19 | public String getDesc() { 20 | return desc; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/LogLevelEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum LogLevelEnum { 11 | ERROR, WARN, INFO, DEBUG 12 | } 13 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/LogTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum LogTypeEnum { 11 | SYSTEM,VISIT,ERROR 12 | } 13 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/NoticeStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum NoticeStatusEnum { 11 | RELEASE("已发布"), 12 | NOT_RELEASE("未发布"); 13 | private String desc; 14 | 15 | NoticeStatusEnum(String desc) { 16 | this.desc = desc; 17 | } 18 | 19 | public String getDesc() { 20 | return desc; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/PlatformEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @version 1.0 6 | * @date 2018/5/7 15:16 7 | * @since 1.0 8 | */ 9 | public enum PlatformEnum { 10 | ADMIN, WEB 11 | } 12 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/ResourceTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum ResourceTypeEnum { 11 | menu("菜单"), button("按钮"); 12 | 13 | private final String info; 14 | 15 | private ResourceTypeEnum(String info) { 16 | this.info = info; 17 | } 18 | 19 | public String getInfo() { 20 | return info; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/ResponseStatus.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum ResponseStatus { 11 | 12 | SUCCESS(200, "操作成功!"), 13 | ERROR(500, "服务器未知错误!"), 14 | INVALID_PARAMS(500, "操作失败,无效的参数,请检查参数格式、类型是否正确!"), 15 | UPLOAD_FILE_ERROR(500, "文件上传失败!"), 16 | ; 17 | 18 | private Integer code; 19 | private String message; 20 | 21 | ResponseStatus(Integer code, String message) { 22 | this.code = code; 23 | this.message = message; 24 | } 25 | 26 | public static ResponseStatus getResponseStatus(String message) { 27 | for (ResponseStatus ut : ResponseStatus.values()) { 28 | if (ut.getMessage() == message) { 29 | return ut; 30 | } 31 | } 32 | return null; 33 | } 34 | 35 | public Integer getCode() { 36 | return code; 37 | } 38 | 39 | public String getMessage() { 40 | return message; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/TemplateKeyEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum TemplateKeyEnum { 11 | TM_SITEMAP_XML, 12 | TM_SITEMAP_TXT, 13 | TM_SITEMAP_HTML, 14 | TM_ROBOTS, 15 | TM_LINKS, 16 | TM_LINKS_TO_ADMIN, 17 | TM_EMAIL, 18 | TM_COMMENT_AUDIT, 19 | TM_COMMENT_REPLY, 20 | TM_NEW_COMMENT 21 | } 22 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/UserNotificationEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum UserNotificationEnum { 11 | DETAIL(1, "通知显示消息详情"), 12 | TITLE(2, "通知不显示消息详情"),; 13 | private Integer code; 14 | private String desc; 15 | 16 | UserNotificationEnum(Integer code, String desc) { 17 | this.code = code; 18 | this.desc = desc; 19 | } 20 | 21 | public static UserNotificationEnum get(Integer code) { 22 | if (null == code) { 23 | return DETAIL; 24 | } 25 | UserNotificationEnum[] enums = UserNotificationEnum.values(); 26 | for (UserNotificationEnum anEnum : enums) { 27 | if (anEnum.getCode().equals(code)) { 28 | return anEnum; 29 | } 30 | } 31 | return DETAIL; 32 | } 33 | 34 | public Integer getCode() { 35 | return code; 36 | } 37 | 38 | public String getDesc() { 39 | return desc; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/UserPrivacyEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum UserPrivacyEnum { 11 | PUBLIC(1, "公开"), 12 | PRIVATE(2, "不公开"),; 13 | private Integer code; 14 | private String desc; 15 | 16 | UserPrivacyEnum(Integer code, String desc) { 17 | this.code = code; 18 | this.desc = desc; 19 | } 20 | 21 | public static UserPrivacyEnum get(Integer code) { 22 | if (null == code) { 23 | return PUBLIC; 24 | } 25 | UserPrivacyEnum[] enums = UserPrivacyEnum.values(); 26 | for (UserPrivacyEnum anEnum : enums) { 27 | if (anEnum.getCode().equals(code)) { 28 | return anEnum; 29 | } 30 | } 31 | return PUBLIC; 32 | } 33 | 34 | public Integer getCode() { 35 | return code; 36 | } 37 | 38 | public String getDesc() { 39 | return desc; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/enums/UserStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.enums; 2 | 3 | /** 4 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 5 | * @website https://docs.zhyd.me 6 | * @version 1.0 7 | * @date 2018/4/16 16:26 8 | * @since 1.0 9 | */ 10 | public enum UserStatusEnum { 11 | NORMAL(1, "正常"), 12 | DISABLE(0, "禁用"),; 13 | private Integer code; 14 | private String desc; 15 | 16 | UserStatusEnum(Integer code, String desc) { 17 | this.code = code; 18 | this.desc = desc; 19 | } 20 | 21 | public static UserStatusEnum get(Integer code) { 22 | if (null == code) { 23 | return NORMAL; 24 | } 25 | UserStatusEnum[] enums = UserStatusEnum.values(); 26 | for (UserStatusEnum anEnum : enums) { 27 | if (anEnum.getCode().equals(code)) { 28 | return anEnum; 29 | } 30 | } 31 | return NORMAL; 32 | } 33 | 34 | public Integer getCode() { 35 | return code; 36 | } 37 | 38 | public String getDesc() { 39 | return desc; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizAdService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.zyd.blog.business.service; 3 | 4 | 5 | import com.zyd.blog.business.enums.AdPositionEnum; 6 | import com.zyd.blog.framework.object.AbstractService; 7 | import com.zyd.blog.business.entity.BizAdBo; 8 | import com.zyd.blog.business.vo.BizAdConditionVO; 9 | import com.github.pagehelper.PageInfo; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * 15 | * 16 | * @author generate by HouTu Generator 17 | * @version 1.0 18 | * @date 2021/10/27 16:43 19 | * @since 1.8 20 | */ 21 | public interface BizAdService extends AbstractService { 22 | 23 | /** 24 | * 分页查询 25 | * 26 | * @param vo 27 | * @return 28 | */ 29 | PageInfo findPageBreakByCondition(BizAdConditionVO vo); 30 | 31 | BizAdBo getByPosition(AdPositionEnum positionEnum); 32 | 33 | List listArticleAds(); 34 | } 35 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizArticleArchivesService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * 归档目录 8 | * 9 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 10 | * @version 1.0 11 | * @website https://docs.zhyd.me 12 | * @date 2018/4/16 16:26 13 | * @since 1.0 14 | */ 15 | public interface BizArticleArchivesService { 16 | 17 | /** 18 | * 获取归档目录列表 19 | * 20 | * @return 21 | */ 22 | Map listArchives(); 23 | } 24 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizArticleContentService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.zyd.blog.business.entity.BizArticleContentBo; 5 | import com.zyd.blog.framework.object.AbstractService; 6 | 7 | /** 8 | * @author generate by HouTu Generator 9 | * @version 1.0 10 | * @date 2025/02/26 23:48 11 | * @since 1.8 12 | */ 13 | public interface BizArticleContentService extends AbstractService { 14 | 15 | void removeByArticleId(long articleId); 16 | } 17 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizArticleLookService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.zyd.blog.business.entity.ArticleLook; 5 | 6 | /** 7 | * 文章浏览记录 8 | * 9 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 10 | * @version 1.0 11 | * @website https://docs.zhyd.me 12 | * @date 2018/4/16 16:26 13 | * @since 1.0 14 | */ 15 | public interface BizArticleLookService { 16 | 17 | void increment(Long articleId); 18 | 19 | void removeByArticleId(Long articleId); 20 | 21 | boolean removeByPrimaryKey(Long primaryKey); 22 | } 23 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizArticleTagsService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.zyd.blog.business.entity.ArticleTags; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 文章标签 10 | * 11 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 12 | * @version 1.0 13 | * @website https://docs.zhyd.me 14 | * @date 2018/4/16 16:26 15 | * @since 1.0 16 | */ 17 | public interface BizArticleTagsService { 18 | 19 | int removeByArticleId(Long articleId); 20 | 21 | void insertList(Long[] tagIds, Long articleId); 22 | 23 | ArticleTags insert(ArticleTags entity); 24 | 25 | void insertList(List entities); 26 | } 27 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizFileService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.File; 6 | import com.zyd.blog.business.vo.FileConditionVO; 7 | import com.zyd.blog.framework.object.AbstractService; 8 | import org.springframework.web.multipart.MultipartFile; 9 | 10 | /** 11 | * @author innodev java team 12 | * @version 1.0 13 | * @date 2018/12/14 09:23 14 | * @since 1.8 15 | */ 16 | public interface BizFileService extends AbstractService { 17 | 18 | PageInfo findPageBreakByCondition(FileConditionVO vo); 19 | 20 | File selectFileByPathAndUploadType(String filePath, String uploadType); 21 | 22 | void remove(Long[] ids); 23 | 24 | int upload(MultipartFile[] file); 25 | } 26 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizPageService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Powered By [rapid-framework] 3 | * Web Site: http://www.rapid-framework.org.cn 4 | * Google Code: http://code.google.com/p/rapid-framework/ 5 | * Since 2008 - 2021 6 | */ 7 | package com.zyd.blog.business.service; 8 | 9 | 10 | import com.zyd.blog.framework.object.AbstractService; 11 | import com.zyd.blog.business.entity.Page; 12 | import com.zyd.blog.business.vo.PageConditionVO; 13 | import com.github.pagehelper.PageInfo; 14 | 15 | /** 16 | * @author yadong.zhang email:yadong.zhang(a)innodev.com.cn 17 | * @version 1.0 18 | * @date 2021/10/23 00:19 19 | * @since 1.0 20 | */ 21 | public interface BizPageService extends AbstractService { 22 | 23 | /** 24 | * 分页查询 25 | * 26 | * @param vo 27 | * @return 28 | */ 29 | PageInfo findPageBreakByCondition(PageConditionVO vo); 30 | 31 | Page getByUrl(String url); 32 | } 33 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizStatisticsService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | import com.zyd.blog.business.entity.Article; 4 | import com.zyd.blog.business.entity.Statistics; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 统计 10 | * 11 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 12 | * @version 1.0 13 | * @website https://docs.zhyd.me 14 | * @date 2018/4/16 16:26 15 | * @since 1.0 16 | */ 17 | public interface BizStatisticsService { 18 | /** 19 | * 获取热门文章 20 | * 21 | * @return 22 | */ 23 | List
listHotArticle(int pageSize); 24 | 25 | /** 26 | * 获取爬虫统计 27 | * 28 | * @return 29 | */ 30 | List listSpider(int pageSize); 31 | 32 | /** 33 | * 获取文章分类统计 34 | * 35 | * @return 36 | */ 37 | List listType(int pageSize); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizTagsService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.Tags; 6 | import com.zyd.blog.business.vo.TagsConditionVO; 7 | import com.zyd.blog.framework.object.AbstractService; 8 | 9 | /** 10 | * 标签 11 | * 12 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 13 | * @version 1.0 14 | * @website https://docs.zhyd.me 15 | * @date 2018/4/16 16:26 16 | * @since 1.0 17 | */ 18 | public interface BizTagsService extends AbstractService { 19 | 20 | PageInfo findPageBreakByCondition(TagsConditionVO vo); 21 | 22 | Tags getByName(String name); 23 | } 24 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/BizTypeService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.zyd.blog.framework.object.AbstractService; 5 | import com.zyd.blog.business.entity.Type; 6 | import com.zyd.blog.business.vo.TypeConditionVO; 7 | import com.github.pagehelper.PageInfo; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * 分类 13 | * 14 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 15 | * @version 1.0 16 | * @website https://docs.zhyd.me 17 | * @date 2018/4/16 16:26 18 | * @since 1.0 19 | */ 20 | public interface BizTypeService extends AbstractService { 21 | 22 | /** 23 | * 分页查询 24 | * 25 | * @param vo 26 | * @return 27 | */ 28 | PageInfo findPageBreakByCondition(TypeConditionVO vo); 29 | 30 | List listParent(); 31 | 32 | List listTypeForMenu(); 33 | 34 | List listTypeByPosition(String position); 35 | } 36 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/RedisService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | import java.util.List; 4 | import java.util.Set; 5 | import java.util.concurrent.TimeUnit; 6 | 7 | /** 8 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 9 | * @website https://docs.zhyd.me 10 | * @version 1.0 11 | * @date 2018/4/16 16:26 12 | * @since 1.0 13 | */ 14 | public interface RedisService { 15 | void set(String key, T value); 16 | 17 | void set(String key, T value, long expire, TimeUnit timeUnit); 18 | 19 | T get(String key); 20 | 21 | boolean expire(String key, long expire); 22 | 23 | void del(String key); 24 | 25 | void delBatch(Set keys); 26 | 27 | void delBatch(String keyPrefix); 28 | 29 | void setList(String key, List list); 30 | 31 | void setList(String key, List list, long expire, TimeUnit timeUnit); 32 | 33 | List getList(String key, Class clz); 34 | 35 | boolean hasKey(String key); 36 | 37 | long getExpire(String key); 38 | 39 | Set keySet(String keyPrefix); 40 | } 41 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysLogService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.Log; 6 | import com.zyd.blog.business.enums.PlatformEnum; 7 | import com.zyd.blog.business.vo.LogConditionVO; 8 | import com.zyd.blog.framework.object.AbstractService; 9 | import org.springframework.web.context.request.ServletRequestAttributes; 10 | 11 | /** 12 | * @author yadong.zhang email:yadong.zhang0415(a)gmail.com 13 | * @version 1.0 14 | * @date 2018/01/09 17:40 15 | * @since 1.0 16 | */ 17 | public interface SysLogService extends AbstractService { 18 | 19 | /** 20 | * 分页查询 21 | * 22 | * @param vo 23 | * @return 24 | */ 25 | PageInfo findPageBreakByCondition(LogConditionVO vo); 26 | 27 | void asyncSaveSystemLog(PlatformEnum platform, String bussinessName, ServletRequestAttributes servletRequestAttributes); 28 | } 29 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysNoticeService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.dto.SysNoticeDTO; 6 | import com.zyd.blog.business.entity.Notice; 7 | import com.zyd.blog.business.vo.NoticeConditionVO; 8 | import com.zyd.blog.framework.object.AbstractService; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * 系统通知 14 | * 15 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 16 | * @version 1.0 17 | * @website https://docs.zhyd.me 18 | * @date 2018/4/16 16:26 19 | * @since 1.0 20 | */ 21 | public interface SysNoticeService extends AbstractService { 22 | 23 | /** 24 | * 分页查询 25 | * 26 | * @param vo 27 | * @return 28 | */ 29 | PageInfo findPageBreakByCondition(NoticeConditionVO vo); 30 | 31 | /** 32 | * 获取已发布的通知列表 33 | * 34 | * @return 35 | */ 36 | List listRelease(); 37 | } 38 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysRoleResourcesService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.zyd.blog.business.entity.RoleResources; 5 | import com.zyd.blog.framework.object.AbstractService; 6 | 7 | /** 8 | * 角色资源 9 | * 10 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 11 | * @version 1.0 12 | * @website https://docs.zhyd.me 13 | * @date 2018/4/16 16:26 14 | * @since 1.0 15 | */ 16 | public interface SysRoleResourcesService extends AbstractService { 17 | 18 | /** 19 | * 添加角色资源 20 | * 21 | * @param roleId 22 | * @param resourcesId 23 | */ 24 | void addRoleResources(Long roleId, String resourcesId); 25 | 26 | /** 27 | * 通过角色id批量删除 28 | * 29 | * @param roleId 30 | */ 31 | void removeByRoleId(Long roleId); 32 | } 33 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysRoleService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.Role; 6 | import com.zyd.blog.business.vo.RoleConditionVO; 7 | import com.zyd.blog.framework.object.AbstractService; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * 角色 14 | * 15 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 16 | * @version 1.0 17 | * @website https://docs.zhyd.me 18 | * @date 2018/4/16 16:26 19 | * @since 1.0 20 | */ 21 | public interface SysRoleService extends AbstractService { 22 | 23 | /** 24 | * 获取ztree使用的角色列表 25 | * 26 | * @param uid 27 | * @return 28 | */ 29 | List> queryRoleListWithSelected(Integer uid); 30 | 31 | /** 32 | * 分页查询 33 | * 34 | * @param vo 35 | * @return 36 | */ 37 | PageInfo findPageBreakByCondition(RoleConditionVO vo); 38 | 39 | /** 40 | * 获取用户的角色 41 | * 42 | * @param userId 43 | * @return 44 | */ 45 | List listRolesByUserId(Long userId); 46 | } 47 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysSocialConfigService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.SocialConfig; 6 | import com.zyd.blog.business.vo.SocialConfigConditionVO; 7 | import com.zyd.blog.framework.object.AbstractService; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author yadong.zhang email:yadong.zhang(a)innodev.com.cn 13 | * @version 1.0 14 | * @date 2021/04/27 14:34 15 | * @since 1.0 16 | */ 17 | public interface SysSocialConfigService extends AbstractService { 18 | 19 | PageInfo findPageBreakByCondition(SocialConfigConditionVO vo); 20 | 21 | SocialConfig getByClientId(String clientId); 22 | 23 | SocialConfig getByPlatform(String platform); 24 | 25 | List listAvailable(); 26 | } 27 | -------------------------------------------------------------------------------- /blog-core/src/main/java/com/zyd/blog/business/service/SysTemplateService.java: -------------------------------------------------------------------------------- 1 | package com.zyd.blog.business.service; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.zyd.blog.business.entity.Template; 6 | import com.zyd.blog.business.enums.TemplateKeyEnum; 7 | import com.zyd.blog.business.vo.TemplateConditionVO; 8 | import com.zyd.blog.framework.object.AbstractService; 9 | 10 | /** 11 | * 系统模板 12 | * 13 | * @author yadong.zhang (yadong.zhang0415(a)gmail.com) 14 | * @version 1.0 15 | * @website https://docs.zhyd.me 16 | * @date 2018/4/16 16:26 17 | * @since 1.0 18 | */ 19 | public interface SysTemplateService extends AbstractService { 20 | 21 | /** 22 | * 分页查询 23 | * 24 | * @param vo 25 | * @return 26 | */ 27 | PageInfo