...
|
...
|
@@ -372,12 +372,11 @@ class PortalPostModel extends Model |
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
public function getArticleByKeyword($keyword){
|
|
|
$map1['post_keywords']=['like',$keyword.'%'];
|
|
|
$map['post_keywords|post_title']=['like','%'.$keyword.'%'];
|
|
|
$map['delete_time']=0;
|
|
|
$map1['post_title']=['like',$keyword.'%'];
|
|
|
$result=$this->field('id,post_title,post_content,more,published_time,create_time')
|
|
|
->where($map)
|
|
|
->whereOr($map1)
|
|
|
// ->whereOr($map1)
|
|
|
->select();
|
|
|
dump($this->getLastSql());
|
|
|
return $result;
|
...
|
...
|
|