where('status', SHOW); $model = $model->page($page, $limit); return $model->select(); } /** * 获取客服信息 * @param $uid * @param string $field * @return array|null|\think\Model * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public static function getServiceInfo($uid, $field = '*') { return self::where('uid', $uid)->where('status', SHOW)->field($field)->find(); } /** * 判断是否客服 * @param $uid * @return int */ public static function orderServiceStatus($uid) { return self::where('uid', $uid)->where('status', SHOW)->where('customer', YES)->count(); } /** * 获取接受通知的客服 * * @return array */ public static function getStoreServiceOrderNotice() { return self::where('status', SHOW)->where('notify', ENABLED)->column('uid', 'uid'); } }