|
@@ -143,6 +143,8 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && (m.Status == 2 || m.QueryCount == 2));
|
|
IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && (m.Status == 2 || m.QueryCount == 2));
|
|
DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
|
|
DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
|
|
|
|
+ int IsActNum = query.Count(m => m.IsAct == 1);
|
|
|
|
+ int UnActNum = query.Count(m => m.IsAct == 0);
|
|
if (!string.IsNullOrEmpty(SearchKey))
|
|
if (!string.IsNullOrEmpty(SearchKey))
|
|
{
|
|
{
|
|
query = query.Where(m => m.Name.Contains(SearchKey));
|
|
query = query.Where(m => m.Name.Contains(SearchKey));
|
|
@@ -158,6 +160,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
}
|
|
}
|
|
if (IsAct > 0)
|
|
if (IsAct > 0)
|
|
{
|
|
{
|
|
|
|
+ if (IsAct == 2) IsAct = 0;
|
|
query = query.Where(m => m.IsAct == IsAct);
|
|
query = query.Where(m => m.IsAct == IsAct);
|
|
}
|
|
}
|
|
int TotalCount = query.Count();
|
|
int TotalCount = query.Count();
|
|
@@ -165,9 +168,6 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
int ProductCount = query.Count();
|
|
int ProductCount = query.Count();
|
|
int ProductActCount = query.Count(m => m.ActivationStatus == 1);
|
|
int ProductActCount = query.Count(m => m.ActivationStatus == 1);
|
|
int ProductUnActCount = ProductCount - ProductActCount;
|
|
int ProductUnActCount = ProductCount - ProductActCount;
|
|
-
|
|
|
|
- int IsActNum = query.Count(m => m.IsAct == 1);
|
|
|
|
- int UnActNum = ProductCount - IsActNum;
|
|
|
|
if (TradeSort == "1")
|
|
if (TradeSort == "1")
|
|
{
|
|
{
|
|
if (DateSort == "1")
|
|
if (DateSort == "1")
|