From 169a9c4ffd73dbdbb94cff9eaf4cd7bc53fcf566 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 22 Feb 2023 15:13:17 +0800 Subject: [PATCH] 1 --- platformapi/tiktok_shop/tiktok_api/store.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/platformapi/tiktok_shop/tiktok_api/store.go b/platformapi/tiktok_shop/tiktok_api/store.go index d4500057..1ab5d634 100644 --- a/platformapi/tiktok_shop/tiktok_api/store.go +++ b/platformapi/tiktok_shop/tiktok_api/store.go @@ -301,20 +301,15 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) { return nil, errors.New(result.SubMsg) } tempList := make([]int64, 0) - //if len(result.Data.StoreFreights) == 0 { - // globals.SugarLogger.Debugf("绑定运费模板为空可判断") - // tempList = append(tempList, 0) - // return tempList, err - //} else { + if result.Data == nil { + globals.SugarLogger.Debugf("绑定运费模板为空") + tempList = append(tempList, 0) + return tempList, err + } for _, v := range result.Data.StoreFreights { tempList = append(tempList, v.FreightId) } - if len(tempList) == 0 { - tempList = append(tempList, 0) - } return tempList, err - - //} } //获取运费模板详情