This commit is contained in:
邹宗楠
2023-02-24 14:44:35 +08:00
parent bfe46c6d99
commit 23c86c2414

View File

@@ -162,29 +162,6 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
storeCat.CatSyncStatus |= model.SyncFlagNewMask
err = p.CreateStoreCategory(ctx, storeID, vendorStoreID, storeCat)
}
//if err != nil && strings.Contains(err.Error(), "门店内存在重复的分类:") {
// globals.SugarLogger.Debugf("==========err %s", err.Error())
// storeCategoryList, err2 := api.RetailCatList(vendorStoreID)
// globals.SugarLogger.Debugf("==========err2 %v", err2)
// globals.SugarLogger.Debugf("==========err %s", utils.Format4Output(storeCategoryList, false))
// if err2 != nil {
// err = err2
// } else {
// for _, v := range storeCategoryList {
// globals.SugarLogger.Debugf("storeCategoryList==========err %s", err.Error())
// if len(v.Children) > 0 {
// for _, c := range v.Children {
// if strings.Contains(c.Name, err.Error()) {
// api.RetailCatDelete(vendorStoreID, "", c.Name)
// }
// }
// }
// if strings.Contains(v.Name, err.Error()) {
// api.RetailCatDelete(vendorStoreID, "", v.Name)
// }
// }
// }
//}
}
if err == nil {
// storeCat.VendorCatID = utils.FilterEmoji(storeCat.Name)