TG.WXCRM.V4/RiaService/WxMessageSvr.svc.cs

46 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}