511 lines
14 KiB
C#
511 lines
14 KiB
C#
using KJD_Web.BLL.BXX;
|
|
using KJD_Web.BLL.WXXD;
|
|
using KJD_Web.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Services;
|
|
|
|
namespace KJD_Web
|
|
{
|
|
/// <summary>
|
|
/// ShopService 的摘要说明
|
|
/// </summary>
|
|
[WebService(Namespace = "http://tempuri.org/")]
|
|
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
|
[System.ComponentModel.ToolboxItem(false)]
|
|
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
|
|
// [System.Web.Script.Services.ScriptService]
|
|
public class WXShopService : System.Web.Services.WebService
|
|
{
|
|
private string GetRequestJsonString()
|
|
{
|
|
Context.Response.ContentType = "text/html;charset=utf-8";
|
|
Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
|
|
|
|
using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流
|
|
{
|
|
// 还原数据流
|
|
byte[] b = new byte[s.Length];
|
|
s.Read(b, 0, (int)s.Length);
|
|
string jsonText = Encoding.UTF8.GetString(b); // JSON字符串
|
|
if (string.IsNullOrEmpty(jsonText))
|
|
{
|
|
var qs = HttpContext.Current.Request.QueryString;
|
|
if (qs != null && qs.Keys.Count > 0)
|
|
{
|
|
jsonText = "{";
|
|
foreach (var key in qs.Keys)
|
|
{
|
|
jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";";
|
|
}
|
|
jsonText = jsonText.TrimEnd(';') + "}";
|
|
}
|
|
}
|
|
return jsonText;
|
|
}
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_shop_list()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().GetShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取店铺erp端账户
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void get_shop_erp_merchant()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().GetShopErpMerchant(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_one_login_name_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().GetOneLoginNameShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void add_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().AddShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void del_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().DelShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void mdy_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().MdyShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void mdy_shop_cookie_and_login_status()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().MdyCookieAndLoginStatus(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void admin_get_shop_list()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().GetShop(jsontext, true);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void sub_sa_get_select_prod_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().SubSaGetSelectProdShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void update_add_prod_remaining()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().UpdateAddProdRemaining(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void admin_mdy_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().MdyShop(jsontext, true);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void admin_add_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().AddShop(jsontext, true);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void admin_del_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().DelShop(jsontext, true);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void set_shop_sub_sa()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().SetShopSubSa(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void add_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().AddWaybill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void del_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().DelWaybill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void get_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().GetWayBill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void get_waybill_no_user_name()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().GetWayBill(jsontext, true);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void select_and_set_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().SelectAndSetWaybill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void select_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().SelectWaybill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 标记已正式使用的运单号
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void update_used_waybill()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().UpdateUsedWaybill(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void add_mdy_express_optimize_rst()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().AddMdyExpressOptimizeRst(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_express_optimize_rst()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().GetExpressOptimizeRst(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void add_mdy_express_optimize_remark()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().AddMdyExpressOptimizeRemark(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_express_optimize_remark()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXExpressOptimizeManage().GetExpressOptimizeRemark(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改店铺默认(售后)地址
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void wx_add_mdy_shop_default_address()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXAddMdyShopDefaultAddress(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询店铺默认(售后)地址
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void wx_get_shop_default_address_list()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXGetShopDefaultAddressList(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_del_shop_default_address()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXDelShopDefaultAddress(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void wx_add_mdy_order_address()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXAddMdyOrderDecryptAddress(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_get_order_address()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXGetOrderDecryptAddress(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void wx_add_mdy_buy_url_notes()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXAddMdyBuyUrlNotes(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_get_buy_url_notes()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXGetBuyUrlNotes(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void wx_add_mdy_29wx_pdd_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXAddMdy29WxPddShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_mdy_29wx_pdd_cookie_and_login_status()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXMdy29WxPddCookieAndLoginStatus(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_del_29wx_pdd_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXDel29WxPddShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_get_29wx_pdd_shop()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().WXGet29WxPddShop(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void e57_get_wx_tokens()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().E57GetWxTokens(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
|
|
[WebMethod]
|
|
public void e57_get_wx_shop_token()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXShopManage().E57GetWxShopToken(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
}
|
|
}
|