public static class Notification.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
Notification |
build() |
Notification.Builder |
chatList(NotificationChat[] chatList)
非必填,push推送到的会话列表(群)
示例值:[{"chat_id":"oc_7c1a2815c9846b5e518b950de0e62de8"}]
|
Notification.Builder |
createdAt(String createdAt)
非必填,创建时间(毫秒时间戳)
示例值:1626332244719
|
Notification.Builder |
createUser(NotificationUser createUser)
非必填,创建人
示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}
|
Notification.Builder |
departmentList(NotificationDepartment[] departmentList)
非必填,push推送到的部门信息列表
示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]
|
Notification.Builder |
ext(String ext)
非必填,预留扩展字段
示例值:{}
|
Notification.Builder |
id(String id)
非必填,创建成功后返回
示例值:6981801914270744596
|
Notification.Builder |
jobName(String jobName)
必填,任务名称
示例值:测试推送任务
|
Notification.Builder |
newStaffScopeDepartmentList(NotificationDepartment[] newStaffScopeDepartmentList)
非必填,新人入职生效部门列表
示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]
|
Notification.Builder |
newStaffScopeType(Integer newStaffScopeType)
非必填,;新人入职范围类型(push_type为1时生效) 0:组织内所有新人 1:组织内特定的部门(new_staff_scope_department_list 字段不能为空)
示例值:0
|
Notification.Builder |
pushContent(String pushContent)
必填,推送内容,详见:https://open.feishu.cn/tool/cardbuilder?
|
Notification.Builder |
pushScopeType(Integer pushScopeType)
必填,;推送范围(服务台私信) 0:组织内全部成员(user_list和department_list必须为空) 1:不推送任何成员(user_list和department_list必须为空,chat_list不可为空) 2:推送到部分成员(user_list或department_list不能为空) 3:入职新人 以上四种状态,chat_list都相对独立,只有在推送范围为1时,必须需要设置chat_list
示例值:0
|
Notification.Builder |
pushType(Integer pushType)
必填,;0(定时推送:push_scope不能等于3) 1(新人入职推送:push_scope必须等于1或者3;new_staff_scope_type不能为空)
示例值:0
|
Notification.Builder |
readUserCount(Integer readUserCount)
非必填,已读用户总数
示例值:1
|
Notification.Builder |
sendAt(String sendAt)
非必填,推送任务触发时间(毫秒时间戳)
示例值:1626332244719
|
Notification.Builder |
sentUserCount(Integer sentUserCount)
非必填,已推送用户总数
示例值:1
|
Notification.Builder |
status(Integer status)
非必填,创建成功后返回
示例值:0
|
Notification.Builder |
targetUserCount(Integer targetUserCount)
非必填,目标推送用户总数
示例值:1
|
Notification.Builder |
updatedAt(String updatedAt)
非必填,更新时间(毫秒时间戳)
示例值:1626332244719
|
Notification.Builder |
updateUser(NotificationUser updateUser)
非必填,更新用户
示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}
|
Notification.Builder |
userList(NotificationUser[] userList)
非必填,push推送到成员列表
示例值:[{"user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}]
|
public Notification.Builder id(String id)
示例值:6981801914270744596
id - public Notification.Builder jobName(String jobName)
示例值:测试推送任务
jobName - public Notification.Builder status(Integer status)
示例值:0
status - public Notification.Builder createUser(NotificationUser createUser)
示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}
createUser - public Notification.Builder createdAt(String createdAt)
示例值:1626332244719
createdAt - public Notification.Builder updateUser(NotificationUser updateUser)
示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}
updateUser - public Notification.Builder updatedAt(String updatedAt)
示例值:1626332244719
updatedAt - public Notification.Builder targetUserCount(Integer targetUserCount)
示例值:1
targetUserCount - public Notification.Builder sentUserCount(Integer sentUserCount)
示例值:1
sentUserCount - public Notification.Builder readUserCount(Integer readUserCount)
示例值:1
readUserCount - public Notification.Builder sendAt(String sendAt)
示例值:1626332244719
sendAt - public Notification.Builder pushContent(String pushContent)
示例值:{ \"config\": { \"wide_screen_mode\": true }, \"elements\": [ { \"tag\": \"div\", \"text\": { \"tag\": \"lark_md\", \"content\": \"[飞书](https://www.feishu.cn)整合即时沟通、日历、音视频会议、云文档、云盘、工作台等功能于一体,成就组织和个人,更高效、更愉悦。\" } } ] }
pushContent - public Notification.Builder pushType(Integer pushType)
示例值:0
pushType - public Notification.Builder pushScopeType(Integer pushScopeType)
示例值:0
pushScopeType - public Notification.Builder newStaffScopeType(Integer newStaffScopeType)
示例值:0
newStaffScopeType - public Notification.Builder newStaffScopeDepartmentList(NotificationDepartment[] newStaffScopeDepartmentList)
示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]
newStaffScopeDepartmentList - public Notification.Builder userList(NotificationUser[] userList)
示例值:[{"user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}]
userList - public Notification.Builder departmentList(NotificationDepartment[] departmentList)
示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]
departmentList - public Notification.Builder chatList(NotificationChat[] chatList)
示例值:[{"chat_id":"oc_7c1a2815c9846b5e518b950de0e62de8"}]
chatList - public Notification.Builder ext(String ext)
示例值:{}
ext - public Notification build()
Copyright © 2025. All rights reserved.