1
This commit is contained in:
@@ -275,6 +275,7 @@ func (c *PurchaseHandler) onOrderMsg(msgId, orderId string, msg interface{}) (re
|
||||
|
||||
// 组装订单状态变化
|
||||
status, appOrgCode := c.callbackMsg2Status(msgId, orderId, msg)
|
||||
globals.SugarLogger.Debugf("==========-2%s,%d", utils.Format4Output(status, false), appOrgCode)
|
||||
// 校验重复消息
|
||||
if partner.CurOrderManager.GetStatusDuplicatedCount(status) > 0 {
|
||||
return tiktokShop.Err2CallbackResponse(nil, "")
|
||||
@@ -282,6 +283,7 @@ func (c *PurchaseHandler) onOrderMsg(msgId, orderId string, msg interface{}) (re
|
||||
|
||||
// 已经支付的订单,当做新订单创建在平台内部 -----------------
|
||||
if msgId == tiktokShop.CallbackPayOrderMsgTagId {
|
||||
globals.SugarLogger.Debugf("==========-1%d,%s", appOrgCode, orderId)
|
||||
order, err := c.GetOrder(utils.Int64ToStr(appOrgCode), orderId, "") // 获取平台订单详情,制作本地订单
|
||||
globals.SugarLogger.Debugf("==========0%s", utils.Format4Output(order, false))
|
||||
if err != nil {
|
||||
@@ -357,6 +359,7 @@ func (c *PurchaseHandler) callbackMsg2Status(msgId, orderId string, msg interfac
|
||||
case tiktokShop.CallbackPayOrderMsgTagId:
|
||||
orderMsg := tiktokShop.PayOrderData{}
|
||||
if err := utils.Map2StructByJson(msg, &orderMsg, false); err != nil {
|
||||
globals.SugarLogger.Debugf("==========-Map2StructByJson:%s", err)
|
||||
return nil, 0
|
||||
}
|
||||
orderStatus.VendorOrderID = utils.Int64ToStr(orderMsg.PId)
|
||||
|
||||
Reference in New Issue
Block a user