package tiktok_api

import (
	"encoding/json"
	"fmt"
	"testing"
)

//运力呼叫询价（正向）
func TestGetDispatcherInfo(t *testing.T) {
	dispatcherFee, err := a.GetDispatcherInfo(62490423, "5016940182798690015", 1)
	fmt.Println(dispatcherFee)
	fmt.Println(err)
}
func TestCancelWaybill(t *testing.T) {
	err := a.ShopOrderDispatcher(64250755, "5030722721087718866", 2)
	fmt.Println(err)
}

type tete struct {
	ids  []int64
	name string
}

func Test(t *testing.T) {
	//var b interface{}
	//x := reflect.TypeOf(b)
	//fmt.Println(reflect.TypeOf(a) == reflect.TypeOf([]int64{}))
	//switch x {
	//case reflect.TypeOf([]int64{}):
	//	fmt.Println(1)
	//case reflect.TypeOf([]string{}):
	//	fmt.Println(2)
	//}
	fmt.Println(50&2, 3&2)
	fmt.Println(50|2, 3|2)
}

func TestGetShipmentInfo(t *testing.T) {
	a.GetShipmentInfo(5030299715093774047, 0, ShipmentTypeInvoice)
}

func TestGetStoreAutoCallRiderInfo(t *testing.T) {
	a.GetStoreAutoCallRiderInfo(64212030)
}

func TestMap2(t *testing.T) {
	aa := `{
	"四川":[
			{"张淋":"18981810340"},{"李伟达":"18988808752"},
			{"张淋":"18981810340"},{"李伟达":"18988808752"}
           ],
	"广州":[
			{"张淋":"18981810340"},{"李伟达":"18988808752"},
			{"张淋":"18981810340"},{"李伟达":"18988808752"}
           ],
	"西安":[
			{"张淋":"18981810340"},{"李伟达":"18988808752"},
			{"张淋":"18981810340"},{"李伟达":"18988808752"}
           ]
}`
	list := make(map[string][]map[string]string, 0)
	json.Unmarshal([]byte(aa), &list)
	t.Log(list)
}
