初始化代码
This commit is contained in:
24
app/im/model/ImClient.php
Normal file
24
app/im/model/ImClient.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace app\im\model;
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class ImClient extends BaseModel
|
||||
{
|
||||
//定义表名称
|
||||
protected $name = 'longbing_card_collection';
|
||||
|
||||
//是否是客户
|
||||
public function isCustomer($user_id ,$customer_id ,$uniacid)
|
||||
{
|
||||
$filter = array(
|
||||
'uid' => $customer_id,
|
||||
'to_uid' => $user_id,
|
||||
'uniacid' => $uniacid,
|
||||
'intention' => 1
|
||||
);
|
||||
|
||||
$result = $this->where($filter)->count();
|
||||
return !empty($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user