using CRM.Core.DTO.Cms; using System.Collections.Generic; using System.IO; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using WX.CRM.Model.DTO; using WX.CRM.Model.Entity; namespace RiaServiceLibrary { // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IWeiXinService”。 [ServiceContract] public interface IWeiXinService { [OperationContract] [WebInvoke(Method = "*", ResponseFormat = WebMessageFormat.Json, //BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "Put?content={content}")] JsonResult Put(string content); [OperationContract] [WebInvoke(Method = "*", ResponseFormat = WebMessageFormat.Json, //BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "Get?content={content}")] JsonResult Get(string content); [OperationContract] [WebInvoke(Method = "*", ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetWxUinConfig")] JsonResult> GetWxUinConfig(); [OperationContract] [WebInvoke(Method = "*", ResponseFormat = WebMessageFormat.Json, UriTemplate = "Insert?uin={uin}&userName={userName}&wxPath={wxPath}")] JsonResult Insert(string uin, string userName, string wxPath); [OperationContract] [WebInvoke(Method = "*", BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "UploadQrCode?filePath={filePath}")] bool UploadQrCode(Stream input, string filePath); [OperationContract] [WebInvoke(Method = "*", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "RContact/Put")] JsonResult RContactPut(rcontact content); [OperationContract] [WebInvoke(Method = "*", ResponseFormat = WebMessageFormat.Json, UriTemplate = "BatchInsertUserIMEI?imeis={imeis}")] bool BatchInsertUserIMEI(string imeis); [OperationContract] [WebInvoke(Method = "*", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "WeWorkAssignStatus/Put")] JsonResult WeWorkAssignStatus(AssignStatusDto dto); [OperationContract] [WebInvoke(Method = "*", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "WeWorkUser/SetEid")] JsonResult WeWorkSetEid(WeworkUserEid dto); //[OperationContract] //[WebInvoke(Method = "POST", // RequestFormat = WebMessageFormat.Json, // ResponseFormat = WebMessageFormat.Json, // BodyStyle = WebMessageBodyStyle.Bare, // UriTemplate = "AppletMsg/Put")] //JsonResult AppletMsg(AppletMsgModel appletMsg); } public class JsonResult { public bool result { get; set; } public int retcode { get; set; } public List retmsg { get; set; } } [DataContract] public class JsonResult { [DataMember] public bool result { get; set; } [DataMember] public int retcode { get; set; } [DataMember] public T retmsg { get; set; } } }