add_wechat_friend_log.api 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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:"wxType,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. ErrMessage *string `json:"errMessage,optional"`
  34. TaskCount *int `json:"taskCount,optional"`
  35. isShow *int `json:"isShow,optional"`
  36. // 微信昵称 群备注名称
  37. Message *string `json:"message,optional"`
  38. CreateTime *string `json:"createTime,optional"`
  39. UpdateTime *string `json:"updateTime,optional"`
  40. }
  41. CancelByIdsReq {
  42. Ids []int64 `json:"ids" validate:"required,min=1"`
  43. }
  44. )
  45. @server(
  46. jwt: Auth
  47. group: add_friend
  48. middleware: Authority
  49. )
  50. service Wechat {
  51. // 手机号加好友接口
  52. @handler AddFriendByPhone
  53. post /add_friend/add_friend_by_phone (AddWechatFriendLogInfo) returns (BaseMsgResp)
  54. // 添加好友的列表接口
  55. @handler AddFriendList
  56. post /add_friend/add_friend_list (AddFriendListReq) returns (AddFriendListResp)
  57. // cancel task add friend
  58. @handler CancelByIds
  59. post /add_friend/cancel_by_ids (CancelByIdsReq) returns (BaseMsgResp)
  60. }