temu 活动列表修改筛选

master^2
chenwenkai 14 hours ago
parent 02b148e0b0
commit 5b0156c2d5

@ -30648,18 +30648,20 @@ namespace TradeManageNew
public JsonModel<List<TemuShopGoodActive>> GetListTemuShopGoodActive(string cs, int PageIndex, int PageSize, string sku, string skuid) public JsonModel<List<TemuShopGoodActive>> GetListTemuShopGoodActive(string cs, int PageIndex, int PageSize, string sku, string skuid)
{ {
//PagesNew.Login(this.Session); //PagesNew.Login(this.Session);
string where = CustomIO.Base64StringToString(cs); string shopid = CustomIO.Base64StringToString(cs);
string Sku = CustomIO.Base64StringToString(sku); string Sku = CustomIO.Base64StringToString(sku);
string SkuId = CustomIO.Base64StringToString(skuid); string SkuId = CustomIO.Base64StringToString(skuid);
if (where != "") where = "where " + where.Substring(4); //if (where != "") where = "where " + where.Substring(4);
var resultModel = new JsonModel<List<TemuShopGoodActive>>(); var resultModel = new JsonModel<List<TemuShopGoodActive>>();
int RowCount = 0; int RowCount = 0;
resultModel.DataSource = DataNew.GetListTemuShopGoodActive(where, PageIndex, PageSize, "", out RowCount); resultModel.DataSource = DataNew.GetListTemuShopGoodActive_Test(shopid, Sku, SkuId);
resultModel.RowCount = RowCount; //resultModel.RowCount = RowCount;
string ids = ""; string ids = "";
if (resultModel.DataSource != null) if (resultModel.DataSource != null)
{ {
RowCount = resultModel.DataSource.Count();
resultModel.DataSource = resultModel.DataSource.Take(PageSize).Skip(PageSize * (PageIndex - 1)).ToList();
var Active= DataNew.GetListTemuShopGoodActive(); var Active= DataNew.GetListTemuShopGoodActive();
//foreach (var omd in resultModel.DataSource) //foreach (var omd in resultModel.DataSource)
//{ //{
@ -30710,8 +30712,8 @@ namespace TradeManageNew
} }
} }
} }
resultModel.RowCount = RowCount;
return resultModel; return resultModel;
} }
#endregion #endregion

@ -31440,7 +31440,42 @@ left join jc_userinfo c on a.CreateUserId=c.UserId
return ListModel; return ListModel;
} }
#endregion #endregion
#region 分页动态条件查询
public static List<TemuShopGoodActive> GetListTemuShopGoodActive_Test(string shopid, string Sku, string SkuId)
{
string Where = string.Empty;
string order = " ) a order by a.ID desc";
string tsql = @"select ID,Shopid,SKU,SPUID,BasePrice,CreateUserId,CreateTime,PostPrice,State,ShopName,CreateUserName from (
select distinct ID=cast(a.ID as int),a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State,b.ShopName,CreateUserName=c.Name
from TemuShopGoodActive a
left Join JC_Shop b on a.Shopid = b.Shopid
left join jc_userinfo c on a.CreateUserId=c.UserId
left join TemuShopGoodActiveDetail d on a.ID=d.ActiveId where 1=1
";
if (!string.IsNullOrEmpty(shopid))
{
Where += shopid;
}
if (!string.IsNullOrEmpty(Sku))
{
Where += " and d.sku like '%" + Sku + "%'";
}
if (!string.IsNullOrEmpty(SkuId))
{
Where += " and d.SKUId = '" + SkuId + "'";
}
tsql = tsql + Where + order;
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
DataTable tb = db.ExecuteDataTable(cmd);
List<TemuShopGoodActive> ListModel = tb.ToList<TemuShopGoodActive>();
ListModel = tb.ToList<TemuShopGoodActive>();
return ListModel;
}
#endregion
#region 根据sku读temu订单 #region 根据sku读temu订单
public static List<TemuSKUOrder> GetTemuOrderFromSKU(string SKU) public static List<TemuSKUOrder> GetTemuOrderFromSKU(string SKU)

Loading…
Cancel
Save