diff --git a/TradeManageNew/DD_OrderServiceNew.asmx.cs b/TradeManageNew/DD_OrderServiceNew.asmx.cs index ab4a3ed..7ce576d 100644 --- a/TradeManageNew/DD_OrderServiceNew.asmx.cs +++ b/TradeManageNew/DD_OrderServiceNew.asmx.cs @@ -30600,11 +30600,12 @@ namespace TradeManageNew #region 分页查询 [WebMethod(EnableSession = true)] - public JsonModel> GetListTemuShopGoodActive(string cs, int PageIndex, int PageSize, string sku) + public JsonModel> 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>(); 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) { diff --git a/TradeManageNew/DataNew.cs b/TradeManageNew/DataNew.cs index dace0f5..4fc306d 100644 --- a/TradeManageNew/DataNew.cs +++ b/TradeManageNew/DataNew.cs @@ -31391,19 +31391,23 @@ delete from TemuShopGoodActiveDetail where Id=@Id"; } #endregion #region 返回列表 - public static List GetListTemuShopGoodActiveDetail(string ids, string Sku) + public static List 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);