bxsubscribe.api 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. syntax = "v1"
  2. info (
  3. title: "剑鱼标讯" // TODO: add title
  4. desc: "订阅模块"// TODO: add description
  5. author: "wangshan"
  6. email: "wangshan@topnet.net.cn"
  7. )
  8. type (
  9. //订阅列表
  10. subscribeReq {
  11. AppId string `header:"appId"`
  12. UserId string `header:"userId"`
  13. EntId string `header:"entId,optional"`
  14. EntUserId string `header:"entUserId,optional"`
  15. DeptId string `header:"deptId,optional"` //部门id
  16. PageNum int64 `json:"pageNum,optional"`
  17. PageSize int64 `json:"pageSize,optional"`
  18. SelectTime string `json:"selectTime,optional"`
  19. Area string `json:"area,optional"`
  20. City string `json:"city,optional"`
  21. Industry string `json:"industry,optional"`
  22. BuyerClass string `json:"buyerClass,optional"`
  23. KeyWords string `json:"keyWords,optional"`
  24. Subtype string `json:"subtype,optional"`
  25. Price string `json:"price,optional"`
  26. FileExists string `json:"fileExists,optional"`
  27. Source string `json:"source,optional"` //信息来源
  28. IsRead string `json:"isRead,optional"` //是否已读
  29. Staffs string `json:"staffs,optional"` //分发的员工
  30. UserType string `path:"userType,default=fType,options=fType|vType|mType|eType"` //fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户;
  31. NewUserId int64 `header:"newUserId"`
  32. IsEnt bool `json:"isEnt,optional"`
  33. SelectIds string `json:"selectIds,optional"`
  34. PositionType int64 `header:"positionType,optional"`
  35. }
  36. //
  37. someInfoReq {
  38. AppId string `header:"appId"`
  39. UserType string `path:"userType"`
  40. UserId string `header:"userId,optional"`
  41. NewUserId string `header:"newUserId,optional"`
  42. EntId string `header:"entId,optional"`
  43. AccountId string `header:"accountId,optional"`
  44. PositionType string `header:"positionType,optional"`
  45. PositionId string `header:"positionId,optional"`
  46. }
  47. //
  48. commonResp {
  49. Err_code int64 `json:"error_code"`
  50. Err_msg string `json:"error_msg"`
  51. Data interface{} `json:"data"`
  52. TimeData interface{} `json:"timeData"`
  53. }
  54. //
  55. subscribeUpdateReq {
  56. Area map[string]interface{} `json:"area,optional"` //地区
  57. Buyerclass []string `json:"buyerclass,optional"` //采购单位类型
  58. Items []map[string]interface{} `json:"items,optional"` //关键词
  59. Infotype []string `json:"infotype,optional"` //信息类型
  60. Matchway string `json:"matchway,optional"` //匹配方式 1标题 2正文
  61. Projectmatch string `json:"projectmatch,optional"` //项目匹配 1开始 0关闭
  62. Ratemode string `json:"ratemode,optional"` // 1:实时推送,2:每天9点推送,3:每周推送,4:每月推送 5:每日推送两次
  63. Apppush string `json:"apppush,optional"` //app推送 1开启 0关闭
  64. Mailpush string `json:"mailpush,optional"` //邮箱推送 1开启 0关闭
  65. Mail string `json:"mail,optional"` //邮箱
  66. Otherbuyerclass string `json:"otherbuyerclass,optional"` //匹配未分类类型 1匹配 0不匹配
  67. AppId string `header:"appId,optional"`
  68. UserType string `path:"userType,optional"`
  69. UserId string `header:"userId,optional"`
  70. PositionType int64 `header:"positionType,optional"`
  71. }
  72. SetReadReq {
  73. AppId string `header:"appId"`
  74. UserId string `header:"userId"`
  75. EntId string `header:"entId,optional"`
  76. EntUserId string `header:"entUserId,optional"`
  77. DeptId string `header:"deptId,optional"` //部门id
  78. Vsid int64 `form:"vsid"`
  79. NewUserId int64 `header:"newUserId"`
  80. IsEnt bool `form:"isEnt,optional"`
  81. UserType string `path:"userType,optional"`
  82. PositionType int64 `header:"positionType,optional"`
  83. }
  84. GetKeyReq {
  85. AppId string `header:"appId"`
  86. UserId string `header:"userId"`
  87. EntId string `header:"entId,optional"`
  88. EntUserId string `header:"entUserId,optional"`
  89. DeptId string `header:"deptId,optional"` //部门id
  90. NewUserId int64 `header:"newUserId"`
  91. IsEnt bool `form:"isEnt,optional"`
  92. UserType string `path:"userType,optional"`
  93. VipPower int64 `form:"ent_buy_vip ,optional"`
  94. MemberPower int64 `form:"ent_buy_member ,optional"`
  95. PowerSource int64 `form:"powerSource,optional"`
  96. UserPower int64 `form:"userPower,optional"`
  97. PositionType int64 `header:"positionType,optional"`
  98. }
  99. DistributorReq {
  100. AppId string `header:"appId"`
  101. EntId string `header:"entId,optional"`
  102. EntUserId string `header:"entUserId,optional"`
  103. UserType string `path:"userType,optional"`
  104. Region string `json:"region,optional"`
  105. SelectIds string `json:"selectIds,optional"`
  106. QueryType string `json:"queryType,optional"`
  107. }
  108. viewStatusReq {
  109. AppId string `header:"appId"`
  110. EntId string `header:"entId,optional"`
  111. EntUserId string `header:"entUserId,optional"`
  112. UserType string `path:"userType,optional"`
  113. InfoId string `json:"infoId,optional"`
  114. }
  115. msgDistributor {
  116. AppId string `header:"appId"`
  117. EntId string `header:"entId,optional"`
  118. EntUserId string `header:"entUserId,optional"`
  119. MessageId string `json:"messageId"`
  120. Staffs string `json:"staffs"`
  121. }
  122. GetUserReq {
  123. AppId string `header:"appId"`
  124. EntId int64 `header:"entId,optional"`
  125. EntUserId int64 `header:"entUserId,optional"`
  126. PositionType int64 `header:"positionType,optional"`
  127. UserId string `header:"mgoUserId,optional"`
  128. BaseUserId int64 `header:"newUserId,optional"`
  129. ServiceType string `json:"serviceType,optional"`
  130. PositionId int64 `header:"positionId,optiona"`
  131. AccountId int64 `header:"accountId,optiona"`
  132. }
  133. SetUserReq {
  134. AppId string `header:"appId"`
  135. EntId int64 `header:"entId,optional"`
  136. EntUserId int64 `header:"entUserId,optional"`
  137. PositionType int64 `header:"positionType,optional"`
  138. UserId string `header:"userId,optional"`
  139. Mail string `json:"mail,optional"`
  140. }
  141. SetPushSetReq {
  142. AppId string `header:"appId"`
  143. EntId int64 `header:"entId,optional"`
  144. EntUserId int64 `header:"entUserId,optional"`
  145. PositionType int64 `header:"positionType,optional"`
  146. UserId string `header:"mgoUserId,optional"`
  147. Item string `json:"item,optional"`
  148. SetType string `json:"setType"`
  149. Ratemode int64 `json:"ratemode,optional"`
  150. Times []string `json:"times,optional"`
  151. PushType string `json:"pushType,optional"`
  152. PushValue int64 `json:"pushValue,optional"`
  153. Interested int64 `json:"interested,optional"`
  154. }
  155. GetStaffSubscribeListReq {
  156. AppId string `header:"appId"`
  157. EntId int64 `header:"entId,optional"`
  158. EntUserId int64 `header:"entUserId,optional"`
  159. EStatus int64 `json:"e_status,optional"`
  160. PStatus int64 `json:"p_status,optional"`
  161. Search string `json:"search,optional"`
  162. PageNum int64 `json:"pageNum,optional"`
  163. PageSize int64 `json:"pageSize,optional"`
  164. }
  165. GetStaffSubscribeDetailReq {
  166. AppId string `header:"appId"`
  167. EntId int64 `header:"entId,optional"`
  168. EntUserId int64 `header:"entUserId,optional"`
  169. Token string `json:"token,optional"`
  170. }
  171. StaffSubscribeCommonResp {
  172. Err_code int64 `json:"error_code"`
  173. Err_msg string `json:"error_msg"`
  174. Data interface{} `json:"data"`
  175. }
  176. )
  177. service bxsubscribe-api {
  178. @handler subscribeList
  179. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  180. @handler someInfo
  181. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  182. @handler subscribeUpdate
  183. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  184. @handler ByPushHistory
  185. post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
  186. @handler SetRead
  187. post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
  188. @handler getKey
  189. post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
  190. @handler distributor
  191. post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp)
  192. @handler viewStatus
  193. post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp)
  194. @handler msgDistributor
  195. post /jybx/subscribe/msgDistributor(msgDistributor) returns (commonResp)
  196. @handler getUser //查询用户信息
  197. post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
  198. @handler setUser //设置用户信息
  199. post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
  200. @handler getPushSet //推送设置查询
  201. post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
  202. @handler setPushSet //推送设置修改
  203. post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
  204. @handler getStaffSubscribeList //查询企业员工订阅状态
  205. post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
  206. @handler getStaffSubscribeDetail //查询企业员工订阅详情
  207. post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
  208. }