| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace hd\controllers;
- use biz\shop\classes\ShopCouponClass;
- use biz\shop\services\ShopCouponService;
- use common\components\util;
- use Yii;
- class ShopCouponController extends BaseController
- {
- public $guestAccess = [];
- //门店列表 shish 2021.5.15
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $where = [];
- $where['shopId'] = $this->shopId;
- $status = $get['status'] ?? 0;
- if (!empty($status)) {
- $where['status'] = $status;
- }
- $list = ShopCouponService::getCouponList($where);
- util::success($list);
- }
- //有可用红包 shish 2021.5.15
- public function actionHas()
- {
- $has = ShopCouponClass::hasUnUseCoupon($this->shopId);
- $data = [
- 'has' => $has
- ];
- util::success($data);
- }
- }
|