zhaoy 6 ay önce
ebeveyn
işleme
a773b743ad
2 değiştirilmiş dosya ile 17 ekleme ve 2 silme
  1. +9
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsDto.cs
  2. +8
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs

+ 9
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsDto.cs Dosyayı Görüntüle

@@ -18,8 +18,16 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
public decimal Price { get; set; }
public string GoodsUintId { get; set; }
public string GoodsTypeId { get; set; }
public string GroupId { get; set; }
public string GoodsTypeName { get; set; }
public string GoodsUnitName { get; set; }
public List<GoodsAttributePrice> GoodsAttributePrice { get; set; }
}
public class GoodsAttributePrice
{
public string Id { get; set; }
public string GoodsId { get; set; }
public string GoodsattributeValueId { get; set; }
public string GoodsattributeValue { get; set; }
public Decimal Price { get; set; }
}
}

+ 8
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs Dosyayı Görüntüle

@@ -44,7 +44,14 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
GoodsTypeName=b.Name,
GoodsUnitName=c.Name

}).ToPageList(inputDto.Current, inputDto.PageSize, ref total);
})
.Mapper(x =>
{
var GoodsAttributePriceList=SqlSugarDb.Db.Queryable<BPA_GoodsAttributePrice>().Where(y => y.GoodsId == x.Id).ToList();
var list=GoodsAttributePriceList.Adapt<List<GoodsAttributePrice>>();
x.GoodsAttributePrice = list;
})
.ToPageList(inputDto.Current, inputDto.PageSize, ref total);

return new PageUtil<List<GoodsDto>>()
{


Yükleniyor…
İptal
Kaydet