特殊处理err

This commit is contained in:
richboo111
2022-11-03 11:00:36 +08:00
parent 6051b0c5b2
commit 3e8dffb8e7
3 changed files with 9 additions and 10 deletions

View File

@@ -253,9 +253,10 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID int64) (stri
_, err1 := dao.UpdateEntity(db, FreightTemplate, "TemplateID", "WarehouseID", "FenceID", "TradeLimitID")
errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v", err1))
}
endErr := errList.GetErrListAsOne()
if utils.IsNil(errList) {
globals.SugarLogger.Debug("绑定门店需进行的错误处理:%v", errors.New(fmt.Sprintf("%s", utils.Format4Output(errList, true))))
return "门店绑定成功,但需要根据提示进行处理", errors.New(fmt.Sprintf("%s", utils.Format4Output(errList, true)))
return "门店绑定成功,但需要根据提示进行处理", errors.New(fmt.Sprintf("%s", endErr))
} else {
globals.SugarLogger.Debug("the last step of")
return "门店绑定成功", nil
@@ -370,7 +371,8 @@ func (P *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
}
}
}
return errors.New(fmt.Sprintf("errList=%s,err=%v", utils.Format4Output(errList, true), err))
endErr := errList.GetErrListAsOne()
return errors.New(fmt.Sprintf("endErr=%s", endErr))
}
// UpdateStoreStatus shop/unsuspendStore 门店恢复营业