where('status', 1)->where('verify_status', 1)->count(); } /** * 获取店员列表 * @param array $where * @return array */ public static function getList($where = []) { $model = new self(); $model = $model->alias('a') ->join('wechat_user u', 'u.uid=a.uid') ->join('system_store s', 'a.store_id = s.id') ->field('a.id,u.nickname,a.avatar,a.staff_name,a.status,a.add_time,s.name'); if (isset($where['store_id']) && $where['store_id'] > 0) { $model = $model->where('store_id', $where['store_id']); } if (isset($where['mer_id']) && $where['mer_id'] > 0) { $model = $model->where('a.mer_id', $where['mer_id']); } $count = $model->count(); $list = $model->page((int)$where['page'], (int)$where['limit'])->select(); if (count($list)) { $list = $list->toArray(); } else { $list = []; } return compact('count', 'list'); } }