This commit is contained in:
richboo111
2022-10-10 15:08:57 +08:00
parent 0e60c8c4d5
commit 2af05750d2

View File

@@ -126,9 +126,10 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
} }
for k, v := range resp.ResultList { for k, v := range resp.ResultList {
if k != len(resp.ResultList) { if k != len(resp.ResultList) {
storeIDs += utils.Int64ToStr(v.Store.StoreId) + "," storeIDs = utils.Int64ToStr(v.Store.StoreId) + ","
} }
storeIDs += utils.Int64ToStr(v.Store.StoreId) storeIDs = utils.Int64ToStr(v.Store.StoreId)
} }
globals.SugarLogger.Debug("Success createStore and return storeID=====", resp.ResultList[0].Store.StoreId, utils.Str2Int(storeIDs)) globals.SugarLogger.Debug("Success createStore and return storeID=====", resp.ResultList[0].Store.StoreId, utils.Str2Int(storeIDs))
if utils.Str2Int(storeIDs) == 0 { if utils.Str2Int(storeIDs) == 0 {
@@ -140,6 +141,10 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
if err != nil { if err != nil {
errList.AddErr(fmt.Errorf("创建运费模板失败原因:%v", err)) errList.AddErr(fmt.Errorf("创建运费模板失败原因:%v", err))
} else { } else {
if freightTemplateID == 0 {
globals.SugarLogger.Debug("freightTemplateID=========", freightTemplateID)
errList.AddErr(fmt.Errorf(" ", int64(storeDetail.Store.ID), freightTemplateID, err))
}
err = P.ShopBindStoreFreight(int64(storeDetail.Store.ID), freightTemplateID) err = P.ShopBindStoreFreight(int64(storeDetail.Store.ID), freightTemplateID)
if err != nil { if err != nil {
errList.AddErr(fmt.Errorf("门店:%d 绑定运费模板:%d 失败原因:%v", int64(storeDetail.Store.ID), freightTemplateID, err)) errList.AddErr(fmt.Errorf("门店:%d 绑定运费模板:%d 失败原因:%v", int64(storeDetail.Store.ID), freightTemplateID, err))