mirror of https://github.com/halo-dev/halo
👽 代码优化
parent
a78ce161da
commit
0c3d0e2327
|
@ -1,5 +1,6 @@
|
||||||
package cc.ryanc.halo.model.domain;
|
package cc.ryanc.halo.model.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ -54,7 +55,6 @@ public class Post implements Serializable {
|
||||||
* 文章内容 Markdown格式
|
* 文章内容 Markdown格式
|
||||||
*/
|
*/
|
||||||
@Lob
|
@Lob
|
||||||
@JsonIgnore
|
|
||||||
private String postContentMd;
|
private String postContentMd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,4 +130,14 @@ public class Post implements Serializable {
|
||||||
* 是否允许评论
|
* 是否允许评论
|
||||||
*/
|
*/
|
||||||
private Integer allowComment = 0;
|
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>${comment.commentContent}</td>
|
||||||
<td>
|
<td>
|
||||||
<#if comment.post.postType == "post">
|
<#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 >
|
<#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>
|
</#if>
|
||||||
</td>
|
</td>
|
||||||
<td>${comment.commentDate}</td>
|
<td>${comment.commentDate}</td>
|
||||||
|
|
Loading…
Reference in New Issue