- 京东门店相关的操作改用新API(非map)
This commit is contained in:
@@ -15,22 +15,24 @@ const (
|
||||
|
||||
func (c *PurchaseHandler) onOrderComment2(msg *jdapi.CallbackOrderMsg) (err error) {
|
||||
intOrderID := utils.Str2Int64(msg.BillID)
|
||||
result, err := getAPI("").GetCommentByOrderId(intOrderID)
|
||||
result, err := getAPI("").GetCommentByOrderId2(intOrderID)
|
||||
if err == nil {
|
||||
globals.SugarLogger.Debugf("onOrderComment comment:%s", utils.Format4Output(result, true))
|
||||
orderCommend := &model.OrderComment{
|
||||
VendorOrderID: utils.Int64ToStr(utils.MustInterface2Int64(result["orderId"])),
|
||||
VendorID: model.VendorIDJD,
|
||||
UserCommentID: "",
|
||||
VendorStoreID: utils.Int64ToStr(utils.MustInterface2Int64(result["storeId"])),
|
||||
TagList: string(utils.MustMarshal(result["venderTags"])),
|
||||
Score: int8(utils.MustInterface2Int64(result["score4"])),
|
||||
Content: utils.Interface2String(result["score4Content"]),
|
||||
CommentCreatedAt: utils.Timestamp2Time(utils.MustInterface2Int64(result["createTime"].(map[string]interface{})["time"]) / 1000),
|
||||
ModifyDuration: JDDJ_BAD_COMMENTS_MAX_MODIFY_TIME,
|
||||
OriginalMsg: string(utils.MustMarshal(result)),
|
||||
VendorOrderID: utils.Int64ToStr(result.OrderID),
|
||||
VendorID: model.VendorIDJD,
|
||||
UserCommentID: "",
|
||||
VendorStoreID: utils.Int64ToStr(result.StoreID),
|
||||
TagList: string(utils.MustMarshal(result.VenderTags)),
|
||||
Score: int8(result.Score4),
|
||||
Content: result.Score4Content,
|
||||
ModifyDuration: JDDJ_BAD_COMMENTS_MAX_MODIFY_TIME,
|
||||
OriginalMsg: string(utils.MustMarshal(result)),
|
||||
}
|
||||
if result["orgCommentContent"] != nil {
|
||||
if result.CreateTime != nil {
|
||||
orderCommend.CommentCreatedAt = result.CreateTime.GoTime()
|
||||
}
|
||||
if result.OrgCommentContent != "" {
|
||||
orderCommend.IsReplied = 1
|
||||
}
|
||||
err = partner.CurOrderManager.OnOrderComments([]*model.OrderComment{orderCommend})
|
||||
|
||||
Reference in New Issue
Block a user