From 72f16034ac5ea75b92648bcfd8cb229cd50d8185 Mon Sep 17 00:00:00 2001 From: chfei Date: Mon, 14 Sep 2026 18:31:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4Asmx=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BAController=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AsmxApiController.cs | 63 +++ .../Controllers/BXX/BXXPriceController.cs | 139 +++++ .../Controllers/BXX/BXXProductController.cs | 448 ++++++++++++++++ .../BXX/BXXProductThirdController.cs | 138 +++++ .../Controllers/BXX/BXXShopController.cs | 260 ++++++++++ .../Controllers/BXX/BXXUserController.cs | 189 +++++++ .../Controllers/DY/DYShopController.cs | 149 ++++++ .../Controllers/DY/DYUserController.cs | 119 +++++ KJD_WebService/Controllers/OrderController.cs | 103 ++++ KJD_WebService/Controllers/PriceController.cs | 98 ++++ .../Controllers/ProductController.cs | 230 +++++++++ .../Controllers/ProductThirdController.cs | 177 +++++++ KJD_WebService/Controllers/ShopController.cs | 199 +++++++ .../Controllers/UpdateController.cs | 49 ++ KJD_WebService/Controllers/UserController.cs | 138 +++++ .../Controllers/WX/WXOrderController.cs | 309 +++++++++++ .../Controllers/WX/WXProductController.cs | 397 ++++++++++++++ .../Controllers/WX/WXShopController.cs | 486 ++++++++++++++++++ .../WX/WXShopRevenueStatisticsController.cs | 29 ++ .../Controllers/WX/WXUserController.cs | 319 ++++++++++++ .../Controllers/WXUserController.cs | 54 -- KJD_WebService/GetPostActionSelector.cs | 32 ++ KJD_WebService/Global.asax.cs | 225 ++++---- KJD_WebService/KJD_WebService.csproj | 122 +---- KJD_WebService/Web.config | 86 ++-- KJD_WebService/WebApiConfig.cs | 20 +- KJD_WebService/packages.config | 18 +- 27 files changed, 4270 insertions(+), 326 deletions(-) create mode 100644 KJD_WebService/Controllers/AsmxApiController.cs create mode 100644 KJD_WebService/Controllers/BXX/BXXPriceController.cs create mode 100644 KJD_WebService/Controllers/BXX/BXXProductController.cs create mode 100644 KJD_WebService/Controllers/BXX/BXXProductThirdController.cs create mode 100644 KJD_WebService/Controllers/BXX/BXXShopController.cs create mode 100644 KJD_WebService/Controllers/BXX/BXXUserController.cs create mode 100644 KJD_WebService/Controllers/DY/DYShopController.cs create mode 100644 KJD_WebService/Controllers/DY/DYUserController.cs create mode 100644 KJD_WebService/Controllers/OrderController.cs create mode 100644 KJD_WebService/Controllers/PriceController.cs create mode 100644 KJD_WebService/Controllers/ProductController.cs create mode 100644 KJD_WebService/Controllers/ProductThirdController.cs create mode 100644 KJD_WebService/Controllers/ShopController.cs create mode 100644 KJD_WebService/Controllers/UpdateController.cs create mode 100644 KJD_WebService/Controllers/UserController.cs create mode 100644 KJD_WebService/Controllers/WX/WXOrderController.cs create mode 100644 KJD_WebService/Controllers/WX/WXProductController.cs create mode 100644 KJD_WebService/Controllers/WX/WXShopController.cs create mode 100644 KJD_WebService/Controllers/WX/WXShopRevenueStatisticsController.cs create mode 100644 KJD_WebService/Controllers/WX/WXUserController.cs delete mode 100644 KJD_WebService/Controllers/WXUserController.cs create mode 100644 KJD_WebService/GetPostActionSelector.cs diff --git a/KJD_WebService/Controllers/AsmxApiController.cs b/KJD_WebService/Controllers/AsmxApiController.cs new file mode 100644 index 0000000..e6aea10 --- /dev/null +++ b/KJD_WebService/Controllers/AsmxApiController.cs @@ -0,0 +1,63 @@ +using KJD_Web.BLL.WXXD; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Web; +using System.Web.Http; +using System.Web.Http.Controllers; + +namespace KJD_Web.Controllers +{ + public class AsmxApiController : ApiController + { + //public override System.Threading.Tasks.Task ExecuteAsync( + //HttpControllerContext controllerContext, + //System.Threading.CancellationToken cancellationToken) + //{ + // // 把 POST 请求的 HTTP 方法临时改成 GET,绕过动词匹配 + // if (controllerContext.Request.Method == HttpMethod.Post) + // { + // controllerContext.Request.Method = HttpMethod.Get; + // } + + // return base.ExecuteAsync(controllerContext, cancellationToken); + //} + protected 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; + } + } + protected IHttpActionResult JsonString(string result) + { + var response = Request.CreateResponse(HttpStatusCode.OK); + response.Content = new StringContent(result, Encoding.UTF8, "text/html"); + return base.ResponseMessage(response); + } + } +} \ No newline at end of file diff --git a/KJD_WebService/Controllers/BXX/BXXPriceController.cs b/KJD_WebService/Controllers/BXX/BXXPriceController.cs new file mode 100644 index 0000000..9bdd98f --- /dev/null +++ b/KJD_WebService/Controllers/BXX/BXXPriceController.cs @@ -0,0 +1,139 @@ +using KJD_Web.BLL.BXX; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.BXX +{ + [RoutePrefix("bxx_price")] + [Route("{action}")] + public class BXXPriceController : AsmxApiController + { + public IHttpActionResult get_price_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().GetPriceList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().AddPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().DelDbPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().MdyDBPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().MdyPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().AddPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().DelPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_purchase_price_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().GetPurchasePriceList(jsontext); + + return JsonString(result); + } + + //AddExtCodePrice + public IHttpActionResult add_ext_code_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().AddExtCodePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_ext_code_price_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().GetExtCodePriceList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_ext_code_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().DelDbExtCodePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_ext_code_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXPriceManage().MdyDBExtCodePrice(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/BXX/BXXProductController.cs b/KJD_WebService/Controllers/BXX/BXXProductController.cs new file mode 100644 index 0000000..3c7cb1a --- /dev/null +++ b/KJD_WebService/Controllers/BXX/BXXProductController.cs @@ -0,0 +1,448 @@ +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.BXX +{ + [RoutePrefix("bxx_product")] + [Route("{action}")] + public class BXXProductController : AsmxApiController + { + public IHttpActionResult get_product_spu_id_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductSpuIdLst(jsontext); + + return JsonString(result); + } + + //AddProdDownSku + public IHttpActionResult add_prod_down_sku() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddProdDownSku(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_prod_down_sku_lst_by_sku_codes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProdDownSkuLstBySkuCodes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult get_product_list_random() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductListRandom(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_prod_wx_complate() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddProdWXComplate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_prod_wx_complate_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProdWXComplateList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sku_replace_img_list_random() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetSkuReplaceImgListRandom(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdyProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_violation_prod() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdyViolationProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_best_sale_prod() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdyBestSaleProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().DelDbProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdyDBProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_groups() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductGroups(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_product_groups() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddProductGroup(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_product_groups() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().DelProductGroup(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductNotes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_product_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddProductNotes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_product_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().DelProductNotes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_product_cates() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductMainCates(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_cates() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductCates(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_sku_img_replace() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddSkuImgReplace(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_sku_img_replace() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdySkuImgReplace(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sku_img_replace_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetSkuImgReplaceList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sku_img_replace_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetSkuImgReplaceList(jsontext, true); + + return JsonString(result); + } + + //AddSkuImg + public IHttpActionResult add_sku_img() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddSkuImg(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_wx_tokens() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().E57GetWxTokens(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_get_all_cate() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiGetWxAllCate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_category_classify() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiCategoryClassify(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_upload_image() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiUploadImage(jsontext); + + return JsonString(result); + } + + //AddJSTSku + public IHttpActionResult add_jst_sku() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddJSTSku(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_jst_sku() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().MdyJSTSku(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_jst_sku_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetJSTSkuList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult set_random_company_product_config() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().SetRandomCompanyProductConfig(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_random_company_product_config() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetRandomCompanyProductConfig(jsontext); + + return JsonString(result); + } + + /// + /// 拼多多关联新增 + /// + public IHttpActionResult add_relation() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddRelation(jsontext); + + return JsonString(result); + } + + /// + /// 拼多多关联获取 + /// + public IHttpActionResult get_relation() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetRelation(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_mdy_jst_product_ban() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().AddMdyJstProductBan(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_jst_product_coid_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetJstProductCoidList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_jst_product_ban_platform_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetJstProductBanPlatformList(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/BXX/BXXProductThirdController.cs b/KJD_WebService/Controllers/BXX/BXXProductThirdController.cs new file mode 100644 index 0000000..82b5760 --- /dev/null +++ b/KJD_WebService/Controllers/BXX/BXXProductThirdController.cs @@ -0,0 +1,138 @@ +using KJD_Web.BLL.BXX; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.BXX +{ + [RoutePrefix("bxx_product_third")] + [Route("{action}")] + public class BXXProductThirdController : AsmxApiController + { + public IHttpActionResult get_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().GetProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().GetProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult add_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().AddProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().DelDbProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product_category() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().MdyProductCategory(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().AddUserSelectProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_user_select_product_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().MdyUserSelectProductStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().GetUserSelectProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().GetUserSelectProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult del_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().DelSelectProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult set_select_product_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().SetSelectProductSubSa(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product_select_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductThirdManage().MdyProductSelectNotes(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/BXX/BXXShopController.cs b/KJD_WebService/Controllers/BXX/BXXShopController.cs new file mode 100644 index 0000000..7cd6130 --- /dev/null +++ b/KJD_WebService/Controllers/BXX/BXXShopController.cs @@ -0,0 +1,260 @@ +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.BXX +{ + [RoutePrefix("bxx_shop")] + [Route("{action}")] + public class BXXShopController : AsmxApiController + { + public IHttpActionResult get_pdd_client_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetPddClientInfo(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_shop_client_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetShopClientInfo(jsontext); + + return JsonString(result); + } + + //WXAddMdyShopClientInfo + public IHttpActionResult add_mdy_shop_client_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().AddMdyShopClientInfo(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_one_login_name_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetOneLoginNameShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().AddShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().DelShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_anti_content() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyAntiContent(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyCookieAndLoginStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult sub_sa_get_select_prod_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().SubSaGetSelectProdShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_add_prod_remaining() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().UpdateAddProdRemaining(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().AddShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().DelShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult set_shop_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().SetShopSubSa(jsontext); + + return JsonString(result); + } + + public IHttpActionResult e57_get_wx_tokens() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().E57GetWxTokens(jsontext); + + return JsonString(result); + } + + public IHttpActionResult e57_get_pdd_shop_token() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().E57GetPddShopToken(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_weidian_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().AddWeiDianShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_weidian_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyWeiDianShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_weidian_shop_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().MdyWeiDianShopCookie(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_weidian_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().GetWeiDianShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_weidian_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXShopManage().DelWeiDianShop(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/BXX/BXXUserController.cs b/KJD_WebService/Controllers/BXX/BXXUserController.cs new file mode 100644 index 0000000..df3376b --- /dev/null +++ b/KJD_WebService/Controllers/BXX/BXXUserController.cs @@ -0,0 +1,189 @@ +using KJD_Web.BLL.BXX; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.BXX +{ + [RoutePrefix("bxx_user")] + [Route("{action}")] + public class BXXUserController : AsmxApiController + { + public IHttpActionResult user_login() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().CheckUserLogin(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_package_sign() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().GetPackageSign(jsontext); + + return JsonString(result); + } + + public IHttpActionResult change_password() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().ChangePassword(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().GetSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().UpdateSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().AddSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult delete_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().DelUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_all_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().GetAllUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().UpdateUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().AddUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_scm121_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().UpdateScm121Cookie(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_scm121_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().GetScm121Cookie(jsontext); + + return JsonString(result); + } + + //AddBuyer + public IHttpActionResult add_buyer() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().AddBuyer(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_buyer() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().MdyBuyer(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_buyer_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().MdyBuyerCookie(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_buyer() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().GetBuyer(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_buyer() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXUserManage().DelBuyer(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/DY/DYShopController.cs b/KJD_WebService/Controllers/DY/DYShopController.cs new file mode 100644 index 0000000..9bcbe85 --- /dev/null +++ b/KJD_WebService/Controllers/DY/DYShopController.cs @@ -0,0 +1,149 @@ +using KJD_Web.BLL.BXX; +using KJD_Web.BLL.DYXD; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.DY +{ + [RoutePrefix("dyxd_shop")] + [Route("{action}")] + public class DYShopController : AsmxApiController + { + public IHttpActionResult get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().GetShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_one_login_name_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().GetOneLoginNameShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().AddShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().DelShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().MdyShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().MdyCookieAndLoginStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().GetShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult sub_sa_get_select_prod_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().SubSaGetSelectProdShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_add_prod_remaining() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().UpdateAddProdRemaining(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().MdyShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().AddShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().DelShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult set_shop_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYShopManage().SetShopSubSa(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/DY/DYUserController.cs b/KJD_WebService/Controllers/DY/DYUserController.cs new file mode 100644 index 0000000..ad03b6c --- /dev/null +++ b/KJD_WebService/Controllers/DY/DYUserController.cs @@ -0,0 +1,119 @@ +using KJD_Web.BLL.BXX; +using KJD_Web.BLL.DYXD; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.DY +{ + [RoutePrefix("dyxd_user")] + [Route("{action}")] + public class DYUserController : AsmxApiController + { + public IHttpActionResult user_login() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().CheckUserLogin(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_package_sign() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().GetPackageSign(jsontext); + + return JsonString(result); + } + + public IHttpActionResult change_password() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().ChangePassword(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().GetSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().UpdateSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().AddSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult delete_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().DelUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_all_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().GetAllUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().UpdateUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new DYUserManage().AddUser(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/OrderController.cs b/KJD_WebService/Controllers/OrderController.cs new file mode 100644 index 0000000..7df1dd2 --- /dev/null +++ b/KJD_WebService/Controllers/OrderController.cs @@ -0,0 +1,103 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("order")] + [Route("{action}")] + public class OrderController : AsmxApiController + { + public IHttpActionResult add_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().AddOrder(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_order_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().GetOrderList(jsontext); + + return JsonString(result); + } + + //UpdateOrderStatus1 + public IHttpActionResult update_order_status1() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().UpdateOrderStatus1(jsontext); + + return JsonString(result); + } + + //AddOrderCodeFile + public IHttpActionResult add_order_code_file() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().AddOrderCodeFile(jsontext); + + return JsonString(result); + } + + //SaveOrderCodeFileLink + public IHttpActionResult save_order_code_file_link() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().SaveOrderCodeFileLink(jsontext); + + return JsonString(result); + } + + //getOrderCodeFile + public IHttpActionResult get_order_code_file() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().getOrderCodeFile(jsontext); + + return JsonString(result); + } + + //UploadOrder + public IHttpActionResult upload_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().UploadOrder(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_order_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().UpdateOrderStatus(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/PriceController.cs b/KJD_WebService/Controllers/PriceController.cs new file mode 100644 index 0000000..1074271 --- /dev/null +++ b/KJD_WebService/Controllers/PriceController.cs @@ -0,0 +1,98 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("price")] + [Route("{action}")] + public class PriceController : AsmxApiController + { + public IHttpActionResult get_price_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().GetPriceList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().AddPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().DelDbPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().MdyDBPrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().MdyPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().AddPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_purchase_price() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().DelPurchasePrice(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_purchase_price_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new PriceManage().GetPurchasePriceList(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/ProductController.cs b/KJD_WebService/Controllers/ProductController.cs new file mode 100644 index 0000000..7d6c7db --- /dev/null +++ b/KJD_WebService/Controllers/ProductController.cs @@ -0,0 +1,230 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("product")] + [Route("{action}")] + public class ProductController : AsmxApiController + { + public IHttpActionResult get_product_group_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().GetProductGroupList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().GetProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().GetProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult add_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().AddProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().DelDbProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().MdyDBProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().AddUserSelectProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_user_select_product_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().MdyUserSelectProductStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().GetUserSelectProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().GetUserSelectProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult del_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().DelSelectProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult set_select_product_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().SetSelectProductSubSa(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product_select_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductManage().MdyProductSelectNotes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_select_prod_db_id_map_draft_id_list() + { + + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetSelectProdDbIdMapDraftIdList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_select_prod_map_up_spu_id_list() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetSelectProdMapUpSpuIdList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_sku_image() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().AddSkuImg(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_sku_image() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().DelSkuImg(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sku_image_list() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetSkuImgList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_base64_img_url() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().MdyBase64ImgUrl(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_base64_img_use_count() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().MdyBase64ImgUseCount(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_cate_size_weight_config_v2() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().AddCateSizeWeightConfig(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_cate_size_weight_config_v2() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetCateSizeWeightConfig(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/ProductThirdController.cs b/KJD_WebService/Controllers/ProductThirdController.cs new file mode 100644 index 0000000..393b678 --- /dev/null +++ b/KJD_WebService/Controllers/ProductThirdController.cs @@ -0,0 +1,177 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("product_third")] + [Route("{action}")] + public class ProductThirdController : AsmxApiController + { + public IHttpActionResult get_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult get_product_empty_product_json_for_bak() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetProductListEmptyProductJsonForBak(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult get_product_detail_list_bak() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetProductListBak(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult add_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().AddProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().DelDbProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product_category() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().MdyProductCategory(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().MdyDBProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().AddUserSelectProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_user_select_product_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().MdyUserSelectProductStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetUserSelectProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_user_select_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().GetUserSelectProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult del_select_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().DelSelectProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult set_select_product_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().SetSelectProductSubSa(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_product_select_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().MdyProductSelectNotes(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_select_prod_db_id_map_draft_id_list() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductThirdManage().GetSelectProdDbIdMapDraftIdList(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/ShopController.cs b/KJD_WebService/Controllers/ShopController.cs new file mode 100644 index 0000000..1ede89e --- /dev/null +++ b/KJD_WebService/Controllers/ShopController.cs @@ -0,0 +1,199 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("shop")] + [Route("{action}")] + public class ShopController : AsmxApiController + { + public IHttpActionResult get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().GetShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_one_login_name_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().GetOneLoginNameShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().AddShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().DelShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().MdyShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().MdyCookieAndLoginStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_shop_ads_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().MdyAdsCookieAndLoginStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().GetShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult sub_sa_get_select_prod_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().SubSaGetSelectProdShop(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_add_prod_remaining() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().UpdateAddProdRemaining(jsontext); + + return JsonString(result); + } + + public IHttpActionResult admin_mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().MdyShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().AddShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult admin_del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().DelShop(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult set_shop_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().SetShopSubSa(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_shop_card_code_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().GetShopCardCodeList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult create_shop_card_code() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().CreateShopCardCode(jsontext); + + return JsonString(result); + } + + public IHttpActionResult del_shop_card_code() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().DelShopCardCode(jsontext); + + return JsonString(result); + } + + ///ActiveJitCardCode + public IHttpActionResult active_jit_card_code() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ShopManage().ActiveJitCardCode(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/UpdateController.cs b/KJD_WebService/Controllers/UpdateController.cs new file mode 100644 index 0000000..146df4f --- /dev/null +++ b/KJD_WebService/Controllers/UpdateController.cs @@ -0,0 +1,49 @@ +using KJD_Web.BLL; +using KJD_Web.Utils; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web; +using System.Web.Services; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("update")] + [Route("{action}")] + public class UpdateController : AsmxApiController + { + public IHttpActionResult get_update() + { + var jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UpdateManage().GetUpdate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_update_new() + { + var jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UpdateManage().GetUpdateNew(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_wx_finder_order_update() + { + var jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UpdateManage().GetWxFindOrderUpdate(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/UserController.cs b/KJD_WebService/Controllers/UserController.cs new file mode 100644 index 0000000..7a0271f --- /dev/null +++ b/KJD_WebService/Controllers/UserController.cs @@ -0,0 +1,138 @@ +using KJD_Web.BLL; +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; +using System.Web.Http; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("user")] + [Route("{action}")] + public class UserController : AsmxApiController + { + public IHttpActionResult user_login() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().CheckUserLogin(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_package_sign() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().GetPackageSign(jsontext); + + return JsonString(result); + } + + public IHttpActionResult is_get_return_package() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().IsGetReturnPackage(jsontext); + + return JsonString(result); + } + + public IHttpActionResult change_password() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().ChangePassword(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().GetSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().UpdateSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().AddSubUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult delete_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().DelUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_all_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().GetAllUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult update_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().UpdateUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().AddUser(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_user_amount() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new UserManage().GetUserAmount(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/WX/WXOrderController.cs b/KJD_WebService/Controllers/WX/WXOrderController.cs new file mode 100644 index 0000000..b7e693d --- /dev/null +++ b/KJD_WebService/Controllers/WX/WXOrderController.cs @@ -0,0 +1,309 @@ +using KJD_Web.BLL; +using KJD_Web.BLL.WXXD; +using KJD_Web.Utils; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.Services; +using System.Web.Http; + +namespace KJD_Web.Controllers.WX +{ + [RoutePrefix("wxxd_order")] + [Route("{action}")] + public class WXOrderController : AsmxApiController + { + public IHttpActionResult get_erp_order_list() + { + return get_order_list(); + } + + public IHttpActionResult get_order_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetErpOrderList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_erp_order_item_list() + { + return get_order_item_list(); + } + + public IHttpActionResult get_order_item_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetErpOrderItemList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_erp_refund_list() + { + return get_refund_list(); + } + + public IHttpActionResult get_refund_list() + { + + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetErpRefundList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_buy_prod_map_skus() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXAddMdyBuyProdMapSkus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_buy_pord_map_skus() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetBuyPordMapSkus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_buy_prod_map() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXAddMdyBuyProdMap(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_buy_prod_map() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetBuyPordMap(jsontext); + + return JsonString(result); + } + + /// + /// 获取中转仓订单信息 + /// + public IHttpActionResult wx_get_transit_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetTransitOrder(jsontext); + + return JsonString(result); + } + + /// + /// 修改中转仓物流信息 + /// + public IHttpActionResult wx_update_erp_order_express() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateErpOrderExpress(jsontext); + + return JsonString(result); + } + + /// + /// 修改中转仓取号状态 临时补救 + /// + public IHttpActionResult wx_update_erp_allocated_order_no() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateErpAllocatedOrderNo(jsontext); + + return JsonString(result); + } + + /// + /// 删除中转仓指定订单 临时补救,慎用 + /// + public IHttpActionResult wx_del_erp_transit_warehouse_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXDelErpTransitWarehouseOrder(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_update_erp_soft_remark() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateErpSoftRemark(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_update_erp_color_flag() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateErpColorFlag(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_update_erp_out_after_sale_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateErpOutAfterSaleStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_buyer_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXAddMdyBuyerOrder(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_buyer_order_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetBuyerOrderList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_buyer_after_sale() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXAddMdyBuyerAfterSale(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_buyer_after_sale_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetBuyerAfterSaleList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_transit_warehouse_aftersale_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetTransitWarehouseAfterSaleList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_update_abnormal_transit_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateAbnormalTransitOrder(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_update_transit_order_reject_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXUpdateTransitOrderRejectStatus(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_order_item_ext_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXAddOrderItemExtInfo(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_mdy_order_item_ext_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXMdyOrderItemExtInfo(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_order_item_ext_info() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetOrderItemExtInfoList(jsontext); + + return JsonString(result); + } + + //WXGetErpReturnOrderList + public IHttpActionResult wx_get_erp_return_order_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().WXGetErpReturnOrderList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_task_status_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOrderManage().GetWxTaskStatus(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/WX/WXProductController.cs b/KJD_WebService/Controllers/WX/WXProductController.cs new file mode 100644 index 0000000..11dc05e --- /dev/null +++ b/KJD_WebService/Controllers/WX/WXProductController.cs @@ -0,0 +1,397 @@ +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.WX +{ + [RoutePrefix("wxxd_product")] + [Route("{action}")] + public class WXProductController : AsmxApiController + { + public IHttpActionResult get_pdd_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult get_hot_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetHotProductList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_hot_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetHotProductList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult wx_get_product_latest_buy_amount_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetProductLatestBuyAmountList(jsontext, true); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_product_list_random() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductListRandom(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_prod_wx_complate_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProdWXComplateList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_product_groups() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductGroups(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_pdd_product_cates() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductCates(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_pdd_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXMdyPDDProduct(jsontext); + + return JsonString(result); + } + + public IHttpActionResult mdy_best_sale_prod() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().MdyBestSaleProd(jsontext); + + return JsonString(result); + } + + public IHttpActionResult set_random_company_product_config() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().SetRandomCompanyProductConfig(jsontext); + + return JsonString(result); + } + + public IHttpActionResult get_random_company_product_config() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().GetRandomCompanyProductConfig(jsontext); + + return JsonString(result); + } + + public IHttpActionResult add_secret_spu_id_shop_id_map() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddSecretSpuIdShopIdMap(jsontext); + + return JsonString(result); + } + + //WXAddSecretIdUpMap + public IHttpActionResult wx_add_secret_id_up_map() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddSecretIdUpMap(jsontext); + + return JsonString(result); + } + + /// + /// 根据聚水潭加密商品编号(货号)查询所有上传过的店铺id 260224 未测试 + /// + public IHttpActionResult get_secret_spu_id_shop_id_map_List() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetSecretSpuIdShopIdMapList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_after_sale() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddMdyAfterSale(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_after_sale() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetAfterSale(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_random_after_sale_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetRandomAfterSaleList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_after_sale_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetAfterSaleList(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_del_address() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXDelAddress(jsontext); + + return JsonString(result); + } + + //WXAddMdyAfterSale + public IHttpActionResult wx_add_mdy_shipping_template() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddMdyShippingTemplate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_shipping_template() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetShippingTemplate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_commission_rate() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddMdyCommissionRate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_commission_rate() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetCommissionRate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_add_mdy_qualification_image() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXAddMdyQualificationImage(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_get_qualification_image() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetQualificationImage(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_del_qualification_image() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXDelQualificationImage(jsontext); + + return JsonString(result); + } + + public IHttpActionResult e57_get_freight_template() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().E57GetFreightTemplate(jsontext); + + return JsonString(result); + } + + public IHttpActionResult e57_after_sale() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().E57AfterSale(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_get_all_cate() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiGetWxAllCate(jsontext); + + return JsonString(result); + } + + /// + /// 搜索代发 + /// + public IHttpActionResult wx_api_dropship_search() + { + string jsontext = GetRequestJsonString(); + var result = new BXXProductManage().WxApiDropshipSearch(jsontext); + + return JsonString(result); + } + + /// + /// 添加代发 + /// + public IHttpActionResult wx_api_dropship_assign() + { + string jsontext = GetRequestJsonString(); + var result = new BXXProductManage().WxApiDropshipAssign(jsontext); + + return JsonString(result); + } + + /// + /// 添加代发 + /// + public IHttpActionResult wx_api_dropship_cancel() + { + string jsontext = GetRequestJsonString(); + var result = new BXXProductManage().WxApiDropshipCancel(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_category_classify() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiCategoryClassify(jsontext); + + return JsonString(result); + } + + public IHttpActionResult wx_api_upload_image() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().WxApiUploadImage(jsontext); + + return JsonString(result); + } + + public IHttpActionResult is_get_wx_recommend_hot_prod() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().IsGetWXRecommendHotProd(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/WX/WXShopController.cs b/KJD_WebService/Controllers/WX/WXShopController.cs new file mode 100644 index 0000000..3d5c525 --- /dev/null +++ b/KJD_WebService/Controllers/WX/WXShopController.cs @@ -0,0 +1,486 @@ +using KJD_Web.BLL.WXXD; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Remoting.Contexts; +using System.Web; +using System.Web.Http; +using System.Web.Services; + +namespace KJD_Web.Controllers.WX +{ + [RoutePrefix("wxxd_shop")] + [Route("{action}")] + public class WXShopController:AsmxApiController + { + + public IHttpActionResult get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetShop(jsontext); + + return JsonString(result); + + } + + /// + /// 获取店铺erp端账户 + /// + + public IHttpActionResult get_shop_erp_merchant() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetShopErpMerchant(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_one_login_name_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetOneLoginNameShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_one_shop_cookie_by_app_id() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetOneShopCookieByAppId(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().AddShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().DelShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult mdy_shop_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyCookieAndLoginStatus(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult admin_get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetShop(jsontext, true); + + return JsonString(result); + + } + + + public IHttpActionResult sub_sa_get_select_prod_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().SubSaGetSelectProdShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_add_prod_remaining() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().UpdateAddProdRemaining(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult admin_mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyShop(jsontext, true); + + return JsonString(result); + + } + + + public IHttpActionResult admin_add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().AddShop(jsontext, true); + + return JsonString(result); + + } + + + public IHttpActionResult admin_del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().DelShop(jsontext, true); + + return JsonString(result); + + } + + + public IHttpActionResult set_shop_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().SetShopSubSa(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().AddWaybill(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult del_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().DelWaybill(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult get_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().GetWayBill(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult get_waybill_no_user_name() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().GetWayBill(jsontext, true); + + return JsonString(result); + + } + + public IHttpActionResult select_and_set_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().SelectAndSetWaybill(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult select_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().SelectWaybill(jsontext); + + return JsonString(result); + + } + + /// + /// 标记已正式使用的运单号 + /// + + public IHttpActionResult update_used_waybill() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().UpdateUsedWaybill(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_mdy_express_optimize_rst() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().AddMdyExpressOptimizeRst(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_express_optimize_rst() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().GetExpressOptimizeRst(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_mdy_express_optimize_remark() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().AddMdyExpressOptimizeRemark(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_express_optimize_remark() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXExpressOptimizeManage().GetExpressOptimizeRemark(jsontext); + + return JsonString(result); + + } + + /// + /// 修改店铺默认(售后)地址 + /// + + public IHttpActionResult wx_add_mdy_shop_default_address() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXAddMdyShopDefaultAddress(jsontext); + + return JsonString(result); + + } + + /// + /// 查询店铺默认(售后)地址 + /// + + public IHttpActionResult wx_get_shop_default_address_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXGetShopDefaultAddressList(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_del_shop_default_address() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXDelShopDefaultAddress(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult wx_add_mdy_order_address() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXAddMdyOrderDecryptAddress(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_get_order_address() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXGetOrderDecryptAddress(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult wx_add_mdy_buy_url_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXAddMdyBuyUrlNotes(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_get_buy_url_notes() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXGetBuyUrlNotes(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult wx_add_mdy_29wx_pdd_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXAddMdy29WxPddShop(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_mdy_29wx_pdd_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXMdy29WxPddCookieAndLoginStatus(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_del_29wx_pdd_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXDel29WxPddShop(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult wx_get_29wx_pdd_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().WXGet29WxPddShop(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult e57_get_wx_tokens() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().E57GetWxTokens(jsontext); + + return JsonString(result); + + } + + + + public IHttpActionResult e57_get_wx_shop_token() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().E57GetWxShopToken(jsontext); + + return JsonString(result); + + } + } +} \ No newline at end of file diff --git a/KJD_WebService/Controllers/WX/WXShopRevenueStatisticsController.cs b/KJD_WebService/Controllers/WX/WXShopRevenueStatisticsController.cs new file mode 100644 index 0000000..e7f4d39 --- /dev/null +++ b/KJD_WebService/Controllers/WX/WXShopRevenueStatisticsController.cs @@ -0,0 +1,29 @@ +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; +using System.Web.Http; + +namespace KJD_Web.Controllers.WX +{ + [RoutePrefix("wxxd_shop_revenue_statistics")] + [Route("{action}")] + public class WXShopRevenueStatisticsController : AsmxApiController + { + public IHttpActionResult get_shop_order_amount() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopRevenueStatisticsManage().GetShopOrderAmountRange(jsontext); + + return JsonString(result); + } + } +} diff --git a/KJD_WebService/Controllers/WX/WXUserController.cs b/KJD_WebService/Controllers/WX/WXUserController.cs new file mode 100644 index 0000000..e830efb --- /dev/null +++ b/KJD_WebService/Controllers/WX/WXUserController.cs @@ -0,0 +1,319 @@ +using KJD_Web.BLL.WXXD; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Runtime.Remoting.Contexts; +using System.Text; +using System.Web; +using System.Web.Http; +using System.Web.Services; +using Ubiety.Dns.Core; + +namespace KJD_Web.Controllers +{ + [RoutePrefix("wxxd_user")] + [Route("{action}")] + public class WXUserController : AsmxApiController + { + + //GetE57Authorization + public IHttpActionResult get_e57_authorization() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetE57Authorization(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult user_login() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().CheckUserLogin(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult change_password() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().ChangePassword(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetSubUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateSubUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().AddSubUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult delete_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().DelUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_all_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetAllUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult add_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().AddUser(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_user_points() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateUserPoints(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_user_points() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetUserPoints(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_user_balance() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateUserBalance(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_user_balance() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetUserBalance(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult get_wx_sale_assistant_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetWxSaleAssistantCookie(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult update_wx_sale_assistant_cookie() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateWxSaleAssistantCookie(jsontext); + + return JsonString(result); + + } + + + public IHttpActionResult update_top_up_qrcode() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateTopUpQrcode(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult get_top_up_qrcode() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetTopUpQrcode(jsontext); + + return JsonString(result); + + } + + + + public IHttpActionResult add_mdy_oem() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOemManage().AddMdyOem(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult del_oem() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOemManage().DelOem(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult get_oem() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXOemManage().GetOem(jsontext); + + return JsonString(result); + + } + + public IHttpActionResult oem_withdrawals() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + var request = jsontext.ParseToObject(); + result = new WXOemManage().OemWithdrawals(request); + + return JsonString(result); + + } + + public IHttpActionResult oem_settle_flows() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + var request = jsontext.ParseToObject(); + result = new WXOemManage().SettleOemFlows(request); + + return JsonString(result); + + } + + public IHttpActionResult apply_oem_withdrawal() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + var request = jsontext.ParseToObject(); + result = new WXOemManage().ApplyOemWithdrawal(request); + + return JsonString(result); + + } + + public IHttpActionResult oem_audit_withdrawal() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + var request = jsontext.ParseToObject(); + result = new WXOemManage().AuditOemWithdrawal(request); + + return JsonString(result); + + } + } +} \ No newline at end of file diff --git a/KJD_WebService/Controllers/WXUserController.cs b/KJD_WebService/Controllers/WXUserController.cs deleted file mode 100644 index dd077ce..0000000 --- a/KJD_WebService/Controllers/WXUserController.cs +++ /dev/null @@ -1,54 +0,0 @@ -//using KJD_Web.BLL.WXXD; -//using System; -//using System.Collections.Generic; -//using System.IO; -//using System.Linq; -//using System.Runtime.Remoting.Contexts; -//using System.Text; -//using System.Web; -//using System.Web.Http; - -//namespace KJD_Web.Controllers -//{ -// [RoutePrefix("wxxd_user")] -// [Route("{action}")] -// public class WXUserController : ApiController -// { -// 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; -// } -// } -// public string user_login() -// { -// string jsontext = GetRequestJsonString(); - -// var result = jsontext; -// result = new WXUserManage().CheckUserLogin(jsontext); - -// return result; -// } -// } -//} \ No newline at end of file diff --git a/KJD_WebService/GetPostActionSelector.cs b/KJD_WebService/GetPostActionSelector.cs new file mode 100644 index 0000000..7e0dc25 --- /dev/null +++ b/KJD_WebService/GetPostActionSelector.cs @@ -0,0 +1,32 @@ +using KJD_Web.Controllers; +using System.Linq; +using System.Net.Http; +using System.Web.Http.Controllers; + +namespace KJD_Web +{ + public class GetPostActionSelector : ApiControllerActionSelector + { + public override ILookup GetActionMapping( + HttpControllerDescriptor controllerDescriptor) + { + var mapping = base.GetActionMapping(controllerDescriptor); + if (mapping == null) + { + return null; + } + + if (typeof(AsmxApiController).IsAssignableFrom(controllerDescriptor.ControllerType)) + { + foreach (var action in mapping.SelectMany(group => group).Distinct()) + { + action.SupportedHttpMethods.Clear(); + action.SupportedHttpMethods.Add(HttpMethod.Get); + action.SupportedHttpMethods.Add(HttpMethod.Post); + } + } + + return mapping; + } + } +} \ No newline at end of file diff --git a/KJD_WebService/Global.asax.cs b/KJD_WebService/Global.asax.cs index be2af40..fba3140 100644 --- a/KJD_WebService/Global.asax.cs +++ b/KJD_WebService/Global.asax.cs @@ -104,149 +104,132 @@ namespace KJD_Web protected void Application_BeginRequest(object sender, EventArgs e) { + if (Context.Request.Path == "/") + { + Context.Response.ContentType = "text/plain"; + Context.Response.Write("Service is running."); + Context.Response.End(); + } string hPath = Request.Url.LocalPath.ToString(); - if (!hPath.Contains(".asmx") && hPath.Contains("/user/")) - { - hPath = hPath.Replace("/user/", "/UserService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/shop/")) - { - hPath = hPath.Replace("/shop/", "/ShopService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) - { - hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/order/")) - { - hPath = hPath.Replace("/order/", "/OrderService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/product/")) - { - hPath = hPath.Replace("/product/", "/ProductService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/product_third/")) - { - hPath = hPath.Replace("/product_third/", "/ProductThirdService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/price/")) - { - hPath = hPath.Replace("/price/", "/PriceService.asmx/"); - Context.RewritePath(hPath); - } + //if (!hPath.Contains(".asmx") && hPath.Contains("/user/")) + //{ + //hPath = hPath.Replace("/user/", "/UserService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/shop/")) + //{ + //hPath = hPath.Replace("/shop/", "/ShopService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) + //{ + //hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/order/")) + //{ + //hPath = hPath.Replace("/order/", "/OrderService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/product/")) + //{ + //hPath = hPath.Replace("/product/", "/ProductService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/product_third/")) + //{ + //hPath = hPath.Replace("/product_third/", "/ProductThirdService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/price/")) + //{ + //hPath = hPath.Replace("/price/", "/PriceService.asmx/"); + //Context.RewritePath(hPath); + //} - if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_user/")) - { - hPath = hPath.Replace("/bxx_user/", "/BXXUserService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_shop/")) - { - hPath = hPath.Replace("/bxx_shop/", "/BXXShopService.asmx/"); - Context.RewritePath(hPath); - } + //if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_user/")) + //{ + //hPath = hPath.Replace("/bxx_user/", "/BXXUserService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_shop/")) + //{ + //hPath = hPath.Replace("/bxx_shop/", "/BXXShopService.asmx/"); + //Context.RewritePath(hPath); + //} //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) //{ // hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); // Context.RewritePath(hPath); //} - else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product/")) - { - hPath = hPath.Replace("/bxx_product/", "/BXXProductService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product_third/")) - { - hPath = hPath.Replace("/bxx_product_third/", "/BXXProductThirdService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_price/")) - { - hPath = hPath.Replace("/bxx_price/", "/BXXPriceService.asmx/"); - Context.RewritePath(hPath); - } + //else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product/")) + //{ + //hPath = hPath.Replace("/bxx_product/", "/BXXProductService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product_third/")) + //{ + //hPath = hPath.Replace("/bxx_product_third/", "/BXXProductThirdService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_price/")) + //{ + //hPath = hPath.Replace("/bxx_price/", "/BXXPriceService.asmx/"); + //Context.RewritePath(hPath); + //} - if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_user/")) - { - hPath = hPath.Replace("/dyxd_user/", "/DYUserService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_shop/")) - { - hPath = hPath.Replace("/dyxd_shop/", "/DYShopService.asmx/"); - Context.RewritePath(hPath); - } + //if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_user/")) + //{ + //hPath = hPath.Replace("/dyxd_user/", "/DYUserService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_shop/")) + //{ + //hPath = hPath.Replace("/dyxd_shop/", "/DYShopService.asmx/"); + //Context.RewritePath(hPath); + //} //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) //{ // hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); // Context.RewritePath(hPath); //} - else if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_product/")) - { - hPath = hPath.Replace("/dyxd_product/", "/DYProductService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_product_third/")) - { - hPath = hPath.Replace("/dyxd_product_third/", "/DYProductThirdService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/dyxd_price/")) - { - hPath = hPath.Replace("/dyxd_price/", "/DYPriceService.asmx/"); - Context.RewritePath(hPath); - } - if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_user/")) - { - hPath = hPath.Replace("/wxxd_user/", "/WXUserService.asmx/"); - Context.RewritePath(hPath, false); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_shop/")) - { - hPath = hPath.Replace("/wxxd_shop/", "/WXShopService.asmx/"); - Context.RewritePath(hPath); - } + + //if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_user/")) + //{ + // //hPath = hPath.Replace("/wxxd_user/", "/WXUserService.asmx/"); + // //Context.RewritePath(hPath, false); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_shop/")) + //{ + // hPath = hPath.Replace("/wxxd_shop/", "/WXShopService.asmx/"); + // Context.RewritePath(hPath); + //} //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) //{ // hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); // Context.RewritePath(hPath); //} - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_product/")) - { - hPath = hPath.Replace("/wxxd_product/", "/WXProductService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_product_third/")) - { - hPath = hPath.Replace("/wxxd_product_third/", "/WXProductThirdService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_price/")) - { - hPath = hPath.Replace("/wxxd_price/", "/WXPriceService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_order/")) - { - hPath = hPath.Replace("/wxxd_order/", "/WXOrderService.asmx/"); - Context.RewritePath(hPath); - } - else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_shop_revenue_statistics/")) - { - hPath = hPath.Replace("/wxxd_shop_revenue_statistics/", "/WXShopRevenueStatistics.asmx/"); - Context.RewritePath(hPath); - } + //if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_product/")) + //{ + //hPath = hPath.Replace("/wxxd_product/", "/WXProductService.asmx/"); + //Context.RewritePath(hPath); + //} + + //else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_order/")) + //{ + //hPath = hPath.Replace("/wxxd_order/", "/WXOrderService.asmx/"); + //Context.RewritePath(hPath); + //} + //else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_shop_revenue_statistics/")) + //{ + //hPath = hPath.Replace("/wxxd_shop_revenue_statistics/", "/WXShopRevenueStatistics.asmx/"); + //Context.RewritePath(hPath); + //} // 请求录制:捕获请求链接与请求内容,用于迁移后的回放校验 //try { ApiRequestLogger.BeginRequest(Context); } catch { } } @@ -277,4 +260,4 @@ namespace KJD_Web } } -} \ No newline at end of file +} diff --git a/KJD_WebService/KJD_WebService.csproj b/KJD_WebService/KJD_WebService.csproj index c00cbee..c5fca53 100644 --- a/KJD_WebService/KJD_WebService.csproj +++ b/KJD_WebService/KJD_WebService.csproj @@ -148,29 +148,9 @@ - - - - - - - - - - - - - - - - - - - - @@ -202,8 +182,27 @@ + - + + + + + + + + + + + + + + + + + + + @@ -247,11 +246,8 @@ + - - WXOrderService.asmx - Component - @@ -270,30 +266,6 @@ - - WXProductService.asmx - Component - - - WXShopService.asmx - Component - - - DYShopService.asmx - Component - - - WXShopRevenueStatistics.asmx - Component - - - WXUserService.asmx - Component - - - DYUserService.asmx - Component - Global.asax @@ -310,59 +282,7 @@ - - BXXPriceService.asmx - Component - - - PriceService.asmx - Component - - - BXXProductService.asmx - Component - - - BXXProductThirdService.asmx - Component - - - OrderService.asmx - Component - - - ProductThirdService.asmx - Component - - - ProductService.asmx - Component - - - BXXShopService.asmx - Component - - - ShopService.asmx - Component - - - UpdateService.asmx - Component - - - ToolService.asmx - Component - - - BXXUserService.asmx - Component - - - UserService.asmx - Component - diff --git a/KJD_WebService/Web.config b/KJD_WebService/Web.config index 0dbffb7..91a0d5b 100644 --- a/KJD_WebService/Web.config +++ b/KJD_WebService/Web.config @@ -1,30 +1,30 @@ - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - + - - - + + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + \ No newline at end of file diff --git a/KJD_WebService/WebApiConfig.cs b/KJD_WebService/WebApiConfig.cs index 8a6dbd1..8db1199 100644 --- a/KJD_WebService/WebApiConfig.cs +++ b/KJD_WebService/WebApiConfig.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Http; +using System.Web.Http.Controllers; namespace KJD_Web { @@ -10,18 +11,21 @@ namespace KJD_Web { public static void Register(HttpConfiguration config) { + // 让 AsmxApiController 的所有 Action 同时支持 GET 和 POST + config.Services.Replace(typeof(IHttpActionSelector), new GetPostActionSelector()); + // 特性路由:你 ImageCacheController 上的 [Route] 依赖这个 config.MapHttpAttributeRoutes(); // 默认路由 - //config.Routes.MapHttpRoute( - // name: "DefaultApi", - // routeTemplate: "{controller}/{action}/{id}", - // defaults: new { id = RouteParameter.Optional } - //); - //config.Formatters.Remove(config.Formatters.XmlFormatter); - //config.Filters.Add(new NotFoundMessageFilter()); - //config.MessageHandlers.Add(new NotFoundMessageHandler()); + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "{controller}/{action}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + config.Formatters.Remove(config.Formatters.XmlFormatter); + config.Filters.Add(new NotFoundMessageFilter()); + config.MessageHandlers.Add(new NotFoundMessageHandler()); } } diff --git a/KJD_WebService/packages.config b/KJD_WebService/packages.config index 2319e7e..342f432 100644 --- a/KJD_WebService/packages.config +++ b/KJD_WebService/packages.config @@ -1,6 +1,6 @@  - + @@ -15,17 +15,17 @@ - + - + - - - - - - + + + + + + \ No newline at end of file