作者 郑周

Merge branch 'dev' into test

... ... @@ -121,13 +121,13 @@ 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)
}
if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil {
return dms, tx.Error
}
return dms, nil
... ...