...
|
...
|
@@ -86,10 +86,8 @@ class CardController extends RestBaseController |
|
|
$condition = $condition == '' ? '' : $condition;
|
|
|
$condition2['c.id'] = ['in',$ids];
|
|
|
if($data['keyword']) {
|
|
|
$where = "SELECT `c`.`id`,`c`.`name`,`c`.`position`,`c`.`tel`,`c`.`home_tel`,`c`.`email`,`c`.`company`,`u`.`avatar`,IF(c.user_id='.$this->userId.',`c`.`user_id`,0) top FROM `bro_card` `c` LEFT JOIN `bro_user` `u` ON `c`.`user_id`=`u`.`id`
|
|
|
WHERE `c`.`is_recommend` = 1 AND ( `c`.`name` LIKE '%".$data['keyword']."%' OR `company` LIKE '%".$data['keyword']."%' OR `tel` LIKE '%".$data['keyword']."%' )
|
|
|
OR ( (`c`.`name` LIKE '%".$data['keyword']."%' OR `company` LIKE '%".$data['keyword']."%' OR `tel` LIKE '%".$data['keyword']."%') and `c`.`id` IN (12))
|
|
|
ORDER BY top desc,c.create_time desc";
|
|
|
$where = "`c`.`is_recommend` = 1 AND ( `c`.`name` LIKE '%".$data['keyword']."%' OR `company` LIKE '%".$data['keyword']."%' OR `tel` LIKE '%".$data['keyword']."%' )
|
|
|
OR ( (`c`.`name` LIKE '%".$data['keyword']."%' OR `company` LIKE '%".$data['keyword']."%' OR `tel` LIKE '%".$data['keyword']."%') and `c`.`id` IN (12))";
|
|
|
$result = Db::name('card')
|
|
|
->alias('c')
|
|
|
->join('user u','c.user_id=u.id','left')
|
...
|
...
|
|