Explorar o código

优惠券发放时间

DengTao %!s(int64=8) %!d(string=hai) anos
pai
achega
d03149e0fe
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      www/protected/modules/o2o/controllers/WebController.php

+ 3 - 3
www/protected/modules/o2o/controllers/WebController.php

@@ -66,9 +66,9 @@ class WebController extends O2oBaseController {
                     $criteria->user('==', $userId);
                     $criteria->user('==', $userId);
                     $user_coupon = UserCoupon::model()->find($criteria);
                     $user_coupon = UserCoupon::model()->find($criteria);
                     echo "1";
                     echo "1";
-                    if (empty($user_coupon) && time() >= date_create("2016-11-10")->format('U') && time() <= date_create("2016-11-13")->format('U')) {
+                    //if (empty($user_coupon) && time() >= date_create("2016-11-10")->format('U') && time() <= date_create("2016-11-13")->format('U')) {
                         echo "2";
                         echo "2";
-                        var_dump(time());
+                        //var_dump(time());
                         $coupons = array(
                         $coupons = array(
                             0 => array('5822df8aa84ea04e238b456f', '5822df7ba84ea03e238b456d'),
                             0 => array('5822df8aa84ea04e238b456f', '5822df7ba84ea03e238b456d'),
                             1 => array('57fe10c69f5160b5048b45d0', '57fe0ed09f5160a2048b456b'),
                             1 => array('57fe10c69f5160b5048b45d0', '57fe0ed09f5160a2048b456b'),
@@ -98,7 +98,7 @@ class WebController extends O2oBaseController {
                                 Service::factory('CouponService')->giveCoupon($userId, $coupon_id, $start_time, $end_time);//发放代金券
                                 Service::factory('CouponService')->giveCoupon($userId, $coupon_id, $start_time, $end_time);//发放代金券
                             }
                             }
                         }
                         }
-                    }
+                    //}
                     //end
                     //end