add_wechat_friend_log.api 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import "../base.api"
  2. type (
  3. //add_friend_by_phone api接口请求值
  4. AddWechatFriendLogInfo {
  5. Type int `json:"type,options=1|3,default=1"`
  6. WeChatIds []string `json:"wechat_ids,optional,omitempty"`
  7. Phones []string `json:"phones"`
  8. Message string `json:"message"`
  9. CallbackURL string `json:"callback_url,optional"`
  10. }
  11. AddFriendListReq {
  12. PageInfo
  13. OwnerWxId *string `json:"wxId,optional"`
  14. OwnerWxType *int `json:"type,optional"`
  15. FindContent *string `json:"phone,optional"`
  16. status *int `json:"status,optional"`
  17. }
  18. AddFriendListResp {
  19. BaseDataInfo
  20. Data FriendListInfo `json:"data"`
  21. }
  22. FriendListInfo {
  23. BaseListInfo
  24. Data []FriendList `json:"data"`
  25. }
  26. FriendList{
  27. Id int64 `json:"id,optional"`
  28. // 微信id 公众号微信ID
  29. OwnerWxId *string `json:"wxId,optional"`
  30. OwnerWxType *string `json:"wxType,optional"`
  31. FindContent *string `json:"phone,optional"`
  32. Status *string `json:"status,optional"`
  33. StatusInt *int `json:"statusInt,optional"`
  34. ErrMessage *string `json:"errMessage,optional"`
  35. TaskCount *int `json:"taskCount,optional"`
  36. isShow *int `json:"isShow,optional"`
  37. // 微信昵称 群备注名称
  38. Message *string `json:"message,optional"`
  39. CreateTime *string `json:"createTime,optional"`
  40. UpdateTime *string `json:"updateTime,optional"`
  41. }
  42. CancelByIdsReq {
  43. Ids []int64 `json:"ids" validate:"required,min=1"`
  44. }
  45. )
  46. @server(
  47. jwt: Auth
  48. group: add_friend
  49. middleware: Authority
  50. )
  51. service Wechat {
  52. // 手机号加好友接口
  53. @handler AddFriendByPhone
  54. post /add_friend/add_friend_by_phone (AddWechatFriendLogInfo) returns (BaseMsgResp)
  55. // 添加好友的列表接口
  56. @handler AddFriendList
  57. post /add_friend/add_friend_list (AddFriendListReq) returns (AddFriendListResp)
  58. // cancel task add friend
  59. @handler CancelByIds
  60. post /add_friend/cancel_by_ids (CancelByIdsReq) returns (BaseMsgResp)
  61. }