master^2
chenwenkai 12 hours ago
parent 8c8442363f
commit 97cd7ba86a

@ -30600,11 +30600,12 @@ namespace TradeManageNew
#region 分页查询
[WebMethod(EnableSession = true)]
public JsonModel<List<TemuShopGoodActive>> GetListTemuShopGoodActive(string cs, int PageIndex, int PageSize, string sku)
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 Sku = CustomIO.Base64StringToString(sku);
string SkuId = CustomIO.Base64StringToString(skuid);
if (where != "") where = "where " + where.Substring(4);
var resultModel = new JsonModel<List<TemuShopGoodActive>>();
int RowCount = 0;
@ -30626,7 +30627,7 @@ namespace TradeManageNew
ids = ids.TrimEnd(',');
if (ids != "")
{
var dlist = DataNew.GetListTemuShopGoodActiveDetail(ids, Sku);
var dlist = DataNew.GetListTemuShopGoodActiveDetail(ids, Sku, SkuId);
if (dlist != null)
{

@ -31391,19 +31391,23 @@ delete from TemuShopGoodActiveDetail where Id=@Id";
}
#endregion
#region 返回列表
public static List<TemuShopGoodActiveDetail> GetListTemuShopGoodActiveDetail(string ids, string Sku)
public static List<TemuShopGoodActiveDetail> GetListTemuShopGoodActiveDetail(string ids, string Sku, string SkuId)
{
string tsql = string.Empty;
string where= string.Empty;
string order = " order by id";
tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids + ") ";
if (!string.IsNullOrEmpty(Sku))
{
tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids + ") and sku like '%" + Sku + "%' order by id";
where = " and sku like '%" + Sku + "%' ";
}
else
if (!string.IsNullOrEmpty(SkuId))
{
tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids + ") order by id";
where = " and SKUId = '" + SkuId + "' ";
}
//string tsql = "select a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State from TemuShopGoodActive";
//string tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids + ") and sku like '%"+ Sku + "%' order by id";
tsql = tsql + where + order;
//string tsql = "select a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State from TemuShopGoodActive";
//string tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids + ") and sku like '%"+ Sku + "%' order by id";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
DataTable tb = db.ExecuteDataTable(cmd);

Loading…
Cancel
Save