修复
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace process;
|
||||
namespace app\process;
|
||||
|
||||
use app\controller\FeishuController;
|
||||
use app\model\Customer;
|
||||
@@ -11,10 +11,11 @@ use Workerman\Crontab\Crontab;
|
||||
|
||||
class Task
|
||||
{
|
||||
|
||||
public function onWorkerStart()
|
||||
{
|
||||
// 每半小时执行一次
|
||||
new Crontab('30/* * * * *', function () {
|
||||
new Crontab('1/* * * * * *', function () {
|
||||
echo date('Y-m-d H:i:s') . "\n";
|
||||
$customer = Customer::where(['follow_next', '<=', time() + 3600])
|
||||
->where(['follow_next', '>', time()])
|
||||
@@ -31,6 +32,8 @@ class Task
|
||||
$host = $parsedUrl['host'];
|
||||
$port = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : '';
|
||||
$url = $host .$port. '/pages/customer/detile?id='.$customer->id;
|
||||
$item->warn = 1;
|
||||
$item->update();
|
||||
FeishuController::class->send($feishuUser->open_id, '跟进提醒', '您有新的跟进提醒', $url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user