mirror of https://github.com/halo-dev/halo
👽 代码优化
parent
a78ce161da
commit
0c3d0e2327
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue