|
@@ -4,14 +4,14 @@ use think\Db;
|
|
|
use think\Log;
|
|
|
use Workerman\Worker as WO;
|
|
|
|
|
|
-class MobileOrderExpired{
|
|
|
+class MobileOrderExpired extends Com{
|
|
|
public static function run()
|
|
|
{
|
|
|
$work=new WO();
|
|
|
$work->onWorkerStart=function ($conn){
|
|
|
while (true){
|
|
|
$orders= MobileOrder::expired()->field('id')->select();
|
|
|
- user_log(class_basename(__CLASS__),sprintf('%d条数据',count($orders)));
|
|
|
+ self::log(sprintf('%d条数据',count($orders)));
|
|
|
foreach ($orders as $order){
|
|
|
try {
|
|
|
Db::startTrans();
|