fix 获取注入服务问题

This commit is contained in:
2025-12-09 14:40:21 +08:00
parent 149fa2e9e2
commit cdd435efb3

View File

@@ -55,7 +55,7 @@ public class VouchersController : ControllerBase
{
var userCode = _currentUser.GetUserClaim(UserClaimConstants.JinkoCode);
request.UserCode = userCode;
return await _namedResolver.GetService<IVoucherService>(request.Type.ToString()).GetPageAsync(request);
return await _namedResolver.GetService<IVoucherService>(request.Type.ToString() + "VoucherService").GetPageAsync(request);
}
@@ -101,7 +101,7 @@ public class VouchersController : ControllerBase
[IgnoreTenant]
public async Task<Pagination<VoucherBalancePageResponse>> GetMyVoucherBalancePageAsync([FromQuery] VoucherBalancePageRequest request)
{
var srv = _namedResolver.GetService<IVoucherService>(request.Type.ToString());
var srv = _namedResolver.GetService<IVoucherService>(request.Type.ToString() + "VoucherService");
return await srv.GetVoucherBalancePageAsync(request);
}
}