修改回调
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package fnpsapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"go.uber.org/zap"
|
||||
@@ -174,3 +175,17 @@ func TestGetOrder(t *testing.T) {
|
||||
fmt.Println(deliveryFee)
|
||||
fmt.Println(baseDeliveryFee)
|
||||
}
|
||||
|
||||
func TestDataUnmas(t *testing.T) {
|
||||
business_data := `{"callback_business_type":"orderStatusNotify","param":{"appId":"6705486294797503379","carrierDriverName":"","carrierDriverPhone":"","orderId":300000387828723002,"orderStatus":1,"partnerOrderCode":"88386437227716","pushTime":1648775857873,"transfer":0}}`
|
||||
fnNotify := &OrderStatusNottify{}
|
||||
if err := json.Unmarshal([]byte(business_data), fnNotify); err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err)
|
||||
}
|
||||
|
||||
fmt.Println("======================business_data", fnNotify.Param)
|
||||
fmt.Println("======================business_data", fnNotify.Param["appId"])
|
||||
//fmt.Println("======================business_data", fnNotify.Param.OrderId)
|
||||
//fmt.Println("======================business_data", fnNotify.Param)
|
||||
fmt.Println("======================business_data", fnNotify.CallbackBusinessType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user