|
|
@@ -585,7 +585,7 @@ func Attachments(opts *AttachmentsOptions) ([]*AttachmentInfo, int64, error) { |
|
|
|
} else { |
|
|
|
lowerKeyWord := strings.ToLower(opts.Keyword) |
|
|
|
|
|
|
|
cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord})) |
|
|
|
cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord}, builder.Like{"LOWER(attachment.description)", lowerKeyWord})) |
|
|
|
count, err = sess.Table(&Attachment{}).Where(cond).Count(new(AttachmentInfo)) |
|
|
|
|
|
|
|
} |
|
|
|