正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -51,9 +51,9 @@ func (l *ArticleCategoryUpdateLogic) ArticleCategoryUpdate(req *types.ArticleCat | @@ -51,9 +51,9 @@ func (l *ArticleCategoryUpdateLogic) ArticleCategoryUpdate(req *types.ArticleCat | ||
| 51 | if err = transaction.UseTrans(l.ctx, l.svcCtx.DB, func(ctx context.Context, conn transaction.Conn) error { | 51 | if err = transaction.UseTrans(l.ctx, l.svcCtx.DB, func(ctx context.Context, conn transaction.Conn) error { |
| 52 | // 同步标签的分类名称 | 52 | // 同步标签的分类名称 |
| 53 | if changeName { | 53 | if changeName { |
| 54 | - _, articleTags, _ := l.svcCtx.ArticleTagRepository.Find(l.ctx, conn, userToken.CompanyId, domain.NewQueryOptions().MustWithKV("name", dm.Name)) | 54 | + _, articleTags, _ := l.svcCtx.ArticleTagRepository.Find(l.ctx, conn, userToken.CompanyId, domain.NewQueryOptions().MustWithKV("categoryId", dm.Id)) |
| 55 | for _, articleTag := range articleTags { | 55 | for _, articleTag := range articleTags { |
| 56 | - if articleTag.Name != dm.Name || articleTag.CategoryId != dm.Id { | 56 | + if articleTag.CategoryId != dm.Id { |
| 57 | continue | 57 | continue |
| 58 | } | 58 | } |
| 59 | // 新的分类名称 | 59 | // 新的分类名称 |
-
请 注册 或 登录 后发表评论