Merge branch 'master' of e.coding.net:rosydev/baseapi

This commit is contained in:
邹宗楠
2022-11-02 18:02:34 +08:00
2 changed files with 5 additions and 4 deletions

View File

@@ -233,7 +233,7 @@ func (a *API) FreightTemplateUpdate(param *freightTemplate_update_request.Freigh
return nil, err
}
if response.Code != RequestSuccessCode {
return nil, errors.New(response.SubMsg)
return nil, errors.New(response.Msg + "," + response.SubMsg)
}
return response.Data, nil
}

View File

@@ -277,9 +277,10 @@ func TestStoreUpdateFence(t *testing.T) {
func TestGetWarehouseByStore(t *testing.T) {
accesstoken := `{"access_token":"d590b649-0dd9-4988-a5e2-bf7e06e2f105","expires_in":1667808519,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f57c6a55-af5f-45ca-8ade-b2282be86341","authority_id":""}`
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
resp, err := a.GetWarehouseByStore(62490423)
fmt.Println(resp)
fmt.Println(err)
resp, _ := a.GetWarehouseByStore(65402632)
fmt.Println(resp[65402632][0].OutFenceIds)
//fmt.Println(resp[0][62490423].OutFenceIds[0])
//fmt.Println(err)
}
func TestUtilsTime2Date(t *testing.T) {