--使用场景
1.业务需求没有异常事件等功能
2.旧项目使用以前框架(无企业微信模式),整体升级表结构不统一。

--使用方式
1.新建表 event_d_send_record 
--[[
 CREATE TABLE [dbo].[event_d_send_record](
 [send_record_id] [varchar](50) NOT NULL,
 [fault_record_id] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_fault_record_id]  DEFAULT (''),
 [fault_id] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_fault_id]  DEFAULT (''),
 [user_id] [nvarchar](50) NULL,
 [info] [varchar](500) NULL CONSTRAINT [DF_event_d_send_record_info]  DEFAULT (''),
 [create_time] [datetime] NULL,
 [is_send] [int] NULL CONSTRAINT [DF_event_d_send_record_is_send]  DEFAULT ((0)),
 [send_level] [int] NULL CONSTRAINT [DF_event_d_send_record_send_level]  DEFAULT ((0)),
 [send_time] [datetime] NULL,
 [dst_type] [int] NULL CONSTRAINT [DF_event_d_send_record_dst_type]  DEFAULT ((0)),
 [msg_type] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_msg_type]  DEFAULT (''),
 [mobile] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_mobile]  DEFAULT (''),
 [app] [varchar](120) NULL CONSTRAINT [DF_event_d_send_record_app]  DEFAULT (''),
 [wechat] [varchar](120) NULL CONSTRAINT [DF_event_d_send_record_wechat]  DEFAULT (''),
 [ip] [varchar](64) NULL CONSTRAINT [DF_event_d_send_record_ip]  DEFAULT (''),
 [port] [int] NULL CONSTRAINT [DF_event_d_send_record_port]  DEFAULT ((0)),
 [dc_loc_id] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_dc_loc_id]  DEFAULT (''),
 [dialog_name] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_dialog_name]  DEFAULT (''),
 [resend_times] [int] NULL CONSTRAINT [DF_event_d_send_record_resend_times]  DEFAULT ((0)),
 [email] [varchar](50) NULL CONSTRAINT [DF_event_d_send_record_email]  DEFAULT (''),
 CONSTRAINT [PK_d_event_send_log_copy1] PRIMARY KEY CLUSTERED 
(
 [send_record_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
]]

2.配置服务端脚本[run_lua] event_notice_only_send_serv = 3
3.启动 tn_notify_serv.exe 消息发送服务
    3.1 需要配置rabbitmq
    3.2 新建队列名称sms_que
    3.3 注意端口为 amqp端口号
4.单独发送信息时,新增 event_d_send_record 表数据
    info = 发送消息内容
    send_time = 计划发送时间    --注意:发送时间不能比当前时间还小,注意时间以服务所在服务器时间为准
    msg_type = wechat / email / sms    --发送方式
    wechat = 接收人企业微信号
    mobile = 接收人手机号
    email = 接收人邮箱
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:02

results matching ""

    No results matching ""