This commit is contained in:
richboo111
2023-02-22 15:13:17 +08:00
parent 41ffd293b6
commit 169a9c4ffd

View File

@@ -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
//}
}
//获取运费模板详情