Sync.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace App\Http\Controllers\admin;
  3. use App\Http\Controllers\Controller;
  4. use App\Models\Collect;
  5. use App\Services\CollectService;
  6. use App\Services\RechargeService;
  7. use App\Services\RoomService;
  8. use App\Services\IssueService;
  9. use App\Services\ConfigService;
  10. use Google\Service\ServiceManagement\ConfigSource;
  11. class Sync extends Controller
  12. {
  13. public function collect()
  14. {
  15. CollectService::syncCollectStay();
  16. return $this->success();
  17. }
  18. public function recharge()
  19. {
  20. RechargeService::syncRechargeStay();
  21. return $this->success();
  22. }
  23. public function settle()
  24. {
  25. RoomService::noticeSettle();
  26. return $this->success();
  27. }
  28. public function five()
  29. {
  30. IssueService::syncCountdownIssue(); // 提前20秒提醒
  31. IssueService::syncCloseIssue(); // 同步停止
  32. // Log::error('✅ 获取到最新期号: ' . ($latestIssue ?? '无'));
  33. // 你的业务逻辑
  34. IssueService::getLatestIssue(); // 获取最新的期号
  35. return $this->success();
  36. }
  37. public function cd()
  38. {
  39. IssueService::syncCountdownIssue(); //
  40. return $this->success();
  41. }
  42. public function exchange()
  43. {
  44. ConfigService::syncExchangeRate();
  45. return $this->success();
  46. }
  47. }