1
This commit is contained in:
@@ -101,8 +101,15 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
comment2.Status = COMMENT_NOT_RESOLVED
|
comment2.Status = COMMENT_NOT_RESOLVED
|
||||||
comment2.OrderFlag = utils.Int2Str(orderComment.VendorID)
|
comment2.OrderFlag = utils.Int2Str(orderComment.VendorID)
|
||||||
comment2.Maxmodifytime = int(orderComment.ModifyDuration)
|
comment2.Maxmodifytime = int(orderComment.ModifyDuration)
|
||||||
|
comment2.VendorOrderId = orderComment.VendorOrderID2
|
||||||
|
|
||||||
|
var order *model.GoodsOrder
|
||||||
|
if orderComment.VendorID == model.VendorIDMTWM {
|
||||||
|
order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID2, orderComment.VendorID)
|
||||||
|
} else {
|
||||||
|
order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||||
|
}
|
||||||
|
|
||||||
order, _ := partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
|
||||||
if order != nil {
|
if order != nil {
|
||||||
orderComment.StoreID = jxutils.GetSaleStoreIDFromOrder(order)
|
orderComment.StoreID = jxutils.GetSaleStoreIDFromOrder(order)
|
||||||
if order.ConsigneeMobile2 != "" {
|
if order.ConsigneeMobile2 != "" {
|
||||||
@@ -141,7 +148,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
comment2.UpdatedScorecontent = orderComment.Content
|
comment2.UpdatedScorecontent = orderComment.Content
|
||||||
comment2.UpdatedVendertags = orderComment.TagList
|
comment2.UpdatedVendertags = orderComment.TagList
|
||||||
comment2.Status = COMMENT_RESOLVED
|
comment2.Status = COMMENT_RESOLVED
|
||||||
|
comment2.VendorOrderId = orderComment.VendorOrderID2
|
||||||
if comment2.Jxstoreid != "" && orderComment.Score <= JX_MIDDLE_COMMENTS_MAX_LEVEL && time.Now().Sub(orderComment.CommentCreatedAt) < MAX_REAPLY_TIME {
|
if comment2.Jxstoreid != "" && orderComment.Score <= JX_MIDDLE_COMMENTS_MAX_LEVEL && time.Now().Sub(orderComment.CommentCreatedAt) < MAX_REAPLY_TIME {
|
||||||
comment2.LastPushTime = utils.Time2Str(time.Now())
|
comment2.LastPushTime = utils.Time2Str(time.Now())
|
||||||
comment2.PushNo++
|
comment2.PushNo++
|
||||||
@@ -151,7 +158,13 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
comment3.Score = comment2.UpdatedScore
|
comment3.Score = comment2.UpdatedScore
|
||||||
comment3.Scorecontent = comment2.UpdatedScorecontent
|
comment3.Scorecontent = comment2.UpdatedScorecontent
|
||||||
comment3.Vendertags = comment2.UpdatedVendertags
|
comment3.Vendertags = comment2.UpdatedVendertags
|
||||||
order, _ := partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
|
||||||
|
var order *model.GoodsOrder
|
||||||
|
if orderComment.VendorID == model.VendorIDMTWM {
|
||||||
|
order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID2, orderComment.VendorID)
|
||||||
|
} else {
|
||||||
|
order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||||
|
}
|
||||||
weixinmsg.PushJDBadCommentToWeiXin(&comment3, orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL, order)
|
weixinmsg.PushJDBadCommentToWeiXin(&comment3, orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL, order)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import "time"
|
|||||||
type JxBadComments struct {
|
type JxBadComments struct {
|
||||||
Id int `json:"id" orm:"column(id)"`
|
Id int `json:"id" orm:"column(id)"`
|
||||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime);null" json:"createdAt"`
|
CreatedAt time.Time `orm:"auto_now_add;type(datetime);null" json:"createdAt"`
|
||||||
OrderId string `json:"order_id" orm:"column(order_id);size(25);unique" description:"订单ID"`
|
OrderId string `json:"order_id" orm:"column(order_id);size(25);unique" description:"订单ID"` // 评价ID+订单ID
|
||||||
|
VendorOrderId string `json:"vendor_order_id" orm:"column(vendor_order_id);size(64)" description:"平台订单ID"`
|
||||||
Jxstoreid string `json:"jxstoreid" orm:"column(jxstoreid);size(11);index" description:"京西门店ID"`
|
Jxstoreid string `json:"jxstoreid" orm:"column(jxstoreid);size(11);index" description:"京西门店ID"`
|
||||||
Userphone string `json:"userPhone" orm:"column(userphone);size(255);null" description:"评价的用户的联系方式"`
|
Userphone string `json:"userPhone" orm:"column(userphone);size(255);null" description:"评价的用户的联系方式"`
|
||||||
Status int `json:"status" orm:"column(status)" description:"当前评论的状态(0:未解决 1:已解决)"`
|
Status int `json:"status" orm:"column(status)" description:"当前评论的状态(0:未解决 1:已解决)"`
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package mtwm
|
package mtwm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -100,7 +99,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
|||||||
}
|
}
|
||||||
vendorOrderID, _ := dao.GetBadCommentOrderId(storeDetail.ID, startTime, endTime, foodNameList)
|
vendorOrderID, _ := dao.GetBadCommentOrderId(storeDetail.ID, startTime, endTime, foodNameList)
|
||||||
if vendorOrderID != "" {
|
if vendorOrderID != "" {
|
||||||
orderComment.VendorOrderID = fmt.Sprintf("%s:%s", vendorOrderID, orderComment.VendorOrderID)
|
orderComment.VendorOrderID2 = vendorOrderID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user