res = []; if (empty($this->request->input('appoint_value'))) throw new Exception('请选择指定值'); match ($this->groupType = (int)$this->request->input('appoint_group',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)) { CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_USERS => $this->handleDesignatedUsers(), CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES => $this->handleDesignatedSites(), CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_GOODS => $this->handleDesignatedGoods(), CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES_AND_GOODS => $this->handleDesignatedSitesAndGoods(), default => throw new Exception('不需要渲染用户数据') }; return $this->return->success('success',['list' => $this->res]); }catch (Exception $e) { throw new ErrException($e->getMessage()); } } private function handleDesignatedUsers() { } private function handleDesignatedSitesAndGoods() { $this->getValueAndCheckDate(); $this->checkSite(); $this->checkSku(); $this->getUserData(); } private function handleDesignatedSites() { $this->getValueAndCheckDate(); $this->checkSite(); $this->getUserData(); } private function handleDesignatedGoods() { $this->getValueAndCheckDate(); $this->checkSku(); $this->getUserData(); } }