|
|
@@ -21,15 +21,22 @@ class Messages extends Base
|
|
|
$where = [];
|
|
|
$orwhere = [];
|
|
|
|
|
|
- //用户账号/昵称
|
|
|
- if (strlen($param['searchText'])) {
|
|
|
- if($param['account'] == 'account_name'){
|
|
|
- $where['account_name'] = ['like', '%' . $param['searchText'] . '%'];
|
|
|
- }
|
|
|
- if($param['account'] == 'nick_name'){
|
|
|
- $where['nick_name'] = ['like', '%' . $param['searchText'] . '%'];
|
|
|
- }
|
|
|
- }
|
|
|
+// //用户账号/昵称
|
|
|
+// if (strlen($param['searchText'])) {
|
|
|
+// if($param['account'] == 'account_name'){
|
|
|
+// $account_id = db('accounts')->where('account_name','like','%'.$param['searchText'].'%')->selest();
|
|
|
+// $ids = array();
|
|
|
+// for($i=0;$i<count($account_id);$i++){
|
|
|
+// $ids[] = $account_id[$i]['id'];
|
|
|
+// }
|
|
|
+// $where['a.account_id'] = $ids;
|
|
|
+// $orwhere['account_id'] = $ids;
|
|
|
+// }
|
|
|
+// if($param['account'] == 'nick_name'){
|
|
|
+// $where['a.nick_name'] = array('like','%'.$param['searchText'].'%');
|
|
|
+// $orwhere['nick_name'] = array('like','%'.$param['searchText'].'%');
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
//用户昵称
|
|
|
if (strlen($param['searchText'])) {
|