1
This commit is contained in:
@@ -6434,7 +6434,7 @@ func BatchUpdateMTStoreLogos(vendorOrgCode string, relInfo []MtRelInfo) (hint st
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TaoBindInfo struct {
|
type TaoBindInfo struct {
|
||||||
storeID int `json:"storeID"`
|
StoreID int `json:"storeID"`
|
||||||
VendorStoreID string `json:"vendorStoreID"`
|
VendorStoreID string `json:"vendorStoreID"`
|
||||||
VendorStoreName string `json:"vendorStoreName"`
|
VendorStoreName string `json:"vendorStoreName"`
|
||||||
Status string `json:"status"` //渠道营业状态
|
Status string `json:"status"` //渠道营业状态
|
||||||
@@ -6456,7 +6456,6 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
|||||||
if len(bind) == 0 {
|
if len(bind) == 0 {
|
||||||
return fmt.Errorf("绑定门店数据为空,请检查"), ""
|
return fmt.Errorf("绑定门店数据为空,请检查"), ""
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("==========bind : %s", utils.Format4Output(bind, false))
|
|
||||||
for _, v := range bind {
|
for _, v := range bind {
|
||||||
if len(v.VendorStoreID) == 0 || len(v.VendorStoreName) == 0 {
|
if len(v.VendorStoreID) == 0 || len(v.VendorStoreName) == 0 {
|
||||||
errIDName = append(errIDName, v.VendorStoreID)
|
errIDName = append(errIDName, v.VendorStoreID)
|
||||||
@@ -6495,7 +6494,6 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
|||||||
}
|
}
|
||||||
storeMaps = append(storeMaps, storeMap)
|
storeMaps = append(storeMaps, storeMap)
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("==========storeMaps : %s", utils.Format4Output(storeMaps, false))
|
|
||||||
|
|
||||||
userName := ctx.GetUserName()
|
userName := ctx.GetUserName()
|
||||||
for _, k := range storeMaps {
|
for _, k := range storeMaps {
|
||||||
@@ -6511,14 +6509,10 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo, vendorOr
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
globals.SugarLogger.Debugf("==========k : %s", utils.Format4Output(k, false))
|
|
||||||
|
|
||||||
if err := dao.CreateEntity(db, k); err == nil {
|
if err := dao.CreateEntity(db, k); err == nil {
|
||||||
globals.SugarLogger.Debugf("==========err1 : %v", err)
|
|
||||||
errList.AddErr(fmt.Errorf("%s:%v", k.VendorStoreID, err))
|
errList.AddErr(fmt.Errorf("%s:%v", k.VendorStoreID, err))
|
||||||
dao.Commit(db, txDB)
|
dao.Commit(db, txDB)
|
||||||
} else {
|
} else {
|
||||||
globals.SugarLogger.Debugf("==========err2 : %v", err)
|
|
||||||
dao.Rollback(db, txDB)
|
dao.Rollback(db, txDB)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user