| | |
| | | public function getListForUser($user_id, $params = []) |
| | | { |
| | | // 构建查询规则 |
| | | $model = $this->alias('A')->with(['activity' => ['branch', 'image']]) |
| | | $model = $this->alias('A')->with(['activity' => ['branch', 'image'],'branch']) |
| | | ->join('branch_activity B', 'B.activity_id = A.activity_id') |
| | | ->field('A.*') |
| | | ->visible(['activity' => ['name', 'image' => ['file_path'], 'branch' => ['name']]]) |
| | |
| | | { |
| | | // 构建查询规则 |
| | | $model = $this->alias('auser') |
| | | ->with('branch') |
| | | ->field('auser.*,user.nickName,auser.real_name,user.avatarUrl') |
| | | ->join('user', 'user.user_id = auser.user_id') |
| | | ->where('auser.is_delete', '=', 0) |