正在显示
2 个修改的文件
包含
4 行增加
和
2 行删除
@@ -31,8 +31,7 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr | @@ -31,8 +31,7 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr | ||
31 | 31 | ||
32 | queryOption := domain.NewQueryOptions(). | 32 | queryOption := domain.NewQueryOptions(). |
33 | WithOffsetLimit(req.Page, req.Size). | 33 | WithOffsetLimit(req.Page, req.Size). |
34 | - MustWithKV("article_id", req.ArticleId). | ||
35 | - MustWithKV("company_id", req.CompanyId) | 34 | + MustWithKV("articleId", req.ArticleId) |
36 | 35 | ||
37 | cnt, backupList, err := l.svcCtx.ArticleBackupRepository.Find(l.ctx, conn, queryOption) | 36 | cnt, backupList, err := l.svcCtx.ArticleBackupRepository.Find(l.ctx, conn, queryOption) |
38 | if err != nil { | 37 | if err != nil { |
@@ -129,6 +129,9 @@ func (repository *ArticleBackupRepository) Find(ctx context.Context, conn transa | @@ -129,6 +129,9 @@ func (repository *ArticleBackupRepository) Find(ctx context.Context, conn transa | ||
129 | if v, ok := queryOptions["articleId"]; ok { | 129 | if v, ok := queryOptions["articleId"]; ok { |
130 | tx = tx.Where("article_id = ?", v) | 130 | tx = tx.Where("article_id = ?", v) |
131 | } | 131 | } |
132 | + if v, ok := queryOptions["companyId"]; ok { | ||
133 | + tx = tx.Where("article_id = ?", v) | ||
134 | + } | ||
132 | if v, ok := queryOptions["operator"]; ok && v.(string) != "" { | 135 | if v, ok := queryOptions["operator"]; ok && v.(string) != "" { |
133 | tx = tx.Where(`operator #>> '{"name"}' like ?`, "%"+v.(string)+"%") | 136 | tx = tx.Where(`operator #>> '{"name"}' like ?`, "%"+v.(string)+"%") |
134 | } | 137 | } |
-
请 注册 或 登录 后发表评论