Files
juipphp/app/agent/model/User.php
“wanyongkang” a53ec5cf96 代理商
2021-02-21 18:18:26 +08:00

27 lines
703 B
PHP

<?php
namespace app\agent\model;
use fastphp\base\Model;
class User extends Model
{
protected $table = 'user';
//获取客户经理相关信息
public function getManagerList($where = [],$fields = '*', $group = [], $order = '')
{
return $this->field($fields)->where($where)->group($group)->order($order)->fetchAll();
}
//用户是否存在
public function isExit($where = '', $fields = '*')
{
return $this->field($fields)->where($where)->fetch();
}
//获取代理商的用户数量
public function getAgentUser($where = []){
return $this->field('agent_id,count(1) as num')->where($where)->group(['agent_id'])->fetchAll();
}
}