Compare commits

...

1 Commits

Author SHA1 Message Date
eb0ce8a347 fix : coupon date 2025-08-06 12:44:58 +08:00

View File

@@ -13,6 +13,7 @@ namespace App\Cron\Coupon;
use App\Constants\Common\CouponCode;
use App\Lib\Log;
use App\Model\UserCoupon;
use Exception;
use Hyperf\Crontab\Annotation\Crontab;
use Hyperf\Di\Annotation\Inject;
@@ -35,7 +36,7 @@ class UserCouponTask
{
try {
$this->userCouponModel
->whereTime('validity_end_time', '<', date('Y-m-d H:i:s'))
->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){