Commit d3b2e404 authored by zhuwei's avatar zhuwei

1

parent 5d47f0d5
......@@ -75,13 +75,11 @@ class ConvertCouponService
#根据$user_id 取出 当前客户的 0首次登陆 1邀请登陆 券
$coupon_list = $this->getCoupon($user_id,'');
big_log('1'.json_encode($coupon_list));
if(!$coupon_list){
return false;
}
#去除已经过期的优惠券
$coupon_list = $this->filterExpireData($coupon_list);
big_log('2'.json_encode($coupon_list));
#存在未过期 券数等于1直接核销
$coupon_list_count = count($coupon_list);
......@@ -91,13 +89,9 @@ class ConvertCouponService
}elseif($coupon_list_count > 1){
//券不止一张选取金额最大的核销
$max_coupon = $this->getMaxCoupon($coupon_list);
big_log('3'.json_encode($coupon_list));
$coupon_list = [];
$coupon_list[] = $max_coupon;
big_log('4'.json_encode($coupon_list));
}
big_log('5'.json_encode($coupon_list));
big_log('6'.json_encode($coupon_list[0]['id']));
#修改券状态为已使用
$this->m_coupon->updateUseStatus($coupon_list[0]['id'],1,$report_id,$bargain_id,$order_id,date("Y-m-d H:i:s", time()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment