$vs.messageGuthonScript语言中提供消息推送算法工具类的对象,具体方法定义如下:

  • $vs.message.buildMessageContext($userId:string,$msgTypeId:string,$bill:object):string

    • 函数说明:
      编译并返回消息模版内容
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
    • 返回说明:
      编译后的消息模版内容
  • $vs.message.buildMessageContext($userId:string,$msgTypeId:string,$bill:object,$systemId:string):string

    • 函数说明:
      编译并返回消息模版内容
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
      $systemId:string: 操作员所属的系统编码
    • 返回说明:
      编译后的消息模版内容
  • $vs.message.buildMessageTitle($userId:string,$msgTypeId:string,$bill:object):string

    • 函数说明:
      编译并返回消息模版标题
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
    • 返回说明:
      编译后的消息模版标题
  • $vs.message.buildMessageTitle($userId:string,$msgTypeId:string,$bill:object,$systemId:string):string

    • 函数说明:
      编译并返回消息模版标题
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
      $systemId:string: 操作员所属的系统编码
    • 返回说明:
      编译后的消息模版标题
  • $vs.message.sendAdvanceMessage($userId:string,$msgTypeId:string,$context:string,$param:string|Map):void

    • 函数说明:
      发送一个基于消息模版的消息给用户
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $context:string: 消息内容(500字节内)
      $param:object: 用于打开关联窗口时,传递给窗口的参数
    • 返回说明:
  • $vs.message.sendAdvanceMessage($userId:string,$msgTypeId:string,$context:string,$param:string|Map,$systemId:string):void

    • 函数说明:
      发送一个基于消息模版的消息给用户
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $context:string: 消息内容(500字节内)
      $param:object: 用于打开关联窗口时,传递给窗口的参数
      $systemId:string: 操作员所属的系统编码
    • 返回说明:
  • $vs.message.sendCropWxMessage($userId:string,$userName:string,$openId:string,$msgTypeId:string,$bill:object):int

    • 函数说明:
      发送微信企业号消息给指定人(不是系统内的人,站内信不发)
    • 参数说明:
      $userId:string: 接收者标识(必须),如:手机号,用于记录发送日志,任意值不超过50字节长度
      $userName:string: 接收者姓名(必须),用于记录发送日志,任意值不超过50字节长度
      $openId:string: 接收者企业微信openId
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
    • 返回说明:
      返回消息发送状态,0 - 成功 1 - 消息模版被禁用 other 失败
  • $vs.message.sendDingTalkMessage($userId:string,$userName:string,$openId:string,$msgTypeId:string,$bill:object):int

    • 函数说明:
      发送钉钉消息给指定人(不是系统内的人,站内信不发)
    • 参数说明:
      $userId:string: 接收者标识(必须),如:手机号,用于记录发送日志,任意值不超过50字节长度
      $userName:string: 接收者姓名(必须),用于记录发送日志,任意值不超过50字节长度
      $openId:string: 接收者钉钉openId
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
    • 返回说明:
      返回消息发送状态,0 - 成功 1 - 消息模版被禁用 other 失败
  • $vs.message.sendInterTargetSystemMessage($appId:string,$data:object):void

    • 函数说明:
      发送接口通知消息(仅用于通知第三方接口有新消息需要获取用)
    • 参数说明:
      $appId:string: 第三方系统编码
      $data:object: 需要推送给对方的业务数据(内容由业务系统和第三方系统协商)
    • 返回说明:
  • $vs.message.sendSimpleMessage($userId:string,$msgTitle:string,$context:string):void

    • 函数说明:
      发送一个简单消息给用户(当前系统内的操作员)
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTitle:string: 消息标题(200字节内)
      $context:string: 消息内容(500字节内)
    • 返回说明:
  • $vs.message.sendSimpleMessage($userId:string,$msgTitle:string,$context:string,$systemId:string):void

    • 函数说明:
      发送一个简单消息给用户
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTitle:string: 消息标题(200字节内)
      $context:string: 消息内容(500字节内)
      $systemId:string: 操作员所属的系统编码
    • 返回说明:
  • $vs.message.sendTemplateMessage($userId:string,$msgTypeId:string,$bill:object,$param:string|Map):void

    • 函数说明:
      发送一个基于消息模版的消息给用户
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
      $param:object: 用于打开关联窗口时,传递给窗口的参数
    • 返回说明:
  • $vs.message.sendTemplateMessage($userId:string,$msgTypeId:string,$bill:object,$param:string|Map,$systemId:string):void

    • 函数说明:
      发送一个基于消息模版的消息给用户
    • 参数说明:
      $userId:string: 操作员用户编码
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
      $param:object: 用于打开关联窗口时,传递给窗口的参数
      $systemId:string: 操作员所属的系统编码
    • 返回说明:
  • $vs.message.sendWeChatMessage($userId:string,$userName:string,$openId:string,$msgTypeId:string,$bill:object):int

    • 函数说明:
      发送微信公众号消息给指定人(不是系统内的人,站内信不发)
    • 参数说明:
      $userId:string: 接收者标识(必须),如:手机号,用于记录发送日志,任意值不超过50字节长度
      $userName:string: 接收者姓名(必须),用于记录发送日志,任意值不超过50字节长度
      $openId:string: 接收者微信openId
      $msgTypeId:string: 消息模版编码
      $bill:object: 单据内容(用于产生消息通知信息)
    • 返回说明:
      返回消息发送状态,0 - 成功 1 - 消息模版被禁用 other 失败
文档更新时间: 2022-02-25 15:47   作者:姜一维