CustomPaymentAllocateService.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace bizGhs\custom\services;
  3. /**
  4. * 兼容层:批发充值销账已迁至 GhsRechargeSettleService,本类仅保留旧类名调用。
  5. *
  6. * @see GhsRechargeSettleService
  7. */
  8. class CustomPaymentAllocateService
  9. {
  10. public static function rechargeClear($custom, $amount, $shop, $staff, $payWay, $params = [])
  11. {
  12. return GhsRechargeSettleService::merchantRechargeWithAutoClear($custom, $amount, $shop, $staff, $payWay, $params);
  13. }
  14. public static function allocateAfterOnlinePay($custom, $ghs, $shop, $amount, $customRecharge, $ghsRecharge = null)
  15. {
  16. return GhsRechargeSettleService::onlinePayFifoClear($custom, $ghs, $shop, $amount, $customRecharge, $ghsRecharge);
  17. }
  18. public static function linkedClearAfterRecharge($custom, $ghs, $shop, $staff, $clear, $payWay, $customRecharge = null)
  19. {
  20. return GhsRechargeSettleService::confirmClearBillWithIncoming($custom, $ghs, $shop, $staff, $clear, $payWay, $customRecharge);
  21. }
  22. public static function allocateFromExistingBalance($custom, $ghs, $shop, $staff)
  23. {
  24. return GhsRechargeSettleService::consumePositiveBalanceFifo($custom, $ghs, $shop, $staff);
  25. }
  26. public static function ensurePairReady($custom, $ghs = null)
  27. {
  28. return GhsRechargeSettleService::lockAccountPair($custom, $ghs);
  29. }
  30. public static function buildNeedClearMap($customId, $poolAmount, $shop = null)
  31. {
  32. return GhsRechargeSettleService::planFifoByPool($customId, $poolAmount);
  33. }
  34. }