This commit is contained in:
邹宗楠
2024-03-26 18:22:03 +08:00
parent 01c4596e86
commit 54d2d1b059

View File

@@ -6434,7 +6434,7 @@ func BatchUpdateMTStoreLogos(vendorOrgCode string, relInfo []MtRelInfo) (hint st
}
type TaoBindInfo struct {
storeID int `json:"storeID"`
StoreID int `json:"storeID"`
VendorStoreID string `json:"vendorStoreID"`
VendorStoreName string `json:"vendorStoreName"`
Status string `json:"status"` //渠道营业状态
@@ -6456,7 +6456,6 @@ 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)
@@ -6495,7 +6494,6 @@ 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 {
@@ -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 {
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)
}
}