正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -121,13 +121,13 @@ func (repository *MessageSystemRepository) Find(ctx context.Context, conn transa | @@ -121,13 +121,13 @@ func (repository *MessageSystemRepository) Find(ctx context.Context, conn transa | ||
121 | ) | 121 | ) |
122 | queryFunc := func() (interface{}, error) { | 122 | queryFunc := func() (interface{}, error) { |
123 | tx = tx.Model(&ms).Order("id desc") | 123 | tx = tx.Model(&ms).Order("id desc") |
124 | - if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil { | ||
125 | if v, ok := queryOptions["companyId"]; ok { | 124 | if v, ok := queryOptions["companyId"]; ok { |
126 | tx.Where("company_id = ?", v) | 125 | tx.Where("company_id = ?", v) |
127 | } | 126 | } |
128 | if v, ok := queryOptions["recipientId"]; ok { | 127 | if v, ok := queryOptions["recipientId"]; ok { |
129 | tx.Where("recipient_id = ?", v) | 128 | tx.Where("recipient_id = ?", v) |
130 | } | 129 | } |
130 | + if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil { | ||
131 | return dms, tx.Error | 131 | return dms, tx.Error |
132 | } | 132 | } |
133 | return dms, nil | 133 | return dms, nil |
-
请 注册 或 登录 后发表评论