205 lines
6.3 KiB
C#
205 lines
6.3 KiB
C#
using System;
|
|
using System.Text;
|
|
using WX.CRM.BLL.Util;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Isvr;
|
|
|
|
|
|
|
|
namespace WX.CRM.BLL.Isvr
|
|
{
|
|
public class ISVR_RiaSeviceActiveSoftOrder : IISVR_RiaSeviceActiveSoftOrder
|
|
{
|
|
|
|
/// <summary>
|
|
/// 单个不加密过程处理
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <returns></returns>
|
|
public string ProcessHandling(WX.CRM.Model.Enum.Parameter paraKey, string content)
|
|
{
|
|
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(paraKey);
|
|
|
|
string key = string.Format("key={0}", content);
|
|
|
|
retmsg = Utility.HttpPostData(url, key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
public string ProcessHandling(WX.CRM.Model.Enum.Parameter paraKey, string content, string cilentId, string sign)
|
|
{
|
|
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(paraKey);
|
|
|
|
string key = string.Format("key={0}&clientId={1}&sign={2}", content, cilentId, sign);
|
|
|
|
retmsg = Utility.HttpPostData(url, key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
|
|
public string ProcessRequsetGet(WX.CRM.Model.Enum.Parameter paraKey, string json)
|
|
{
|
|
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
SecurityHelper sqhelper = new SecurityHelper();
|
|
string url = GetParameterValue(paraKey);
|
|
string key = sqhelper.createSignEncodingStr2(json);
|
|
string logerr = url + "?" + key;
|
|
LogHelper.Error(logerr);
|
|
retmsg = Utility.PostData(url + "?" + key, System.Text.Encoding.UTF8);
|
|
retmsg = sqhelper.decyptData("UPWEBSITE", retmsg);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
public string CheckUserNameCompetence(string content)
|
|
{
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(WX.CRM.Model.Enum.Parameter.ISVR_AD_CheckUserNameCompetence);
|
|
|
|
string key = string.Format("key={0}", content);
|
|
|
|
retmsg = Utility.HttpPostData(url, key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 建立订单
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <returns></returns>
|
|
public string upAgentCreateActiveOrder(string content)
|
|
{
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(WX.CRM.Model.Enum.Parameter.ISVR_AD_upAgentCreateActiveOrder);
|
|
|
|
string key = string.Format("key={0}", content);
|
|
|
|
retmsg = Utility.HttpPostData(url.Trim(), key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 开通订单
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <returns></returns>
|
|
public string upAgentOpenOrder(string content)
|
|
{
|
|
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(WX.CRM.Model.Enum.Parameter.ISVR_AD_upAgentOpenOrder);
|
|
|
|
string key = string.Format("key={0}", content);
|
|
|
|
retmsg = Utility.HttpPostData(url, key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 撤销订单
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <returns></returns>
|
|
public string CancelActiveOrder(string content)
|
|
{
|
|
|
|
string retmsg = string.Empty;
|
|
try
|
|
{
|
|
|
|
string url = GetParameterValue(WX.CRM.Model.Enum.Parameter.ISVR_AD_CancelActiveOrder);
|
|
|
|
string key = string.Format("key={0}", content);
|
|
|
|
retmsg = Utility.HttpPostData(url, key, Encoding.UTF8);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + "----" + ex.StackTrace);
|
|
retmsg = Utility.ObjectToJson(new { result = false, retcode = Convert.ToInt32(WX.CRM.Model.Enum.EnumInterfaceErrcode.系统错误), retMsg = "" });
|
|
}
|
|
return retmsg;
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetParameterValue(WX.CRM.Model.Enum.Parameter paraKey)
|
|
{
|
|
CACHE_BL cacheBl = new CACHE_BL();
|
|
|
|
var thePara = cacheBl.GetValue_Parameter(paraKey);
|
|
|
|
return thePara;
|
|
}
|
|
|
|
}
|
|
}
|