shish 7 ay önce
ebeveyn
işleme
1d8ac958ce

+ 1 - 4
app-hd/controllers/ShopCouponController.php

@@ -36,10 +36,7 @@ class ShopCouponController extends BaseController
     //有可用红包 ssh 2021.5.15
     public function actionHas()
     {
-        //不要考虑最低消费,把客户所有红包列出来,这样客户可以有选择的消费!!!!!!
-        $ghsId = Yii::$app->request->get('ghsId', 0);
-        $has = ShopCouponClass::hasValidCoupon($this->shopId, $ghsId);
-        $data = ['has' => $has];
+        $data = ['has' => 0];
         util::success($data);
     }
 

+ 1 - 13
biz/shop/classes/ShopCouponClass.php

@@ -166,19 +166,7 @@ class ShopCouponClass extends BaseClass
     // 商家是否有可用红包
     public static function hasValidCoupon($shopId, $ghsId)
     {
-        $current = date("Y-m-d H:i:s");
-        $list = self::getAllByCondition(['shopId' => $shopId, 'status' => ShopCouponClass::STATUS_UN_USE, 'ghsId' => $ghsId], null, '*', null, true);
-        $flag = 0;
-        if (empty($list)) {
-            return $flag;
-        }
-        foreach ($list as $item) {
-            if ($current >= $item->beginTime && $current < $item->endTime) {
-                $flag = 1;
-                break;
-            }
-        }
-        return $flag;
+
     }
 
     public static function valid($coupon, $shopId)