create all

This commit is contained in:
richboo111
2022-11-02 16:09:02 +08:00
parent 2cf3df6c40
commit 7cbbb3a1d2
2 changed files with 7 additions and 6 deletions

View File

@@ -1595,7 +1595,11 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
}
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
_, err = CurVendorSync.FullSyncStoresSkus(ctx, db, []int{vendorID}, []int{storeID}, true, nil, true, true)
return outStoreMap, errors.New(fmt.Sprintf("errList=%s,err=%v", utils.Format4Output(errList, true), err))
if utils.IsNil(errList) && err == nil {
return outStoreMap, nil
} else {
return outStoreMap, errors.New(fmt.Sprintf("errList=%s,err=%v", utils.Format4Output(errList, true), err))
}
}
func DeleteStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, userName string) (num int64, err error) {

View File

@@ -283,11 +283,8 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID int64) (stri
globals.SugarLogger.Debug("db update storeID,vendorStoreID defeat on :%v", err)
errList.AddErr(fmt.Errorf("db update storeID,vendorStoreID defeat on :%v", err))
} else {
_, err1 := dao.UpdateEntity(db, FreightTemplate, "TemplateID")
_, err2 := dao.UpdateEntity(db, FreightTemplate, "WarehouseID")
_, err3 := dao.UpdateEntity(db, FreightTemplate, "FenceID")
_, err4 := dao.UpdateEntity(db, FreightTemplate, "TradeLimitID")
errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v,%v,%v,%v", err1, err2, err3, err4))
_, err1 := dao.UpdateEntity(db, FreightTemplate, "TemplateID", "WarehouseID", "FenceID", "TradeLimitID")
errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v", err1))
}
if utils.IsNil(errList) {
globals.SugarLogger.Debug("绑定门店需进行的错误处理:%v", errors.New(fmt.Sprintf("%s", utils.Format4Output(errList, true))))