Files
baseapi/platformapi/fnpsapi/fnpsapiv3_test.go
suyl 879f966bf9 aa
2021-08-06 09:15:41 +08:00

47 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package fnpsapi
import (
"git.rosy.net.cn/baseapi/utils"
"testing"
)
func TestPreCreateOrder(t *testing.T) {
result, err := apiv3.PreCreateOrder(&PreCreateOrderParam{
PartnerOrderCode: "2118717546000352",
OutShopCode: "667002",
OrderType: 1,
PositionSource: 3,
ReceiverAddress: "徐州市泉山区大润发(欣欣店)一楼咔啦嘟熊童装店",
ReceiverLongitude: 117.195360,
ReceiverLatitude: 34.201010,
GoodsTotalAmountCent: 66.2,
GoodsActualAmountCent: 67.2,
GoodsWeight: 2.3,
GoodsCount: 6,
GoodsItemList: []*ItemsJSON2{
&ItemsJSON2{
ItemName: "巨峰葡萄约500g/份",
ItemQuantity: 2,
ItemAmountCent: 15.2,
ItemActualAmountCent: 15.2,
},
&ItemsJSON2{
ItemName: "[新鲜]苹果150g/个(约150g-250g)",
ItemQuantity: 2,
ItemAmountCent: 4.3,
ItemActualAmountCent: 4.3,
},
&ItemsJSON2{
ItemName: "脆桃 鲜脆约500g/份",
ItemQuantity: 2,
ItemAmountCent: 14.6,
ItemActualAmountCent: 14.6,
},
},
})
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}