优化OnOrderComments
This commit is contained in:
@@ -86,8 +86,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
c.replyOrderComment(orderComment)
|
c.replyOrderComment(orderComment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL || !isNewComment { // 如果是直接非差评,忽略
|
if isNewComment && orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL || !isNewComment && orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL { // 如果是直接非差评,或补评仍然是差评,忽略
|
||||||
if isNewComment || orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL {
|
|
||||||
if isNewComment {
|
if isNewComment {
|
||||||
comment2.Createtime = utils.Time2Str(orderComment.CommentCreatedAt)
|
comment2.Createtime = utils.Time2Str(orderComment.CommentCreatedAt)
|
||||||
comment2.Msg = orderComment.OriginalMsg
|
comment2.Msg = orderComment.OriginalMsg
|
||||||
@@ -121,9 +120,6 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
weixinmsg.PushJDBadCommentToWeiXin(comment2)
|
weixinmsg.PushJDBadCommentToWeiXin(comment2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // 修改评价,但是仍然低于或等于JX_BAD_COMMENTS_MAX_LEVEL
|
|
||||||
comment2 = nil
|
|
||||||
}
|
|
||||||
} else { // 修改评价,高于JX_BAD_COMMENTS_MAX_LEVEL
|
} else { // 修改评价,高于JX_BAD_COMMENTS_MAX_LEVEL
|
||||||
if orderComment.CommentCreatedAt.Sub(str2Time(comment2.Createtime)) == 0 ||
|
if orderComment.CommentCreatedAt.Sub(str2Time(comment2.Createtime)) == 0 ||
|
||||||
orderComment.CommentCreatedAt.Sub(str2Time(comment2.Updatetime)) == 0 {
|
orderComment.CommentCreatedAt.Sub(str2Time(comment2.Updatetime)) == 0 {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import (
|
|||||||
// 饿百的评价不是一点一点出来的,而是一下把前一天的全部崩出来。。。
|
// 饿百的评价不是一点一点出来的,而是一下把前一天的全部崩出来。。。
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RefreshCommentTime = 36 * time.Hour
|
RefreshCommentTime = 84 * time.Hour
|
||||||
RefreshCommentTimeInterval = 60 * time.Minute
|
RefreshCommentTimeInterval = 60 * time.Minute
|
||||||
EBAI_BAD_COMMENTS_MAX_MODIFY_TIME = 24 // 小时
|
EBAI_BAD_COMMENTS_MAX_MODIFY_TIME = 24 // 小时
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user