# 统一待办推送：通过MQ队列订阅统一待办推送数据

来源快照：`result_data_new_260518.json`

- 来源 ID：`1201414292614881469`
- 模块：集成中心
- 目录：统一待办推送 - 开发示例
- space ID：`1158011075224911873`
- 原文链接：未提供
- 产品基线：未提供

## 正文

# 一、功能背景

统一待办推送一直以来都是通过EC服务上开发套件对接第三方接口，实现业务。这种做法无法满足日益增长的二开需求量，并且第三方各种不同的业务需求变化单单靠套件化无法快速、及时的覆盖客户需求。

因此，我们需要一个统一的出口，让任意第三方平台（包括ECODE）可以方便的订阅到统一待办推送的数据，然后按照自己的业务需要完成二开对接第三方接口。

# 二、功能价值

1、降低二开难度，不需要学习EC的开发框架

2、提升开发效率，不需要搭建EC开发平台

3、降低迭代成本，不需要修改基线hotfix出包处理

# 三、开发说明

1、添加配置

在【统一待办推送设置】-【基础设置】-【新建】-【从空白中新建】，添加以下配置：

![](https://weapp.eteams.cn/papi/file/preview?fileId=1201414460089655298&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

推送类：com.weaver.intunifytodo.client.engine.push.request.interfaces.WPushRequestForMQ

queueName：填的是MQ服务上创建的队列名称

maxLength：填的是MQ服务上队列排队数据量，超过这个值就不在推送到队列，仅仅保存推送记录

设置启用之后，保存配置就可以使用了。

开发者通过订阅MQ服务中和“queueName”一致的队列，来获取统一待办推送的数据，推送内容参考：

{"id":1169968827050229760,"sysCode":"ecode","serverURL":"","data":{"tenantKey":"TTBFQ2XU5V","timeStamp":"1761877366973","userId":"5113420313996493331","detailMap":{"DELETE":[],"OVER":[],"TODO":[{"userId":"921576673248567296","logId":"1196910177405386757","sendLogId":"1196910177405386764","userToHrmRule":"921576673248567296","sendGroup":"TODO","realUserId":"921576673248567296","cid":"1196910173305061385","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:46","operateDateTime":null,"readMark":"UNREAD","isRemark":"NODE_OPERATOR","nodeId":"1064114938488520732","nodeName":"001审批","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"nodeType":"APPROVE","msgType":"WF_TODO","needWFBack":1,"isProcessed":0,"viewDatetime":null,"beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520732\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=921576673248567296"}],"DONE":[{"userId":"5113420313996493331","logId":"1196910177405386753","sendLogId":"1196910177405386763","userToHrmRule":"5113420313996493331","sendGroup":"DONE","realUserId":"5113420313996493331","cid":"1196910169052037125","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:45","operateDateTime":"2025-10-31 10:22:46","readMark":"NORMAL","isRemark":"OPERATED","nodeId":"1064114938488520726","nodeName":"发起节点","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"发起节点"},{"langType":"en_US","langValue":"发起节点"},{"langType":"zh_TW","langValue":"发起节点"},{"langType":"ko_KR","langValue":"发起节点"},{"langType":"ru_RU","langValue":"发起节点"},{"langType":"ja_JP","langValue":"发起节点"},{"langType":"th_TH","langValue":"发起节点"},{"langType":"es_ES","langValue":"发起节点"},{"langType":"de_DE","langValue":"发起节点"},{"langType":"fr_FR","langValue":"发起节点"},{"langType":"pt_PT","langValue":"发起节点"},{"langType":"in_ID","langValue":"发起节点"},{"langType":"ar_AE","langValue":"发起节点"}],"nodeType":"START","msgType":"WF_DONE","needWFBack":1,"isProcessed":0,"viewDatetime":"2025-10-31 10:22:45","beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520726\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331"}]},"userToHrmRule":"5113420313996493331","requestId":"1196910134650355712","workflowId":"1064114938488520720","workflowName":"推送测试A-01","workFlowNameMultiLangList":[{"langType":"zh_CN","langValue":"推送测试A-01"},{"langType":"en_US","langValue":"推送测试A-01"},{"langType":"zh_TW","langValue":"推送测试A-01"},{"langType":"ko_KR","langValue":"推送测试A-01"},{"langType":"ru_RU","langValue":"推送测试A-01"},{"langType":"ja_JP","langValue":"推送测试A-01"},{"langType":"th_TH","langValue":"推送测试A-01"},{"langType":"es_ES","langValue":"推送测试A-01"},{"langType":"de_DE","langValue":"推送测试A-01"},{"langType":"fr_FR","langValue":"推送测试A-01"},{"langType":"pt_PT","langValue":"推送测试A-01"},{"langType":"in_ID","langValue":"推送测试A-01"},{"langType":"ar_AE","langValue":"推送测试A-01"}],"currentNodeName":"001审批","currentNodeNameMultiLangList":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"workflowType":"1064114646304915501","userType":"0","startNodeId":"1064114938488520726","createDateTime":"2025-10-31 10:22:46","status":"发起节点 至 1级审批","requestName":"MQ测试2","requestNameHtml":"<p style=\"margin-top:0; margin-bottom:0; display: inline;\"><span>MQ测试2</span> <span style = \"color:#999;font-size:12px; font-size: 12px;\"><span></span></span>","requestNameTitle":"MQ测试2 ","requestLevel":0,"requestMark":null,"secLevel":40,"flowStatus":{"code":1,"desc":"审批中","labelid":14333},"finishDateTime":null,"operateType":"SUBMIT_END","pcUrl":"/sp/workflow/flowpage/view/1196910134650355712","appUrl":"/mobile/workflow/flowpage/view/1196910134650355712","adapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712","beAgentUserToHrmRule":null,"fixedVersionId":1064114938488520720,"module":0,"otherInfo":{"operateTypeSrc":"submit","lastNodeUserId":5113420313996493331},"lastNodeOperatorToHrmRule":"5113420313996493331","wpushType":"REQUEST","detailList":[{"userId":"921576673248567296","logId":"1196910177405386757","sendLogId":"1196910177405386764","userToHrmRule":"921576673248567296","sendGroup":"TODO","realUserId":"921576673248567296","cid":"1196910173305061385","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:46","operateDateTime":null,"readMark":"UNREAD","isRemark":"NODE_OPERATOR","nodeId":"1064114938488520732","nodeName":"001审批","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"nodeType":"APPROVE","msgType":"WF_TODO","needWFBack":1,"isProcessed":0,"viewDatetime":null,"beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520732\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=921576673248567296"},{"userId":"5113420313996493331","logId":"1196910177405386753","sendLogId":"1196910177405386763","userToHrmRule":"5113420313996493331","sendGroup":"DONE","realUserId":"5113420313996493331","cid":"1196910169052037125","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:45","operateDateTime":"2025-10-31 10:22:46","readMark":"NORMAL","isRemark":"OPERATED","nodeId":"1064114938488520726","nodeName":"发起节点","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"发起节点"},{"langType":"en_US","langValue":"发起节点"},{"langType":"zh_TW","langValue":"发起节点"},{"langType":"ko_KR","langValue":"发起节点"},{"langType":"ru_RU","langValue":"发起节点"},{"langType":"ja_JP","langValue":"发起节点"},{"langType":"th_TH","langValue":"发起节点"},{"langType":"es_ES","langValue":"发起节点"},{"langType":"de_DE","langValue":"发起节点"},{"langType":"fr_FR","langValue":"发起节点"},{"langType":"pt_PT","langValue":"发起节点"},{"langType":"in_ID","langValue":"发起节点"},{"langType":"ar_AE","langValue":"发起节点"}],"nodeType":"START","msgType":"WF_DONE","needWFBack":1,"isProcessed":0,"viewDatetime":"2025-10-31 10:22:45","beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520726\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331"}]},"paramJSON":{"todoURL":"[http://10.10.37.188:8080/rest/ofs/batchDeleteUserRequestInfoByJson](http://10.10.37.188:8080/rest/ofs/batchDeleteUserRequestInfoByJson)"}}  
---
