ComplianceServer/oldcode/RiaServiceLibrary/IWeiXinService.cs

99 lines
3.3 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.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<List<WX_UINCONFIG>> GetWxUinConfig();
[OperationContract]
[WebInvoke(Method = "*",
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "Insert?uin={uin}&userName={userName}&wxPath={wxPath}")]
JsonResult<string> 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<string> 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<string> WeWorkAssignStatus(AssignStatusDto dto);
//[OperationContract]
//[WebInvoke(Method = "POST",
// RequestFormat = WebMessageFormat.Json,
// ResponseFormat = WebMessageFormat.Json,
// BodyStyle = WebMessageBodyStyle.Bare,
// UriTemplate = "AppletMsg/Put")]
//JsonResult<string> AppletMsg(AppletMsgModel appletMsg);
}
public class JsonResult
{
public bool result { get; set; }
public int retcode { get; set; }
public List<WX_MESSAGE> retmsg { get; set; }
}
[DataContract]
public class JsonResult<T>
{
[DataMember]
public bool result { get; set; }
[DataMember]
public int retcode { get; set; }
[DataMember]
public T retmsg { get; set; }
}
}