Commit 9b578c57 authored by zhuwei's avatar zhuwei

1

parent 9cb71cbf
......@@ -144,6 +144,8 @@ class ConvertCouponService
* @return mixed
*/
public function filterExpireData($coupon_list){
big_log('去除已经过期的优惠券,并修改状态为已过期');
big_log(json_encode($coupon_list));
// 循环查看是否过期
foreach ($coupon_list as $k => $v) {
if($v['use_period']<0){
......@@ -151,7 +153,10 @@ class ConvertCouponService
}
#发券日期大于最后使用日期
big_log('发券日期'.$v['create_time']);
big_log('过期日期'.date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['use_period']))));
if( $v['create_time'] > date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['use_period'])))){
big_log('过期券');
$this->m_coupon->updateStatus($v['id'],2);
unset($coupon_list[$k]);
continue;
......
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