add_wechat_friend_log.api 2.0 KB

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