1
This commit is contained in:
@@ -6456,6 +6456,7 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
||||
if len(bind) == 0 {
|
||||
return fmt.Errorf("绑定门店数据为空,请检查"), ""
|
||||
}
|
||||
globals.SugarLogger.Debugf("==========bind : %s", utils.Format4Output(bind, false))
|
||||
for _, v := range bind {
|
||||
if len(v.VendorStoreID) == 0 || len(v.VendorStoreName) == 0 {
|
||||
errIDName = append(errIDName, v.VendorStoreID)
|
||||
@@ -6494,6 +6495,8 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
||||
}
|
||||
storeMaps = append(storeMaps, storeMap)
|
||||
}
|
||||
globals.SugarLogger.Debugf("==========storeMaps : %s", utils.Format4Output(storeMaps, false))
|
||||
|
||||
userName := ctx.GetUserName()
|
||||
for _, k := range storeMaps {
|
||||
dao.WrapAddIDCULDEntity(k, userName)
|
||||
@@ -6508,9 +6511,11 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
||||
}
|
||||
}()
|
||||
if err := dao.CreateEntity(db, k); err == nil {
|
||||
globals.SugarLogger.Debugf("==========err1 : %v", err)
|
||||
errList.AddErr(fmt.Errorf("%s:%v", k.VendorStoreID, err))
|
||||
dao.Commit(db, txDB)
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("==========err2 : %v", err)
|
||||
dao.Rollback(db, txDB)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user