Browse Source

Merge pull request #942 from colinin/fix-wx-pusher

🐛 fix: fixed wx-pusher send message result value type
pull/955/head
yx lin 2 years ago
committed by GitHub
parent
commit
7cc45c8554
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 13
      aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/Messages/SendMessage.cs
  2. 22
      aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/Messages/SendMessageResult.cs
  3. 10
      aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/User/UserProfile.cs

13
aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/Messages/SendMessage.cs

@ -36,15 +36,12 @@ public class SendMessage
MessageContentType contentType = MessageContentType.Text,
string url = "")
{
Check.NotNullOrWhiteSpace(appToken, nameof(appToken));
Check.NotNullOrWhiteSpace(content, nameof(content));
Check.Length(summary, nameof(summary), 100);
AppToken = appToken;
Content = content;
Summary = summary;
AppToken = Check.NotNullOrWhiteSpace(appToken, nameof(appToken));
// 单条消息的数据长度(字符数)限制是:content<40000;summary<20(微信的限制,大于20显示不完);url<400
Content = Check.NotNullOrWhiteSpace(content, nameof(content), 39999);
Summary = Check.Length(summary, nameof(summary), 19);
Url = Check.Length(url, nameof(url), 399);
ContentType = contentType;
Url = url;
TopicIds = new List<int>();
Uids = new List<string>();

22
aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/Messages/SendMessageResult.cs

@ -15,7 +15,25 @@ public class SendMessageResult
/// 消息标识
/// </summary>
[JsonProperty("messageId")]
public long MessageId { get; set; }
[Obsolete("废弃,请不要再使用,后续会删除这个字段, see: https://wxpusher.dingliqc.com/docs/#/?id=%e5%8f%91%e9%80%81%e6%b6%88%e6%81%af")]
public long? MessageId { get; set; }
/// <summary>
/// 消息内容标识
/// </summary>
/// <remarks>
/// 调用一次接口,生成一个,你可以通过此id调用删除消息接口,删除消息。
/// 本次发送的所有用户共享此消息内容。
/// </remarks>
[JsonProperty("messageContentId")]
public long ContentId { get; set; }
/// <summary>
/// 消息发送标识
/// </summary>
/// <remarks>
/// 每个uid用户或者topicId生成一个,可以通过这个id查询对某个用户的发送状态
/// </remarks>
[JsonProperty("sendRecordId")]
public long RecordId { get; set; }
/// <summary>
/// 状态
/// </summary>
@ -30,7 +48,7 @@ public class SendMessageResult
/// 群组标识
/// </summary>
[JsonProperty("topicId")]
public string TopicId { get; set; }
public long? TopicId { get; set; }
/// <summary>
/// 是否调用成功
/// </summary>

10
aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher/LINGYUN/Abp/WxPusher/User/UserProfile.cs

@ -12,6 +12,11 @@ public class UserProfile
[JsonProperty("uid")]
public string Uid { get; set; }
/// <summary>
/// 用户关注的应用或者主题id,根据type来区分
/// </summary>
[JsonProperty("appOrTopicId")]
public long? AppOrTopicId { get; set; }
/// <summary>
/// 新用户微信不再返回 ,强制返回空
/// </summary>
[JsonProperty("headImg")]
@ -48,4 +53,9 @@ public class UserProfile
/// </summary>
[JsonProperty("target")]
public string Target { get; set; }
/// <summary>
/// 0表示用户不是付费用户,大于0表示用户付费订阅到期时间,毫秒级时间戳
/// </summary>
[JsonProperty("payEndTime")]
public long PayEndTime { get; set; }
}

Loading…
Cancel
Save