|
@@ -87,9 +87,12 @@ class ActivityController extends O2oBaseController {
|
|
if ($userId != '') {
|
|
if ($userId != '') {
|
|
$userId = new MongoId($userId);
|
|
$userId = new MongoId($userId);
|
|
$criteria = new EMongoCriteria();
|
|
$criteria = new EMongoCriteria();
|
|
- $criteria->coupon('==',$coupon_id);
|
|
|
|
|
|
+ //$criteria->coupon('==',$coupon_id);
|
|
$criteria->user('==',$userId);
|
|
$criteria->user('==',$userId);
|
|
$user_coupon = UserCoupon::model()->find($criteria);
|
|
$user_coupon = UserCoupon::model()->find($criteria);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (!$user_coupon) {
|
|
if (!$user_coupon) {
|
|
Service::factory('CouponService')->giveCoupon($userId, $coupon_id, $start_time, $end_time);//发放代金券
|
|
Service::factory('CouponService')->giveCoupon($userId, $coupon_id, $start_time, $end_time);//发放代金券
|
|
}
|
|
}
|