Skip to content

Commit bdaa452

Browse files
authored
Merge pull request #46 from yokowu/fix-record-user
fix(record): 修复已删除用户列表没数据问题
2 parents 1cf1e17 + cf54417 commit bdaa452

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backend/internal/billing/repo/billing.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/chaitin/MonkeyCode/backend/db/user"
1313
"github.com/chaitin/MonkeyCode/backend/domain"
1414
"github.com/chaitin/MonkeyCode/backend/pkg/cvt"
15+
"github.com/chaitin/MonkeyCode/backend/pkg/entx"
1516
)
1617

1718
type BillingRepo struct {
@@ -54,6 +55,7 @@ func (b *BillingRepo) CompletionInfo(ctx context.Context, id string) (*domain.Co
5455

5556
// ListChatRecord implements domain.BillingRepo.
5657
func (b *BillingRepo) ListChatRecord(ctx context.Context, req domain.ListRecordReq) (*domain.ListChatRecordResp, error) {
58+
ctx = entx.SkipSoftDelete(ctx)
5759
q := b.db.Task.Query().
5860
WithUser().
5961
WithModel().
@@ -100,6 +102,7 @@ func filterTask(q *db.TaskQuery, req domain.ListRecordReq) {
100102

101103
// ListCompletionRecord implements domain.BillingRepo.
102104
func (b *BillingRepo) ListCompletionRecord(ctx context.Context, req domain.ListRecordReq) (*domain.ListCompletionRecordResp, error) {
105+
ctx = entx.SkipSoftDelete(ctx)
103106
q := b.db.Task.Query().
104107
WithUser().
105108
WithModel().

0 commit comments

Comments
 (0)