特殊处理err
This commit is contained in:
@@ -174,7 +174,7 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID int64) (stri
|
||||
if err != nil || warehouseID == 0 || utils.IsNil(warehouseID) {
|
||||
globals.SugarLogger.Debug("门店(%d) 创建仓库失败:%v", storeID, err)
|
||||
errList.AddErr(fmt.Errorf("门店(%d) 创建仓库失败:%v", storeID, err))
|
||||
} else { //绑定
|
||||
} else { //绑定
|
||||
if err = BindStoreWarehouse(vendorOrgCode, utils.Int64ToStr(storeID), vendorStoreID); err != nil { //仓库绑定通过自定义外部ID
|
||||
globals.SugarLogger.Debug("门店(%d) 绑定仓库:%d 失败:%v", storeID, warehouseID, err)
|
||||
errList.AddErr(fmt.Errorf("门店(%d) 绑定仓库:%d 失败:%v", storeID, warehouseID, err))
|
||||
@@ -257,6 +257,7 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID int64) (stri
|
||||
globals.SugarLogger.Debug("绑定门店需进行的错误处理:%v", errors.New(fmt.Sprintf("%s", utils.Format4Output(errList, true))))
|
||||
return "门店绑定成功,但需要根据提示进行处理", errors.New(fmt.Sprintf("%s", utils.Format4Output(errList, true)))
|
||||
} else {
|
||||
globals.SugarLogger.Debug("the last step of")
|
||||
return "门店绑定成功", nil
|
||||
}
|
||||
}
|
||||
@@ -369,7 +370,7 @@ func (P *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
return errors.New(fmt.Sprintf("errList=%s,err=%v", utils.Format4Output(errList, true), err))
|
||||
}
|
||||
|
||||
// UpdateStoreStatus shop/unsuspendStore 门店恢复营业
|
||||
|
||||
Reference in New Issue
Block a user