106 lines
3.6 KiB
C#
106 lines
3.6 KiB
C#
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<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 = "*",
|
||
RequestFormat = WebMessageFormat.Json,
|
||
ResponseFormat = WebMessageFormat.Json,
|
||
BodyStyle = WebMessageBodyStyle.Bare,
|
||
UriTemplate = "WeWorkUser/SetEid")]
|
||
JsonResult<string> WeWorkSetEid(WeworkUserEid 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; }
|
||
}
|
||
}
|