69 lines
1.4 KiB
Go
69 lines
1.4 KiB
Go
package jdshopapi
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
)
|
|
|
|
func TestEnGet(t *testing.T) {
|
|
err := api.OrderShipment(1, "logiCoprId", "logiNo")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
// t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
//根据订单ID查询订单
|
|
func TestGetOrderById(t *testing.T) {
|
|
|
|
//Str, err := json.Number("26138025293300000001").Int64()
|
|
//id := utils.Str2Int64(Str)
|
|
//261386944586
|
|
//261380252933
|
|
detail, err := api.GetOrderById(261386944586, false)
|
|
fmt.Println(utils.Format4Output(detail, false))
|
|
fmt.Println(err)
|
|
}
|
|
|
|
func TestGetDeliveryCompany(t *testing.T) {
|
|
result, err := api.GetDeliveryCompany()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestGetOrder(t *testing.T) {
|
|
// result, err := api.GetOrder(orderID, isStatus)
|
|
// if err != nil {
|
|
// t.Fatal(err)
|
|
// }
|
|
// t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestVoucherInfoGet(t *testing.T) {
|
|
result, err := api.VoucherInfoGet()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestKeyGet(t *testing.T) {
|
|
result, err := api.KeyGet()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestGetOrderExtInfoByOrderId(t *testing.T) {
|
|
result, err := api.GetOrderExtInfoByOrderId("140608998542")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|