using KJD_Web.BLL.BXX; using KJD_Web.BLL.WXXD; using KJD_Web.Utils; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Web; using System.Web.Services; namespace KJD_Web { /// /// ProductService 的摘要说明 /// [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 // [System.Web.Script.Services.ScriptService] public class BXXProductService : System.Web.Services.WebService { private string GetRequestJsonString() { Context.Response.ContentType = "text/html;charset=utf-8"; Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流 { // 还原数据流 byte[] b = new byte[s.Length]; s.Read(b, 0, (int)s.Length); string jsonText = Encoding.UTF8.GetString(b); // JSON字符串 if (string.IsNullOrEmpty(jsonText)) { var qs = HttpContext.Current.Request.QueryString; if (qs != null && qs.Keys.Count > 0) { jsonText = "{"; foreach (var key in qs.Keys) { jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";"; } jsonText = jsonText.TrimEnd(';') + "}"; } } return jsonText; } } [WebMethod] public void get_product_spu_id_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductSpuIdLst(jsontext); Context.Response.Write(result); Context.Response.End(); } //AddProdDownSku [WebMethod] public void add_prod_down_sku() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddProdDownSku(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_prod_down_sku_lst_by_sku_codes() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProdDownSkuLstBySkuCodes(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_product_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductList(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_product_detail_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductList(jsontext, true); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_product_list_random() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductListRandom(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void add_prod_wx_complate() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddProdWXComplate(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_prod_wx_complate_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProdWXComplateList(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_sku_replace_img_list_random() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetSkuReplaceImgListRandom(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void add_product() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddProduct(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_product() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyProduct(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_violation_prod() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyViolationProd(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_best_sale_prod() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyBestSaleProd(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void del_db_product() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().DelDbProd(jsontext); Context.Response.Write(result); Context.Response.End(); } //[WebMethod] //public void mdy_product() //{ // string jsontext = GetRequestJsonString(); // var result = jsontext; // //result = new BXXProductManage().MdyShop(jsontext); // Context.Response.Write(result); // Context.Response.End(); //} [WebMethod] public void mdy_product_notes() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyProductNotes(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_db_product() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyDBProduct(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_product_groups() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductGroups(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void add_product_groups() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddProductGroup(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void del_product_groups() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().DelProductGroup(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_pdd_product_cates() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductMainCates(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_product_cates() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetProductCates(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void add_sku_img_replace() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddSkuImgReplace(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_sku_img_replace() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdySkuImgReplace(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_sku_img_replace_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetSkuImgReplaceList(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_sku_img_replace_detail_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetSkuImgReplaceList(jsontext, true); Context.Response.Write(result); Context.Response.End(); } //AddSkuImg [WebMethod] public void add_sku_img() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddSkuImg(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_wx_tokens() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new WXShopManage().E57GetWxTokens(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void wx_api_get_all_cate() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().WxApiGetWxAllCate(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void wx_api_category_classify() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().WxApiCategoryClassify(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void wx_api_upload_image() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().WxApiUploadImage(jsontext); Context.Response.Write(result); Context.Response.End(); } //AddJSTSku [WebMethod] public void add_jst_sku() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddJSTSku(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void mdy_jst_sku() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().MdyJSTSku(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_jst_sku_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetJSTSkuList(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void set_random_company_product_config() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().SetRandomCompanyProductConfig(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_random_company_product_config() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetRandomCompanyProductConfig(jsontext); Context.Response.Write(result); Context.Response.End(); } /// /// 拼多多关联新增 /// [WebMethod] public void add_relation() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddRelation(jsontext); Context.Response.Write(result); Context.Response.End(); } /// /// 拼多多关联获取 /// [WebMethod] public void get_relation() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetRelation(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void add_mdy_jst_product_ban() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().AddMdyJstProductBan(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_jst_product_coid_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetJstProductCoidList(jsontext); Context.Response.Write(result); Context.Response.End(); } [WebMethod] public void get_jst_product_ban_platform_list() { string jsontext = GetRequestJsonString(); var result = jsontext; result = new BXXProductManage().GetJstProductBanPlatformList(jsontext); Context.Response.Write(result); Context.Response.End(); } } }