chore(src): 所有代码上传

This commit is contained in:
2025-12-02 15:36:42 +08:00
parent ce8e59902c
commit eb79ad260c
669 changed files with 86838 additions and 87639 deletions

View File

@@ -1,38 +1,29 @@
<?php
/**
*/
namespace addon\coupon\event;
use app\model\system\Cron;
/**
* 应用安装
*/
class Install
{
/**
* 执行安装
*/
public function handle()
{
try {
execute_sql('addon/coupon/data/install.sql');
$cron = new Cron();
$cron->deleteCron([ ['event', '=', 'CronCouponEnd'] ]);
$cron->addCron(2, 1, '优惠券过期自动关闭', 'CronCouponEnd', time(), 0);
return success();
} catch (\Exception $e) {
return error('', $e->getMessage());
}
}
<?php
namespace addon\coupon\event;
use app\model\system\Cron;
/**
* 应用安装
*/
class Install
{
/**
* 执行安装
*/
public function handle()
{
try {
execute_sql('addon/coupon/data/install.sql');
$cron = new Cron();
$cron->deleteCron([ ['event', '=', 'CronCouponEnd'] ]);
$cron->addCron(2, 1, '优惠券过期自动关闭', 'CronCouponEnd', time(), 0);
return success();
} catch (\Exception $e) {
return error('', $e->getMessage());
}
}
}