|
@@ -135,12 +135,12 @@ public class HistoryMessageTenantServiceImpl extends BaseServiceImplWithMongo<St
|
|
|
Pattern pattern = Pattern.compile(".*", Pattern.CASE_INSENSITIVE);
|
|
|
if (StringUtils.isNotBlank(param.getKeyword())) {
|
|
|
pattern = Pattern.compile(".*" + param.getKeyword() + ".*", Pattern.CASE_INSENSITIVE);
|
|
|
+ criteria.and("msg_body_json").elemMatch(
|
|
|
+ Criteria.where("MsgContent.Text").regex(pattern)
|
|
|
+ .and("MsgType").is("TIMTextElem")
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
- criteria.and("msg_body_json").elemMatch(
|
|
|
- Criteria.where("MsgContent.Text").regex(pattern)
|
|
|
- .and("MsgType").is("TIMTextElem")
|
|
|
- );
|
|
|
|
|
|
query.addCriteria(criteria);
|
|
|
query.with(Sort.by(Sort.Order.asc("msg_timestamp"))); // 以升序方式按字段排序
|