Store添加AutoReplyType,用于标识(订单)自动回复类型

This commit is contained in:
gazebo
2019-12-16 16:17:02 +08:00
parent eb78052a13
commit 4772caf080
3 changed files with 17 additions and 1 deletions

View File

@@ -85,7 +85,10 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
isNewComment = true
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID); err2 == nil {
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
if storeDetail.AutoReplyType == model.AutoReplyAll ||
orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment {
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
}
}
}
}