|
|
|
@ -15,26 +15,30 @@ use crmeb\interfaces\ListenerInterface; |
|
|
|
|
use crmeb\services\TimerService; |
|
|
|
|
use think\facade\Log; |
|
|
|
|
|
|
|
|
|
//class CustomizeTask extends TimerService implements ListenerInterface |
|
|
|
|
class CustomizeTask implements ListenerInterface |
|
|
|
|
class CustomizeTask extends TimerService implements ListenerInterface |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
public function handle($event): void |
|
|
|
|
{ |
|
|
|
|
// $this->tick(1000 * 60 , function () { |
|
|
|
|
// Log::info("aaaa3333"); |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var UserAssetsRepository $userAssets |
|
|
|
|
*/ |
|
|
|
|
$userAssets = app()->make(UserAssetsRepository::class); |
|
|
|
|
$userAssets->sharePoint(); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var HuitongRepository $huitong |
|
|
|
|
*/ |
|
|
|
|
$huitong = app()->make(HuitongRepository::class); |
|
|
|
|
$huitong->dayStatistics(); |
|
|
|
|
$this->tick(1000 * 60, function () { |
|
|
|
|
if(date('i') == 00){ |
|
|
|
|
Log::info('整点任务开始执行'); |
|
|
|
|
} |
|
|
|
|
if (date('H:i') == '00:10') { |
|
|
|
|
/** |
|
|
|
|
* @var UserAssetsRepository $userAssets |
|
|
|
|
*/ |
|
|
|
|
$userAssets = app()->make(UserAssetsRepository::class); |
|
|
|
|
$userAssets->sharePoint(); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var HuitongRepository $huitong |
|
|
|
|
*/ |
|
|
|
|
$huitong = app()->make(HuitongRepository::class); |
|
|
|
|
$huitong->dayStatistics(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|