userCouponModel ->whereTime('validity_end_time', '<', date('Y-m-d H:i:s')) ->where('status', CouponCode::COUPON_STATUS_UNUSED) ->update(['status' => CouponCode::COUPON_STATUS_EXPIRE]); }catch (Exception $e){ $this->log->error(__CLASS__.$e->getMessage()); } } }