[关闭]
@myyzs 2019-03-14T05:39:45.000000Z 字数 1325 阅读 90

公告同步到ERP-自定义接口


1.公告同步到ERP

传参方式:

Post

参数1-action值为1的时候:

  1. {
  2. "title": "111",
  3. "overview": "1111",
  4. "content": "<p>1111<\/p>",
  5. "cover_img": "",
  6. "author": "1111",
  7. "cover_in_content": 0,
  8. "notice_type": "1",
  9. "sort_id": "1",
  10. "notice_id": "122",
  11. "action": 1,
  12. "send_object": "{\"depts\": [\"11b11db4-e907-4f1f-8835-b9daab6e1f23\", \"23c9c1b3-d702-e711-940c-c03fd57b858c\"],\"users\":[{\"user_id\":\"111930\",\"openid\":\"mysoft5b14e65c6b9d1302127267\",\"user_code\":\"meiy02\",\"user_guid\":\"725a8995-3d2b-48d1-b301-27a21e113e28\"}],\"party_id\":\"100\"}",
  13. "attachments": "[{\"file_url\":\"\\\/uploads\\\/0000\\\/dev_fangl\\\/notice\\\/attachment\\\/b448e2e2ab8fea9152defb7674fdb64c.txt\",\"file_name\":\"11sp1-sql.txt\"},{\"file_url\":\"\\\/uploads\\\/0000\\\/dev_fangl\\\/notice\\\/attachment\\\/eb88debc3bb2a9fdde44c669b63f6408.txt\",\"file_name\":\"11SP2-SQL.txt\"}]",
  14. "sort_name": "企业通知"
  15. }

参数2-action值为2的时候(删除):

  1. {
  2. "action":2
  3. "sync_api_type":2,
  4. "sync_api_address":"http://www.fdccloud.com/xxx"
  5. "notice_id": '123',
  6. }

POST参数说明

参数名称 描述
action 1-新增 2-删除
notice_id 公告的ID
notice_type 公告类型,正文是自定义为1,URL则为2
sort_id 公告类别ID
sort_name 公告类别名称
title 公告标题
cover_img 封面图片
cover_in_content 封面图片显示在正文中
author 发布者(//非必填,空就为当前企业名字(50个字符内))
content 公告内容
overview 内容概要
send_object 发送范围,depts为部门,users为人,party_id为组织ID
attachments 附件

返回结果:

成功

  1. {
  2. "errcode" => 0,
  3. "errmsg" => "",
  4. "data" => ""
  5. }

失败

  1. {
  2. "errcode" => "错误代码",
  3. "errmsg" => "错误信息",
  4. "data" => ""
  5. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注