diff --git a/SiNan.API/Program.cs b/SiNan.API/Program.cs index 1e1f404..c7ed8cd 100644 --- a/SiNan.API/Program.cs +++ b/SiNan.API/Program.cs @@ -9,6 +9,7 @@ using SiNan.Common.Extensions; using SiNan.Common.Http; using SiNan.Common.Log; using SiNan.Common.Models; +using SiNan.Model; using System.Reflection; using System.Text; using Yitter.IdGenerator; @@ -65,6 +66,7 @@ services.AddControllers(c => //setupAction.SerializerSettings.DefaultValueHandling = Newtonsoft.Json.DefaultValueHandling.Include; }); +services.AddMapper(new MappingProfiles()); services.AddEndpointsApiExplorer(); services.AddSwaggerGen(c => { diff --git a/SiNan.Business/GOIBusiness.cs b/SiNan.Business/GOIBusiness.cs index 58afb18..bcd0157 100644 --- a/SiNan.Business/GOIBusiness.cs +++ b/SiNan.Business/GOIBusiness.cs @@ -215,7 +215,7 @@ namespace SiNan.Business return new ListResponse() { ItemList = new List() }; var productIdList = productList.Select(p => p.Id).ToList(); - var skuList = fsql.Select().Where(ps => productIdList.Contains(ps.Id)).ToList(); + var skuList = fsql.Select().Where(ps => productIdList.Contains(ps.ProductId)).ToList(); var skuIdList = skuList.Select(s => s.Id).ToList(); var startDate_yestoday = DateTime.Now.Date.AddDays(-1);