This commit is contained in:
苏尹岚
2021-02-03 10:15:53 +08:00
parent bde302b557
commit aaadd0ed32
8 changed files with 107 additions and 87 deletions

View File

@@ -14,7 +14,6 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
)
const (
@@ -53,7 +52,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
storeMap := batchItemList[0].(*model.StoreMap)
endDateStr := time.Now().Add(-24 * time.Hour).Format("20060102")
startDateStr := time.Now().Add(-RefreshCommentTime).Format("20060102")
commentList, err2 := api.MtwmAPI.CommentQuery(storeMap.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusAll)
commentList, err2 := getAPI(storeMap.VendorOrgCode).CommentQuery(storeMap.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusAll)
var orderCommentList []*model.OrderComment
if err = err2; err != nil {
@@ -106,7 +105,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
func (c *PurchaseHandler) ReplyOrderComment(ctx *jxcontext.Context, vendorOrgCode string, orderComment *model.OrderComment, replyComment string) (err error) {
globals.SugarLogger.Debugf("mtwm ReplyOrderComment, orderComment:%s, replyComment:%s", utils.Format4Output(orderComment, true), replyComment)
if globals.EnableMtwmStoreWrite {
err = api.MtwmAPI.CommentAddReply(orderComment.VendorStoreID, utils.Str2Int64(orderComment.UserCommentID), replyComment)
err = getAPI(vendorOrgCode).CommentAddReply(orderComment.VendorStoreID, utils.Str2Int64(orderComment.UserCommentID), replyComment)
}
return err
}