fix(record): 修复已删除用户列表没数据问题

This commit is contained in:
yokowu
2025-07-03 17:44:37 +08:00
parent 1cf1e17a98
commit cf54417ab1

View File

@@ -12,6 +12,7 @@ import (
"github.com/chaitin/MonkeyCode/backend/db/user"
"github.com/chaitin/MonkeyCode/backend/domain"
"github.com/chaitin/MonkeyCode/backend/pkg/cvt"
"github.com/chaitin/MonkeyCode/backend/pkg/entx"
)
type BillingRepo struct {
@@ -54,6 +55,7 @@ func (b *BillingRepo) CompletionInfo(ctx context.Context, id string) (*domain.Co
// ListChatRecord implements domain.BillingRepo.
func (b *BillingRepo) ListChatRecord(ctx context.Context, req domain.ListRecordReq) (*domain.ListChatRecordResp, error) {
ctx = entx.SkipSoftDelete(ctx)
q := b.db.Task.Query().
WithUser().
WithModel().
@@ -100,6 +102,7 @@ func filterTask(q *db.TaskQuery, req domain.ListRecordReq) {
// ListCompletionRecord implements domain.BillingRepo.
func (b *BillingRepo) ListCompletionRecord(ctx context.Context, req domain.ListRecordReq) (*domain.ListCompletionRecordResp, error) {
ctx = entx.SkipSoftDelete(ctx)
q := b.db.Task.Query().
WithUser().
WithModel().