Commit 569ece44 authored by 黄奎's avatar 黄奎

11

parent 116e2fdd
......@@ -1708,25 +1708,54 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public List<RB_Visit_Log_Extend> GetTopStatisticsList(RB_Visit_Log_Extend query)
{
var list = visit_LogRepository.GetTopStatisticsList(query);
if (list != null && list.Any())
List<RB_Visit_Log_Extend> list = new List<RB_Visit_Log_Extend>();
List<RB_Visit_Log_Extend> dataList = visit_LogRepository.GetTopStatisticsList(query);
if (dataList != null && dataList.Any())
{
string productIds = string.Join(",", list.Select(x => x.ProductID).Distinct());
string productIds = string.Join(",", dataList.Select(x => x.ProductID).Distinct());
List<RB_Building_Carrier_Extend> carrierList = new List<RB_Building_Carrier_Extend>();
List<RB_Building_Extend> buildingList = new List<RB_Building_Extend>();
List<RB_Brand_Enterprise_Extend> brandList = new List<RB_Brand_Enterprise_Extend>();
List<RB_EnterpriseServices_Extend> serviceList = new List<RB_EnterpriseServices_Extend>();
if (query.ProductType == 1)
{
var productList = building_CarrierRepository.GetBuildingCarrierListRepository(new RB_Building_Carrier_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId, SelectIds = productIds, OpeningStatus = -1 });
list.ForEach(x => x.ProductName = productList?.FirstOrDefault(z => z.ID == x.ProductID)?.CarrierName ?? "");
carrierList = building_CarrierRepository.GetBuildingCarrierListRepository(new RB_Building_Carrier_Extend { SelectIds = productIds, OpeningStatus = -1 });
}
else if (query.ProductType == 2)
{
buildingList = buildingRepository.GetBuildingRepository(new RB_Building_Extend() { QIds = productIds });
}
else if (query.ProductType == 2) { }
else if (query.ProductType == 3)
{
var productList = brand_EnterpriseRepository.GetBrandEnterpriseListRepository(new RB_Brand_Enterprise_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId, SelectIds = productIds });
list.ForEach(x => x.ProductName = productList?.FirstOrDefault(z => z.ID == x.ProductID)?.BrandName ?? "");
brandList = brand_EnterpriseRepository.GetBrandEnterpriseListRepository(new RB_Brand_Enterprise_Extend { SelectIds = productIds });
}
else if (query.ProductType == 4)
{
serviceList = enterpriseServicesRepository.GetEnterpriseServicesListRepository(new RB_EnterpriseServices_Extend() { SelectIds = productIds });
}
foreach (var item in dataList)
{
if (query.ProductType == 1)
{
item.ProductName = carrierList?.FirstOrDefault(z => z.ID == item.ProductID)?.CarrierName ?? "";
}
if (query.ProductType == 2)
{
item.ProductName = buildingList?.FirstOrDefault(qitem => qitem.BuildId == item.ProductID)?.Name ?? "";
}
if (query.ProductType == 3)
{
item.ProductName = brandList?.FirstOrDefault(z => z.ID == item.ProductID)?.BrandName ?? "";
}
if (query.ProductType == 4)
{
item.ProductName = serviceList?.FirstOrDefault(qitem => qitem.ServiceId == item.ProductID)?.Name ?? "";
}
if (!string.IsNullOrEmpty(item.ProductName))
{
list.Add(item);
}
}
else if (query.ProductType == 4) { }
}
return list;
}
......
......@@ -2,4 +2,5 @@
echo ASPNETCORE_ENVIRONMENT=Development
dotnet build
start "Mall.WebApi" dotnet bin\Debug\netcoreapp3.0\Mall.WebApi.dll --urls http://0.0.0.0:5000 --ip="127.0.0.1" --port=5000
dotnet Mall.WebApi.dll --urls http://0.0.0.0:5000 --ip="127.0.0.1" --port=5000
exit
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment