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

View File

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