氚云表单消息提醒

时间:2024-03-06 07:13:23

1、后端代码


        //消息提醒
        List < H3.Notification.UserMessage > _messageList=new List<H3.Notification.UserMessage>();
        string title = this.Request.BizObject["title"] + string.Empty;//标题 
        string welcomeWords = this.Request.BizObject["content"] + string.Empty;//获取控件内容,当做要提醒的内容
        string send = H3.Organization.User.SystemUserId;//发起人
        string[]  receiverid = (string[]) this.Request.BizObject["users"];//人员多选为数组类型(接收人员)
        foreach(string str in receiverid)
        {
            H3.Notification.UserMessage   _message = new H3.Notification.UserMessage(H3.Notification.UserMessageType.DingTalkPlainText, send, str, "", title, welcomeWords, "");
            _messageList.Add(_message);
            if(_messageList.Count > 0)
                this.Request.Engine.Notifier.Send(_messageList.ToArray());//执行发送 
        }