|
|
|
@ -33,7 +33,7 @@ class CouponService implements CouponServiceInterface |
|
|
|
'not_receive' => [], |
|
|
|
'jump_data' => [ |
|
|
|
'src' => "/zh_cjdianc/pages/couponrebate/index?activity_type=".$activityType, |
|
|
|
'src' => "/zh_cjdianc/pages/couponrebate/index?activity_type=".$activityType, |
|
|
|
'src2' => "/zh_cjdianc/pages/couponrebate/index?activity_type=".$activityType, |
|
|
|
'coupons' => [] |
|
|
|
] |
|
|
|
]; |
|
|
|
@ -67,8 +67,7 @@ class CouponService implements CouponServiceInterface |
|
|
|
// 获取领取型优惠券
|
|
|
|
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); |
|
|
|
$couponRebateIds = $ssdb->exec('hgetall',SsdbKeysPrefix::COUPON_REBATE_FORWARD.$activityType); |
|
|
|
// $result['active_type'] = $couponRebateIds;
|
|
|
|
// return $result;
|
|
|
|
|
|
|
|
$couponIds = ($couponRebateIds === false || empty($couponRebateIds)) ? $couponIds : array_merge($couponIds,$couponRebateIds) ; |
|
|
|
|
|
|
|
$whereC = [ |
|
|
|
@ -92,11 +91,13 @@ class CouponService implements CouponServiceInterface |
|
|
|
->get(); |
|
|
|
|
|
|
|
foreach ($coupons as $k => &$v){ |
|
|
|
if($v['active_type'] == 1){ |
|
|
|
|
|
|
|
if($v->active_type == 1){ |
|
|
|
$result['not_receive'] = $v; |
|
|
|
}else if($v['active_type'] == 2){ |
|
|
|
$result['jump_data']['coupons'][] = $v; |
|
|
|
}else if($v->active_type == 2){ |
|
|
|
$result['jump_data']['coupons'][] = $v->id; |
|
|
|
} |
|
|
|
|
|
|
|
if($v->discount_type == 2){ |
|
|
|
$v->discounts = floatval($v->discounts); |
|
|
|
} |
|
|
|
|