- refactor order comment
This commit is contained in:
@@ -26,7 +26,7 @@ const (
|
||||
COMMENTS_SCORE_FOUR_ORFIVE_BEGIN_DELAY_TIME = 2 * 60 //评论回复四星或五星回复延迟开始时间区间
|
||||
COMMENTS_SCORE_FOUR_ORFIVE_END_DELAY_TIME = 5 * 60 //评论回复四星或五星回复延迟结束时间区间
|
||||
|
||||
MAX_REAPLY_TIME = 4 * time.Hour
|
||||
MAX_REAPLY_TIME = 2 * time.Hour
|
||||
)
|
||||
|
||||
type tReplyConfig struct {
|
||||
@@ -71,18 +71,6 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
||||
db := dao.GetDB()
|
||||
for _, orderComment := range orderCommentList {
|
||||
globals.SugarLogger.Debugf("OnOrderComments, orderID:%s", orderComment.VendorOrderID)
|
||||
var order *model.GoodsOrder
|
||||
if orderComment.VendorID == model.VendorIDEBAI {
|
||||
if realVendorID := jxutils.GetPossibleVendorIDFromVendorOrderID(orderComment.VendorOrderID); realVendorID == model.VendorIDELM {
|
||||
if order, err = partner.CurOrderManager.LoadOrder2(orderComment.VendorOrderID, model.VendorIDEBAI); err == nil {
|
||||
orderComment.VendorOrderID = order.VendorOrderID
|
||||
} else {
|
||||
globals.SugarLogger.Infof("OnOrderComments, load orderID:%s failed", orderComment.VendorOrderID)
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
comment2 := &legacymodel.JxBadComments2{
|
||||
OrderId: orderComment.VendorOrderID,
|
||||
}
|
||||
@@ -110,11 +98,15 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
||||
comment2.LastPushTime = utils.Time2Str(time.Now())
|
||||
comment2.PushNo = 1
|
||||
comment2.Maxmodifytime = int(orderComment.ModifyDuration)
|
||||
if order == nil {
|
||||
order, err = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||
}
|
||||
if err == nil {
|
||||
orderComment.StoreID = jxutils.GetSaleStoreIDFromOrder(order)
|
||||
if orderComment.VendorID != model.VendorIDELM {
|
||||
var order *model.GoodsOrder
|
||||
if orderComment.VendorID != model.VendorIDEBAI {
|
||||
order, err = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||
}
|
||||
if order != nil {
|
||||
orderComment.StoreID = jxutils.GetSaleStoreIDFromOrder(order)
|
||||
orderComment.ConsigneeMobile = order.ConsigneeMobile
|
||||
}
|
||||
if orderComment.StoreID > 0 {
|
||||
comment2.Jxstoreid = utils.Int2Str(orderComment.StoreID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user