👽 代码优化

pull/21/head
ruibaby 2018-07-18 22:35:23 +08:00
parent a78ce161da
commit 0c3d0e2327
2 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package cc.ryanc.halo.model.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
@ -54,7 +55,6 @@ public class Post implements Serializable {
* Markdown
*/
@Lob
@JsonIgnore
private String postContentMd;
/**
@ -130,4 +130,14 @@ public class Post implements Serializable {
*
*/
private Integer allowComment = 0;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
public Date getPostDate() {
return postDate;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
public Date getPostUpdate() {
return postUpdate;
}
}

View File

@ -53,9 +53,9 @@
<td>${comment.commentContent}</td>
<td>
<#if comment.post.postType == "post">
<a target="_blank" href="/archives/${comment.post.postUrl}">${comment.post.postTitle}</a>
<a target="_blank" href="/archives/${comment.post.postUrl}#comment-id-${comment.commentId?c}">${comment.post.postTitle}</a>
<#else >
<a target="_blank" href="/p/${comment.post.postUrl}">${comment.post.postTitle}</a>
<a target="_blank" href="/p/${comment.post.postUrl}#comment-id-${comment.commentId?c}">${comment.post.postTitle}</a>
</#if>
</td>
<td>${comment.commentDate}</td>