request->input('user_id'); $page = $this->request->input('page'); $pagesize = $this->request->input('pagesize'); $type = $this->request->input('type','1'); /** * $type unused 未使用 used 已使用 expired已失效 */ switch ($type){ case 'unused': $res = $this->couponRecService->getUnusedListByUser($userId,$page,$pagesize); break; case 'used': $res = $this->couponRecService->getUsedListByUser($userId,$page,$pagesize); break; case 'expired': $res = $this->couponRecService->getExpiredListByUser($userId,$page,$pagesize); break; } return $this->success($res); } }