You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
2 years ago
|
using Znyc.CloudCar.IRepository.EquipmentPicture;
|
||
|
using Znyc.CloudCar.IServices.EquipmentPicture;
|
||
|
using Znyc.CloudCar.Model.Dtos.EquipmentPicture;
|
||
|
|
||
|
namespace Znyc.CloudCar.Services.EquipmentPicture
|
||
|
{
|
||
|
public class EquipmentPictureService : IEquipmentPictureService
|
||
|
{
|
||
|
private readonly IEquipmentPictureRepository _equipmentPictureRepository;
|
||
|
|
||
|
public EquipmentPictureService(
|
||
|
IEquipmentPictureRepository equipmentPictureRepository
|
||
|
)
|
||
|
{
|
||
|
_equipmentPictureRepository = equipmentPictureRepository;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询设备图片
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
public async Task<List<EquipmentPictureOutput>> GetListAsync(long id)
|
||
|
{
|
||
|
List<EquipmentPictureOutput> list = await _equipmentPictureRepository.Select
|
||
|
.Where(x => x.IsEnabled && x.EquipmentId == id && x.IsDeleted == false)
|
||
|
.ToListAsync<EquipmentPictureOutput>();
|
||
|
return list;
|
||
|
}
|
||
|
}
|
||
|
}
|