UpdateUserSilent.php 911 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Elton
  5. * Date: 2020/3/5
  6. * Time: 13:10
  7. */
  8. namespace app\admin\command;
  9. use think\console\Command;
  10. use think\console\Input;
  11. use think\console\Output;
  12. use think\Request;
  13. class UpdateUserSilent extends Command
  14. {
  15. protected function configure()
  16. {
  17. $this->setName('UpdateUserSilent')
  18. ->setDescription('更新PolarDb数据库中user_silent表');
  19. }
  20. protected function execute(Input $input, Output $output)
  21. {
  22. Request::instance()->module('admin');
  23. $tri_appid = 'wx28b15f8431ab3a35';
  24. //model('UserSilent')->setConnect(0)->where('tri_channel_id', '=', 21155)->update(['tri_appid' => $tri_appid]);
  25. //model('UserSilent')->setConnect(0)-> where('tri_channel_id', '=', 7349)->update(['tri_appid' => 'wx79bfdb38ba28b749']);
  26. $this->output->writeln(model('UserSilent')->getLastSql().PHP_EOL);
  27. }
  28. }