HandleDataScreen.php 773 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\command;
  3. use think\console\Command;
  4. use think\console\Input;
  5. use think\console\Output;
  6. use think\facade\Cache;
  7. class HandleDataScreen extends Command
  8. {
  9. protected function configure()
  10. {
  11. $this->setName('handle_data_screen')
  12. ->setDescription('处理数据大屏的统计数据');
  13. }
  14. protected function execute(Input $input, Output $output)
  15. {
  16. $key = 'wfwfwf';
  17. // $data = [
  18. // 'a'=>[
  19. // ['name'=>'a','age'=>3],
  20. // ['name'=>'b','age'=>4],
  21. // ],
  22. // 'bb'=>'bbbb',
  23. // 'ccc'=>['item'=>9999]
  24. // ];
  25. $rs = Cache::store('redis')->handler()->hmset($key,['name'=>'张三','age'=>23]);
  26. halt($rs);
  27. }
  28. }