公海,转让,名片

This commit is contained in:
2025-03-31 14:25:38 +08:00
parent 8b19071d1c
commit 4cde16f76a
7 changed files with 213 additions and 22 deletions
+24
View File
@@ -4,6 +4,7 @@ namespace app\process;
use app\controller\FeishuController;
use app\model\Customer;
use app\model\CustomerHis;
use app\model\FeishuUser;
use app\model\User;
use support\Log;
@@ -71,6 +72,29 @@ class Task
Log::info('send follow start',[time()]);
});
// 每小时执行一次
new Crontab('0 10 * * * *', function(){
echo date('Y-m-d H:i:s') . "\n";
Log::info('send high seas start',[time()]);
$where = [
['deleted_at', '<=', time() - 3600],
['user_id', '<>', 0],
];
$customer = Customer::where($where)->onlyTrashed()->get();
foreach ($customer as $item) {
$item->update(['user_id' => 0]);
CustomerHis::create([
'customer_id' => $item->_id,
'user_his' => $item->user_id,
'user_id' => 0,
]);
}
Log::info('send high seas start',[time()]);
});
}
}