${article.title}
++ ${article.title} +
++ 作者:${article.admin.name} 发布日期:${article.updateTime?string('yyyy-MM-dd')} +
${article.content} +
From 2237b2934a1078ba1624d2f56c43128581667447 Mon Sep 17 00:00:00 2001 From: GunnyZeng <240577295@qq.com> Date: Tue, 18 Oct 2016 12:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shamrock/cms/service/ArticleService.java | 1 + .../static/template/blog/article/index.ftl | 42 ++++++++++---- .../WEB-INF/static/template/blog/footer.ftl | 12 ++++ .../WEB-INF/static/template/blog/header.ftl | 2 +- .../WEB-INF/static/template/blog/sidebar.ftl | 56 ++++++++++--------- 5 files changed, 74 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/shamrock/cms/service/ArticleService.java b/src/main/java/com/shamrock/cms/service/ArticleService.java index 30ef222..a5608ff 100644 --- a/src/main/java/com/shamrock/cms/service/ArticleService.java +++ b/src/main/java/com/shamrock/cms/service/ArticleService.java @@ -231,6 +231,7 @@ public class ArticleService { public ArticleVo getArticleById(long articleId) throws ArticleNotFoundException { ArticleVo articleVo = articleDao.getArticleById(articleId); + articleVo.setAdmin(adminService.getAdminById(articleVo.getAdminId())); if (articleVo == null) { throw new ArticleNotFoundException(articleId + " 文件,不存在"); diff --git a/src/main/webapp/WEB-INF/static/template/blog/article/index.ftl b/src/main/webapp/WEB-INF/static/template/blog/article/index.ftl index aa2df30..1bc4d1e 100644 --- a/src/main/webapp/WEB-INF/static/template/blog/article/index.ftl +++ b/src/main/webapp/WEB-INF/static/template/blog/article/index.ftl @@ -9,14 +9,15 @@
${article.title}
++ ${article.title} +
++ 作者:${article.admin.name} 发布日期:${article.updateTime?string('yyyy-MM-dd')} +
${article.content} +