46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Runtime.Serialization;
|
||
using System.ServiceModel;
|
||
using System.ServiceModel.Web;
|
||
using System.Text;
|
||
using WX.CRM.Model.DTO;
|
||
using RiaServiceLibrary;
|
||
using WX.CRM.Common;
|
||
using WX.CRM.Model.Enum;
|
||
|
||
namespace RiaService
|
||
{
|
||
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“WxMessageSvr”。
|
||
// 注意: 为了启动 WCF 测试客户端以测试此服务,请在解决方案资源管理器中选择 WxMessageSvr.svc 或 WxMessageSvr.svc.cs,然后开始调试。
|
||
public partial class WxMessageSvr : IWxMessageSvr
|
||
{
|
||
public JsonResult<string> AlivePut(alive content)
|
||
{
|
||
try
|
||
{
|
||
return new JsonResult<string> { result = true, retcode = (int)EnumInterfaceErrcode.调用成功, retmsg = "调用成功" };
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
LogHelper.Error(ex.ToString());
|
||
return new JsonResult<string> { result = false, retcode = (int)EnumInterfaceErrcode.系统错误, retmsg = null };
|
||
}
|
||
}
|
||
}
|
||
|
||
[ServiceContract]
|
||
public interface IWxMessageSvr
|
||
{
|
||
[OperationContract]
|
||
[WebInvoke(Method = "*",
|
||
RequestFormat = WebMessageFormat.Json,
|
||
ResponseFormat = WebMessageFormat.Json,
|
||
BodyStyle = WebMessageBodyStyle.Bare,
|
||
UriTemplate = "Alive/Put")]
|
||
JsonResult<string> AlivePut(alive content);
|
||
|
||
}
|
||
}
|