734b2c91f9
1. 将Hua.Cli.Tests、项目共享库、模块项目等所有项目的TargetFramework从net8.0/net9.0升级到net10.0 2. 完善dotnet-tools.json、模板配置文件,添加必要的构建和发布配置 3. 新增微服务、网关、应用程序的启动脚本和基础配置文件 4. 补充产品管理模块的领域、应用、Web层基础代码和多语言资源
28 lines
780 B
C#
28 lines
780 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Application.Dtos;
|
|
using Volo.Abp.Application.Services;
|
|
using Volo.Abp.Domain.Repositories;
|
|
|
|
namespace ProductManagement;
|
|
|
|
public class PublicProductAppService : ApplicationService, IPublicProductAppService
|
|
{
|
|
private readonly IRepository<Product, Guid> _productRepository;
|
|
|
|
public PublicProductAppService(IRepository<Product, Guid> productRepository)
|
|
{
|
|
_productRepository = productRepository;
|
|
}
|
|
|
|
public async Task<ListResultDto<ProductDto>> GetListAsync()
|
|
{
|
|
return new ListResultDto<ProductDto>(
|
|
ObjectMapper.Map<List<Product>, List<ProductDto>>(
|
|
await _productRepository.GetListAsync()
|
|
)
|
|
);
|
|
}
|
|
}
|