TG.WXCRM.V4/WX.CRM.DataSynFactory/Cmd/Client_ChangeMobile_IMP.cs

36 lines
1.2 KiB
C#

using System;
using System.Text;
using System.Web;
using WX.CRM.Common;
using WX.CRM.DataSynFactory.Templates;
namespace WX.CRM.DataSynFactory.Cmd
{
public class Client_ChangeMobile_IMP : Interfaces.IDataImportSvr<Client_ChangeMobile>
{
public bool GenerateBusinessOne(Client_ChangeMobile t)
{
try
{
var url = string.Format("http://localhost:806/ResourceService.svc/ChangeMobile?content={0}&clientid={1}&sign={2}", HttpUtility.UrlEncode(t.content), t.clientid, HttpUtility.UrlEncode(t.sign));
LogHelper.Info("修改手机号url:" + url);
var rep = Utility.PostData(url, Encoding.UTF8);
LogHelper.Info("返回结果:" + rep.ToJson());
var obj = Utility.JSONToObject<retObj>(rep);
//LogHelper.Info("obj:" + obj.ToJson());
return obj.result;
}
catch (Exception ex)
{
LogHelper.Error($"调用手机号失败{ex.ToString()}");
return false;
}
}
private class retObj
{
public bool result { get; set; }
}
}
}