|
@@ -1,25 +0,0 @@
|
|
|
-<?php
|
|
|
-namespace app\common\command;
|
|
|
-
|
|
|
-use app\common\model\Mobile;
|
|
|
-use think\console\Command;
|
|
|
-use think\console\Input;
|
|
|
-use think\console\Output;
|
|
|
-class MobileExpiredCommand extends Command{
|
|
|
- protected function configure()
|
|
|
- {
|
|
|
- $this->setName('mobile:expired')->setDescription('到期关闭');
|
|
|
- }
|
|
|
-
|
|
|
- protected function execute(Input $input, Output $output)
|
|
|
- {
|
|
|
- $ids=Mobile::where('activity_time_end','<=',time())
|
|
|
- ->where('is_activity',1)
|
|
|
- ->where('type',1)
|
|
|
- ->column('id');
|
|
|
- foreach ($ids as $id){
|
|
|
- $mobile=Mobile::find($id);
|
|
|
- $mobile->makeNotActivity();
|
|
|
- }
|
|
|
- }
|
|
|
-}
|