提交 2392779f 编写于 作者: 智布道's avatar 智布道 👁

🐛 Fixing a bug.

上级 d8e91298
......@@ -89,9 +89,9 @@ public class BizArticleServiceImpl implements BizArticleService {
BizArticle tagArticle = tagMap.get(bizArticle.getId());
if (null == tagArticle) {
log.warn("文章[{}] 未绑定标签信息,或者已绑定的标签不存在!", bizArticle.getTitle());
continue;
} else {
bizArticle.setTags(tagArticle.getTags());
}
bizArticle.setTags(tagArticle.getTags());
this.subquery(bizArticle);
boList.add(new Article(bizArticle));
}
......
......@@ -158,7 +158,7 @@
biz_article a
INNER JOIN biz_type btype ON a.type_id = btype.id
INNER JOIN biz_article_tags atag ON a.id = atag.article_id
INNER JOIN biz_tags t ON atag.tag_id = t.id
LEFT JOIN biz_tags t ON atag.tag_id = t.id
WHERE
a.id = #{id}
</select>
......
......@@ -186,7 +186,7 @@ public class RenderController {
public ModelAndView article(Model model, @PathVariable("articleId") Long articleId) {
Article article = bizArticleService.getByPrimaryKey(articleId);
if (article == null || ArticleStatusEnum.UNPUBLISHED.getCode() == article.getStatusEnum().getCode()) {
return ResultUtil.redirect("/error/404");
return ResultUtil.forward("/error/404");
}
model.addAttribute("article", article);
// 上一篇下一篇
......
......@@ -315,9 +315,10 @@ blockquote {
.blog-info-body p {
text-indent: 0;
line-height: 1.5;
margin: .8em 0 !important;
color: #1c1f21;
color: rgb(28, 31, 33);
overflow-x: auto;
margin: 0.8em 0 !important;
padding: 10px 0;
}
.blog-info-body table {
......
......@@ -74,9 +74,13 @@
<ul class="list-unstyled">
<li>
<strong>本文标签:</strong>
<#list article.tags as item>
<a href="${config.siteUrl}/tag/${item.id?c}" class="c-label" data-original-title="${item.name}" data-toggle="tooltip" data-placement="bottom" target="_blank">${item.name}</a>
</#list>
<#if article.tags?? && article.tags?size gt 0>
<#list article.tags as item>
<a href="${config.siteUrl}/tag/${item.id?c}" class="c-label" data-original-title="${item.name}" data-toggle="tooltip" data-placement="bottom" target="_blank">${item.name}</a>
</#list>
<#else>
<a href="javascript:;;" class="c-label" data-original-title="暂无相关标签" data-toggle="tooltip" data-placement="bottom" target="_blank">暂无相关标签</a>
</#if>
</li>
<li>
<strong>版权声明:</strong>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册