admin/src/Oms.Application/Services/System/CountryService.cs
zzh 0a5bd75618 feat: 新增财务应收应付接口并补充 Swagger 接口名称
- 新增 Finance 模块应收应付分页查询及订单费用联查

- 为 DataPerm、Xhs 等缺失接口补充中文 summary 接口名称

- 优化微信公众号验签 Swagger 命名并补充路由集成测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:15:15 +08:00

36 lines
1.1 KiB
C#

using Fake.Application;
using Microsoft.AspNetCore.Mvc;
using Oms.Application.Dtos.System;
using Oms.Domain.SystemAggregate.Repositories;
namespace Oms.Application.Services.System;
/// <summary>
/// 国家 API 服务。
/// </summary>
[ApiExplorerSettings(GroupName = "OMS-System")]
public class CountryService : ApplicationService
{
private ICountryRepository CountryRepository => LazyServiceProvider.GetRequiredService<ICountryRepository>();
/// <summary>
/// 查询国家列表。
/// </summary>
/// <returns>国家列表,返回全部有效国家主数据。</returns>
[HttpGet("/system/country/list")]
public async Task<List<CountryOutput>> GetListAsync()
{
return (await CountryRepository.GetListAsync())
.OrderBy(x => x.CountryCode)
.ThenBy(x => x.EnglishName)
.Select(x => new CountryOutput
{
Id = x.Id,
ChineseName = x.ChineseName,
EnglishName = x.EnglishName,
CountryCode = x.CountryCode
})
.ToList();
}
}