This commit is contained in:
richboo111
2023-09-26 18:31:26 +08:00
parent fa31340d41
commit 7522bfba2e
4 changed files with 9 additions and 6 deletions

View File

@@ -7,7 +7,8 @@ import (
"testing"
)
var token = `{"access_token":"4a543151-f8fd-43d5-9c34-d19fe11fc51c","expires_in":1694069036,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"5a2aaca1-42f7-4b83-9358-8ed5d1d4bcd6","authority_id":""}`
var token = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}`
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token)
// 查询售后单详情

View File

@@ -282,11 +282,13 @@ func TestUpdateStore(t *testing.T) {
//获取门店绑定仓库
func TestGetWarehouseByStore(t *testing.T) {
storeIDs := []int64{64363086}
storeIDs := []int64{87542533}
need := []int64{}
errList := errlist.New()
var str = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}`
var apis = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", str)
for _, v := range storeIDs {
resp, err := a.GetWarehouseByStore(v)
resp, err := apis.GetWarehouseByStore(v)
if resp.WarehouseInfoMap[utils.Int64ToStr(v)] == nil || len(resp.WarehouseInfoMap[utils.Int64ToStr(v)][0].OutFenceIds) == 0 {
need = append(need, v)
} else {