repairPaySuccess.php 945 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. declare (strict_types=1);
  3. namespace app\command;
  4. use app\common\repositories\store\order\StoreGroupOrderRepository;
  5. use app\common\repositories\store\order\StoreOrderRepository;
  6. use think\console\Command;
  7. use think\console\Input;
  8. use think\console\Output;
  9. use think\facade\Db;
  10. class repairPaySuccess extends Command
  11. {
  12. protected function configure()
  13. {
  14. // 指令配置
  15. $this->setName('repairPaySuccess')
  16. ->setDescription('修复支付成功后数据');
  17. }
  18. /**
  19. * @param Input $input
  20. * @param Output $output
  21. * @return void
  22. */
  23. protected function execute(Input $input, Output $output)
  24. {
  25. $orderSn = 'wx1744285736344558050';
  26. $groupOrder = app()->make(StoreGroupOrderRepository::class)->getWhere(['group_order_sn' => $orderSn]);
  27. app()->make(StoreOrderRepository::class)->paySuccess($groupOrder,1);
  28. $output->writeln('执行结束');
  29. }
  30. }