validated(); $data = $this->request->all(); $jsonData = $data['json_data'] ?? json_encode([]); if (!$data['source_id'] || !$data['user_id']) { $this->log->event('community_bind_error', ['request' => json_encode($data)]); return $this->result(ErrorCode::COMMUNITY_BIND_ERROR,$data); } $res = $this->userCommunityService->bind(UserRelationBind::BIND_TYPE_COMMUNITY, $data['source_id'], $data['user_id'], $jsonData); return $this->success(['id' => $res->id]); } }