refactor(commerce): split administration services

This commit is contained in:
2026-08-04 09:29:20 +08:00
parent 4d85463a87
commit 0bd075e20d
29 changed files with 1187 additions and 952 deletions

View File

@@ -20,7 +20,7 @@ namespace Tiku.Api.Controllers;
[Route("api/student/commerce")]
public sealed class CommerceController(
ICommerceService commerceService,
ICommerceAdminService commerceAdminService,
IRefundAdministrationService refundAdministrationService,
ICurrentUser currentUser,
ITenantContext currentTenant,
ITenantContextInitializer tenantInitializer,
@@ -165,7 +165,7 @@ public sealed class CommerceController(
RefundNotificationDto request,
CancellationToken cancellationToken)
{
return Ok(await commerceAdminService.ProcessRefundNotificationAsync(
return Ok(await refundAdministrationService.ProcessRefundNotificationAsync(
await ResolveNotificationTenantAsync(tenantCode, cancellationToken),
request.ToCommand(PaymentProviders.WechatPay),
cancellationToken));
@@ -180,7 +180,7 @@ public sealed class CommerceController(
RefundNotificationDto request,
CancellationToken cancellationToken)
{
return Ok(await commerceAdminService.ProcessRefundNotificationAsync(
return Ok(await refundAdministrationService.ProcessRefundNotificationAsync(
await ResolveNotificationTenantAsync(tenantCode, cancellationToken),
request.ToCommand(PaymentProviders.Alipay),
cancellationToken));
@@ -263,4 +263,4 @@ public sealed class CommerceController(
return JsonDocument.Parse(rawBody);
}
}
}