where('store_id', $where['store_id']); } // if (isset($where['type']) && $where['type'] != '' && ($data = self::setData($where['type']))) { // $model = $model->where($data); // } $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'); $data = $model->select(); $count = $data->count(); return compact('count', 'data'); } /** * 获取选择的商城用户 */ public static function getUserList() { $uids = self::column('uid'); $uids = array_values($uids); $uids = implode(',', $uids); $list = User::where('uid', 'not in', $uids)->select(); return ['data' => $list]; } }