sunpengfei
2025-11-21 f0bf887e538163e65101a4b9e2a165eb7694a90e
feat:开发
5个文件已修改
23 ■■■■■ 已修改文件
ApiTools.Application/WxUtils/Commands/WxmpSubscribMessageCommandHandler.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ApiTools.Core/ApiTools.Core.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ApiTools.Core/Models/WxmpUtils/Commands/SendWxmpSubscribMessageCommand.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ApiTools.Core/Services/ChannelPingAnPayWalletService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ApiTools.Core/Utils/WxmpUtils/WxmpUtils.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ApiTools.Application/WxUtils/Commands/WxmpSubscribMessageCommandHandler.cs
@@ -35,7 +35,7 @@
            await utils.WxmpSendSubscribMessage(new WxmpSendSubscribMessageRequest
            {
                Data = request.Data,
                TemplateId = request.Template.ToString(),
                TemplateId = request.TemplateId,
                Page = request.Page,
                WxmpCode = request.WxmpCode,
                Touser = request.Touser,
ApiTools.Core/ApiTools.Core.xml
@@ -1962,6 +1962,11 @@
            排班成功通知  排班后向C端人员通知
            </summary>
        </member>
        <member name="F:ApiTools.Core.EnumWxmpSubscribMessageTemplate.Test">
            <summary>
            测试
            </summary>
        </member>
        <member name="T:ApiTools.Core.IIsDisabled">
            <summary>
            是否已禁用
@@ -3293,7 +3298,7 @@
            小程序编号
            </summary>
        </member>
        <member name="P:ApiTools.Core.SendWxmpSubscribMessageCommand.Template">
        <member name="P:ApiTools.Core.SendWxmpSubscribMessageCommand.TemplateId">
            <summary>
            所需下发的订阅模板id
            </summary>
ApiTools.Core/Models/WxmpUtils/Commands/SendWxmpSubscribMessageCommand.cs
@@ -25,7 +25,7 @@
        /// 所需下发的订阅模板id
        /// </summary>
        [Required]
        public EnumWxmpSubscribMessageTemplate Template { get; set; }
        public string TemplateId { get; set; }
        /// <summary>
        /// 点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转
ApiTools.Core/Services/ChannelPingAnPayWalletService.cs
@@ -70,7 +70,7 @@
        public async Task Transfer(ChannelWallet wallet, ChannelWalletTransaction transaction)
        {
            transaction.PingAnPay = transaction.PingAnPay ?? new ChannelWalletTransactionPingAnPay();
            if (transaction.ReceiveBank == "123银行")
            if (transaction.ReceiveAccount == "1234123412341234")
            {
                transaction.ErrorCode = "500";
                transaction.FailReason = "卡号错误";
ApiTools.Core/Utils/WxmpUtils/WxmpUtils.cs
@@ -161,11 +161,11 @@
            if (option == null || option.AppId.IsNull() || option.AppSecret.IsNull())
                throw Oops.Oh(EnumErrorCodeType.s400, "发送订阅消息失败,缺失配置:WxmpOptions");
            command.EnvVersion = option.EnvVersion;
            if (!options.Value.SubscribMessageTemplates.ContainsKey(command.TemplateId))
                throw Oops.Oh(EnumErrorCodeType.s400, "发送订阅消息失败,模板不存在");
            var template = options.Value.SubscribMessageTemplates[command.TemplateId];
            command.TemplateId = template.TemplateId;
            if (command.Page.IsNull()) command.Page = template.Page;
            //if (!options.Value.SubscribMessageTemplates.ContainsKey(command.TemplateId))
            //    throw Oops.Oh(EnumErrorCodeType.s400, "发送订阅消息失败,模板不存在");
            //var template = options.Value.SubscribMessageTemplates[command.TemplateId];
            //command.TemplateId = template.TemplateId;
            //if (command.Page.IsNull()) command.Page = template.Page;
            var accessToken = await GetAccessToken(command.WxmpCode);
            var jsonContent = JsonConvert.SerializeObject(command, new JsonSerializerSettings
            {