Forráskód Böngészése

activityController

DengTao 8 éve
szülő
commit
960b3b7bf6

+ 3 - 3
www/protected/modules/common/controllers/ActivityController.php

@@ -86,10 +86,10 @@ class ActivityController extends O2oBaseController  {
         $coupon_id =new MongoId($coupon_id);
         $start_time = time();                 //发放优惠券可用开始时间
         $end_time = $start_time + 86400*30;   //发放优惠券过期时间
-        var_dump($user->_id);
+        $userId = new MongoId($userId);
         if (CommonFn::isMongoId($coupon_id) && !$coupon_id) {
-            if (CommonFn::isMongoId($user->_id) && !$user->_id) {
-                Service::factory('CouponService')->giveCoupon($user->_id, $coupon_id, $start_time, $end_time);//发放代金券
+            if (CommonFn::isMongoId($userId) && !$userId) {
+                Service::factory('CouponService')->giveCoupon($userId, $coupon_id, $start_time, $end_time);//发放代金券
                 echo "123";exit;
                 //$this->renderpartial('index');exit;
             }