This commit is contained in:
邹宗楠
2022-04-01 14:15:42 +08:00
parent acc398c282
commit c7a124b0a9

View File

@@ -62,7 +62,7 @@ type ChainstoreParam struct {
// 订单状态 // 订单状态
type OrderStatusNottify struct { type OrderStatusNottify struct {
CallbackBusinessType string `json:"callback_business_type"` CallbackBusinessType string `json:"callback_business_type"`
Param map[string]interface{} `json:"param"` Param *OrderCallbackParam `json:"param"`
} }
// 订单状态回调paramter // 订单状态回调paramter
@@ -149,25 +149,25 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O
return nil, callbackResponse return nil, callbackResponse
} }
storeNotify := &OrderStatusNottify{}
fmt.Println("string==================", string(data)) fmt.Println("string==================", string(data))
//if err := json.Unmarshal([]byte(resultData.BusinessData), &storeNotify); err != nil { if err := json.Unmarshal(data, &storeNotify); err != nil {
// baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err) baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
// callbackResponse = &CallbackResponse{Code: -1} callbackResponse = &CallbackResponse{Code: -1}
// return nil, callbackResponse return nil, callbackResponse
//} }
//
//fmt.Println("======================", storeNotify) //fmt.Println("======================", storeNotify)
//fnNotify := &OrderStatusNottify{} //fnNotify := &OrderCallbackParam{}
//if err := json.Unmarshal([]byte(resultData.BusinessData), fnNotify); err != nil { //if err := json.Unmarshal([]byte(storeNotify.Param), fnNotify); err != nil {
// baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err) // baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err)
// callbackResponse = &CallbackResponse{Code: -1} // callbackResponse = &CallbackResponse{Code: -1}
// return nil, callbackResponse // return nil, callbackResponse
//} //}
//fmt.Println("======================business_data", fnNotify.Param) fmt.Println("======================business_data", storeNotify.Param)
//fmt.Println("======================business_data", fnNotify.Param["orderId"]) fmt.Println("======================business_data", storeNotify.Param.OrderId)
//fmt.Println("======================business_data", fnNotify.Param["partnerOrderCode"]) fmt.Println("======================business_data", storeNotify.Param.PartnerOrderCode)
//fmt.Println("======================business_data", fnNotify.Param) fmt.Println("======================business_data", storeNotify.CallbackBusinessType)
//fmt.Println("======================business_data", fnNotify.CallbackBusinessType)
return nil, SuccessResponse return nil, SuccessResponse
} }