Browse Source

模糊搜索新建字段检索

master
wanghongjun 7 months ago
parent
commit
ae14fb3f1f
  1. 2
      app/enterprise/controller/Im.php
  2. 1
      app/enterprise/model/Message.php

2
app/enterprise/controller/Im.php

@ -212,7 +212,7 @@ class Im extends BaseController
}
$keywords = isset($param['keywords']) ? $param['keywords'] : '';
if ($keywords && in_array($type, ['text', 'all'])) {
$where[] = ['content', 'like', '%' . $keywords . '%'];
$where[] = ['plain_text', 'like', '%' . $keywords . '%'];
}
// 如果是查询@数据
if($is_at){

1
app/enterprise/model/Message.php

@ -180,6 +180,7 @@ class Message extends BaseModel
'to_user'=>$toContactId,
'id'=>$param['id'],
'content'=>str_encipher($param['content'],true),
'plain_text'=>$param['plain_text']??'',
'chat_identify'=>$chat_identify,
'create_time'=>time(),
'type'=>$param['type'],

Loading…
Cancel
Save