Commit 09e410bf authored by zhuwei's avatar zhuwei

time

parent d9b7aa69
......@@ -169,7 +169,10 @@ class ConvertCouponService
}
#发券日期大于最后使用日期
if( $v['create_time'] > date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['create_time'])))){
$time = date("Y-m-d H:i:s", time());
$use_time = date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['create_time'])));
if( $time > $use_time){
big_log('优惠券已经过期');
$this->m_coupon->updateStatus($v['id'],2);
unset($coupon_list[$k]);
......
......@@ -42,7 +42,10 @@ class UpdateCouponTask
}
#发券日期大于最后使用日期
if( $v['create_time'] > date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['use_period'])))){
$time = date("Y-m-d H:i:s", time());
$use_time = date("Y-m-d H:i:s", strtotime("+{$v['use_period']} day",strtotime($v['create_time'])));
if( $time > $use_time){
$this->m_coupon->updateStatus($v['id'],2);
}
}
......
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