up
This commit is contained in:
@@ -83,7 +83,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
if dao.IsNoRowsError(err) {
|
if dao.IsNoRowsError(err) {
|
||||||
err = nil
|
err = nil
|
||||||
isNewComment = true
|
isNewComment = true
|
||||||
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < MAX_REAPLY_TIME {
|
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
|
||||||
c.replyOrderComment(orderComment)
|
c.replyOrderComment(orderComment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RefreshCommentTime = 3 * 24 * time.Hour // 此值必须大于24小时
|
RefreshCommentTime = 7 * 24 * time.Hour // 此值必须大于24小时
|
||||||
RefreshCommentTimeInterval = 60 * time.Minute
|
RefreshCommentTimeInterval = 60 * time.Minute
|
||||||
BAD_COMMENTS_MAX_MODIFY_TIME = 24 // 小时
|
BAD_COMMENTS_MAX_MODIFY_TIME = 24 * 6 // 小时
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *PurchaseHandler) StartRefreshComment() {
|
func (c *PurchaseHandler) StartRefreshComment() {
|
||||||
|
|||||||
Reference in New Issue
Block a user