...
|
...
|
@@ -122,6 +122,12 @@ func (repository *MessageSystemRepository) Find(ctx context.Context, conn transa |
|
|
queryFunc := func() (interface{}, error) {
|
|
|
tx = tx.Model(&ms).Order("id desc")
|
|
|
if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil {
|
|
|
if v, ok := queryOptions["companyId"]; ok {
|
|
|
tx.Where("company_id = ?", v)
|
|
|
}
|
|
|
if v, ok := queryOptions["recipientId"]; ok {
|
|
|
tx.Where("recipient_id = ?", v)
|
|
|
}
|
|
|
return dms, tx.Error
|
|
|
}
|
|
|
return dms, nil
|
...
|
...
|
|