Sync.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. return $this->success();
  36. }
  37. public function close()
  38. {
  39. IssueService::syncCountdownIssue(); // 提前20秒提醒
  40. IssueService::syncCloseIssue(); // 同步停止
  41. return $this->success();
  42. }
  43. public function cd()
  44. {
  45. IssueService::syncCountdownIssue(); //
  46. return $this->success();
  47. }
  48. public function exchange()
  49. {
  50. ConfigService::syncExchangeRate();
  51. return $this->success();
  52. }
  53. }