Compare commits
1 Commits
20250806-0
...
20250806-1
| Author | SHA1 | Date | |
|---|---|---|---|
| eb0ce8a347 |
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user