temu 活动列表修改筛选

master^2
chenwenkai 15 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)
{
//PagesNew.Login(this.Session);
string where = CustomIO.Base64StringToString(cs);
string shopid = CustomIO.Base64StringToString(cs);
string Sku = CustomIO.Base64StringToString(sku);
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>>();
int RowCount = 0;
resultModel.DataSource = DataNew.GetListTemuShopGoodActive(where, PageIndex, PageSize, "", out RowCount);
resultModel.RowCount = RowCount;
resultModel.DataSource = DataNew.GetListTemuShopGoodActive_Test(shopid, Sku, SkuId);
//resultModel.RowCount = RowCount;
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();
//foreach (var omd in resultModel.DataSource)
//{
@ -30710,8 +30712,8 @@ namespace TradeManageNew
}
}
}
return resultModel;
resultModel.RowCount = RowCount;
return resultModel;
}
#endregion

@ -31442,6 +31442,41 @@ left join jc_userinfo c on a.CreateUserId=c.UserId
#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订单
public static List<TemuSKUOrder> GetTemuOrderFromSKU(string SKU)
{

Loading…
Cancel
Save