request->get(); $where = []; $where['shopId'] = $this->shopId; $status = $get['status'] ?? 0; if (!empty($status)) { $where['status'] = $status; if ($status == 1) { $where['take'] = 1; } } $ghsId = $get['ghsId'] ?? 0; if (!empty($ghsId)) { $where['ghsId'] = $ghsId; } $list = ShopCouponService::getCouponList($where); util::success($list); } //有可用红包 ssh 2021.5.15 public function actionHas() { //不要考虑最低消费,把客户所有红包列出来,这样客户可以有选择的消费!!!!!! $ghsId = Yii::$app->request->get('ghsId', 0); $has = ShopCouponClass::hasValidCoupon($this->shopId, $ghsId); $data = ['has' => $has]; util::success($data); } //供货商发放的有效优惠券、红包 ssh 20211001 public function actionGhsSendHb() { $get = Yii::$app->request->get(); $amount = $get['amount'] ?? 0; $ghsId = $get['ghsId'] ?? 0; $list = ShopCouponClass::ghsSendHb($this->shopId, $ghsId, $amount); util::success(['list' => $list]); } }