12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Elton
- * Date: 2020/3/5
- * Time: 13:10
- */
- namespace app\admin\command;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- use think\Request;
- class UpdateUserSilent extends Command
- {
- protected function configure()
- {
- $this->setName('UpdateUserSilent')
- ->setDescription('更新PolarDb数据库中user_silent表');
- }
- protected function execute(Input $input, Output $output)
- {
- Request::instance()->module('admin');
- $tri_appid = 'wx28b15f8431ab3a35';
- //model('UserSilent')->setConnect(0)->where('tri_channel_id', '=', 21155)->update(['tri_appid' => $tri_appid]);
- //model('UserSilent')->setConnect(0)-> where('tri_channel_id', '=', 7349)->update(['tri_appid' => 'wx79bfdb38ba28b749']);
- $this->output->writeln(model('UserSilent')->getLastSql().PHP_EOL);
- }
- }
|