mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
添加项目文件。
This commit is contained in:
38
CoreCms.Net.WeChat.Service/Models/DecodedPhoneNumber.cs
Normal file
38
CoreCms.Net.WeChat.Service/Models/DecodedPhoneNumber.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 1:08:20
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户绑定手机号解密类
|
||||
/// </summary>
|
||||
public class DecodedPhoneNumber : DecodeEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户绑定的手机号(国外手机号会有区号)
|
||||
/// </summary>
|
||||
public string phoneNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 没有区号的手机号
|
||||
/// </summary>
|
||||
public string purePhoneNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 区号(Senparc注:国别号)
|
||||
/// </summary>
|
||||
public string countryCode { get; set; }
|
||||
}
|
||||
}
|
||||
32
CoreCms.Net.WeChat.Service/Models/DecodedRunData.cs
Normal file
32
CoreCms.Net.WeChat.Service/Models/DecodedRunData.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 11:09:03
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class DecodedRunData : DecodeEntityBase
|
||||
{
|
||||
public List<DecodedRunData_StepModel> stepInfoList { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DecodedRunData_StepModel
|
||||
{
|
||||
public long timestamp { get; set; }
|
||||
public long step { get; set; }
|
||||
}
|
||||
}
|
||||
53
CoreCms.Net.WeChat.Service/Models/EncryptPostModel.cs
Normal file
53
CoreCms.Net.WeChat.Service/Models/EncryptPostModel.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 21:25:25
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>接收加密信息统一基类(同时也支持非加密信息)</summary>
|
||||
public abstract class EncryptPostModel : IEncryptPostModel
|
||||
{
|
||||
/// <summary>指定当前服务账号的唯一领域定义(主要为 APM 服务),例如 AppId</summary>
|
||||
public abstract string DomainId { get; set; }
|
||||
|
||||
/// <summary>Signature</summary>
|
||||
public string Signature { get; set; }
|
||||
|
||||
/// <summary>Msg_Signature</summary>
|
||||
public string Msg_Signature { get; set; }
|
||||
|
||||
/// <summary>Timestamp</summary>
|
||||
public string Timestamp { get; set; }
|
||||
|
||||
/// <summary>Nonce</summary>
|
||||
public string Nonce { get; set; }
|
||||
|
||||
/// <summary>Token</summary>
|
||||
public string Token { get; set; }
|
||||
|
||||
/// <summary>EncodingAESKey</summary>
|
||||
public string EncodingAESKey { get; set; }
|
||||
|
||||
/// <summary>设置服务器内部保密信息</summary>
|
||||
/// <param name="token"></param>
|
||||
/// <param name="encodingAESKey"></param>
|
||||
public virtual void SetSecretInfo(string token, string encodingAESKey)
|
||||
{
|
||||
this.Token = token;
|
||||
this.EncodingAESKey = encodingAESKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
44
CoreCms.Net.WeChat.Service/Models/IEncryptPostModel.cs
Normal file
44
CoreCms.Net.WeChat.Service/Models/IEncryptPostModel.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 21:25:02
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>接收加密信息统一接口(同时也支持非加密信息)</summary>
|
||||
public interface IEncryptPostModel
|
||||
{
|
||||
/// <summary>指定当前服务账号的唯一领域定义(主要为 APM 服务),例如 AppId</summary>
|
||||
string DomainId { get; set; }
|
||||
|
||||
/// <summary>Signature</summary>
|
||||
string Signature { get; set; }
|
||||
|
||||
/// <summary>Msg_Signature</summary>
|
||||
string Msg_Signature { get; set; }
|
||||
|
||||
/// <summary>Timestamp</summary>
|
||||
string Timestamp { get; set; }
|
||||
|
||||
/// <summary>Nonce</summary>
|
||||
string Nonce { get; set; }
|
||||
|
||||
/// <summary>Token</summary>
|
||||
string Token { get; set; }
|
||||
|
||||
/// <summary>EncodingAESKey</summary>
|
||||
string EncodingAESKey { get; set; }
|
||||
}
|
||||
}
|
||||
45
CoreCms.Net.WeChat.Service/Models/PostModel.cs
Normal file
45
CoreCms.Net.WeChat.Service/Models/PostModel.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 21:25:51
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信公众服务器Post过来的加密参数集合(不包括PostData)
|
||||
/// <para>如需使用 NeuChar,需要在 MessageHandler 中提供 PostModel 并设置 AppId</para>
|
||||
/// </summary>
|
||||
public class PostModel : EncryptPostModel
|
||||
{
|
||||
public override string DomainId
|
||||
{
|
||||
get => this.AppId;
|
||||
set => this.AppId = value;
|
||||
}
|
||||
|
||||
public string AppId { get; set; }
|
||||
|
||||
/// <summary>设置服务器内部保密信息</summary>
|
||||
/// <param name="token"></param>
|
||||
/// <param name="encodingAESKey"></param>
|
||||
/// <param name="appId"></param>
|
||||
public void SetSecretInfo(string token, string encodingAESKey, string appId)
|
||||
{
|
||||
this.Token = token;
|
||||
this.EncodingAESKey = encodingAESKey;
|
||||
this.AppId = appId;
|
||||
}
|
||||
}
|
||||
}
|
||||
36
CoreCms.Net.WeChat.Service/Models/SendWxTemplateMessage.cs
Normal file
36
CoreCms.Net.WeChat.Service/Models/SendWxTemplateMessage.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/14 16:27:23
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 处理器-微信模板消息【小程序,公众号都走这里】
|
||||
/// </summary>
|
||||
public class SendWxTemplateMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户序列
|
||||
/// </summary>
|
||||
public int userId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 传递数据
|
||||
/// </summary>
|
||||
public JObject parameters { get; set; }
|
||||
}
|
||||
}
|
||||
35
CoreCms.Net.WeChat.Service/Models/WaterMark.cs
Normal file
35
CoreCms.Net.WeChat.Service/Models/WaterMark.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 1:09:19
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.WeChat.Service.Utilities;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 水印
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Watermark
|
||||
{
|
||||
public string appid { get; set; }
|
||||
public long timestamp { get; set; }
|
||||
|
||||
public DateTimeOffset DateTimeStamp
|
||||
{
|
||||
get { return DateTimeHelper.GetDateTimeFromXml(timestamp); }
|
||||
}
|
||||
}
|
||||
}
|
||||
38
CoreCms.Net.WeChat.Service/Models/WeChatApiCallBack.cs
Normal file
38
CoreCms.Net.WeChat.Service/Models/WeChatApiCallBack.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信接口回调Json实体
|
||||
/// </summary>
|
||||
public class WeChatApiCallBack
|
||||
{
|
||||
/// <summary>
|
||||
/// 提交数据
|
||||
/// </summary>
|
||||
public object OtherData { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// 状态码
|
||||
/// </summary>
|
||||
public bool Status { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 信息说明。
|
||||
/// </summary>
|
||||
public string Msg { get; set; } = "响应成功";
|
||||
|
||||
/// <summary>
|
||||
/// 返回数据
|
||||
/// </summary>
|
||||
public string Data { get; set; } = "success";
|
||||
}
|
||||
}
|
||||
71
CoreCms.Net.WeChat.Service/Models/WeChatUserInfo.cs
Normal file
71
CoreCms.Net.WeChat.Service/Models/WeChatUserInfo.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/7/29 1:19:20
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreCms.Net.WeChat.Service.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序用户信息结构
|
||||
/// </summary>
|
||||
|
||||
public class WeChatUserInfo
|
||||
|
||||
{
|
||||
public string openId { get; set; }
|
||||
|
||||
public string nickName { get; set; }
|
||||
|
||||
public int gender { get; set; }
|
||||
|
||||
public string city { get; set; }
|
||||
|
||||
public string province { get; set; }
|
||||
|
||||
public string country { get; set; }
|
||||
|
||||
public string avatarUrl { get; set; }
|
||||
|
||||
public string unionId { get; set; }
|
||||
|
||||
public Watermark watermark { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class DecodeEntityBase
|
||||
{
|
||||
public Watermark watermark { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解码后的用户信息
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DecodedUserInfo : DecodeEntityBase
|
||||
{
|
||||
public string openId { get; set; }
|
||||
public string nickName { get; set; }
|
||||
public int gender { get; set; }
|
||||
public string city { get; set; }
|
||||
public string province { get; set; }
|
||||
public string country { get; set; }
|
||||
public string avatarUrl { get; set; }
|
||||
public string unionId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user