用户接口远程调用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
596 B

3 years ago
3 years ago
3 years ago
3 years ago
  1. package userrpc
  2. import (
  3. "encoding/json"
  4. )
  5. /**
  6. * 绑定粉丝
  7. * 2021/10/23
  8. * gz
  9. */
  10. func Fans(site_id, dbname, user_id, business_id string, url ...string) error {
  11. conn, err := rpc_server_conn(url...)
  12. if err != nil {
  13. return err
  14. }
  15. defer conn.Close()
  16. data := FansReq{}
  17. data.SiteId = site_id
  18. data.Dbname = dbname
  19. data.UserId = user_id
  20. data.BusinessId = business_id
  21. data_json, err := json.Marshal(data)
  22. if err != nil {
  23. return err
  24. }
  25. SetReqData(data)
  26. res := &Response{}
  27. err = conn.Fans(req, res)
  28. if err != nil {
  29. return err
  30. }
  31. _, err = GetResData(res)
  32. return err
  33. }