Sync.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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::getLatestIssue2(); // 获取最新的期号
  35. IssueService::syncCountdownIssue(); // 提前20秒提醒
  36. IssueService::syncCloseIssue(); // 同步停止
  37. // Log::error('✅ 获取到最新期号: ' . ($latestIssue ?? '无'));
  38. // 你的业务逻辑
  39. IssueService::getLatestIssue(); // 获取最新的期号
  40. return $this->success();
  41. }
  42. public function close()
  43. {
  44. IssueService::syncCountdownIssue(); // 提前20秒提醒
  45. IssueService::syncCloseIssue(); // 同步停止
  46. return $this->success();
  47. }
  48. public function cd()
  49. {
  50. IssueService::syncCountdownIssue(); //
  51. return $this->success();
  52. }
  53. public function exchange()
  54. {
  55. ConfigService::syncExchangeRate();
  56. return $this->success();
  57. }
  58. }