Test.php 546 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\admin\command;
  3. use think\console\Command;
  4. use think\console\Input;
  5. use think\console\Output;
  6. use think\Db;
  7. class Test extends Command
  8. {
  9. protected function configure()
  10. {
  11. $this->setName('test')->setDescription('Here is the remark ');
  12. }
  13. protected function execute(Input $input, Output $output)
  14. {
  15. $acocunt =Db::name('Account')->where("is_del=0 and status>=1 and expiretime<='".date("Y-m-d H:i:s")."'")->select();
  16. var_dump($acocunt);
  17. $output->writeln("AccountExpire:");
  18. }
  19. }