realname.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package gorpc
  2. import (
  3. "context"
  4. "go-common/app/service/main/member/model"
  5. )
  6. const (
  7. _RealnameStatus = "RPC.RealnameStatus"
  8. _RealnameApplyStatus = "RPC.RealnameApplyStatus"
  9. _RealnameTelCapture = "RPC.RealnameTelCapture"
  10. _RealnameApply = "RPC.RealnameApply"
  11. _RealnameDetail = "RPC.RealnameDetail"
  12. _RealnameAlipayApply = "RPC.RealnameAlipayApply"
  13. _RealnameAlipayConfirm = "RPC.RealnameAlipayConfirm"
  14. _RealnameAlipayBizno = "RPC.RealnameAlipayBizno"
  15. )
  16. // RealnameStatus get realname current status by mid
  17. func (s *Service) RealnameStatus(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameStatus, err error) {
  18. err = s.client.Call(c, _RealnameStatus, arg, &res)
  19. return
  20. }
  21. // RealnameApplyStatus get user realname apply status
  22. func (s *Service) RealnameApplyStatus(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameApplyStatusInfo, err error) {
  23. err = s.client.Call(c, _RealnameApplyStatus, arg, &res)
  24. return
  25. }
  26. // RealnameTelCapture get user telphone capture
  27. func (s *Service) RealnameTelCapture(c context.Context, arg *model.ArgMemberMid) (err error) {
  28. err = s.client.Call(c, _RealnameTelCapture, arg, &_noRes)
  29. return
  30. }
  31. // RealnameApply put a realname apply
  32. func (s *Service) RealnameApply(c context.Context, arg *model.ArgRealnameApply) (err error) {
  33. err = s.client.Call(c, _RealnameApply, arg, &_noRes)
  34. return
  35. }
  36. // RealnameAlipayApply put a alipay realname apply
  37. func (s *Service) RealnameAlipayApply(c context.Context, arg *model.ArgRealnameAlipayApply) (err error) {
  38. err = s.client.Call(c, _RealnameAlipayApply, arg, &_noRes)
  39. return
  40. }
  41. // RealnameAlipayConfirm confirm a alipay realname apply positivly
  42. func (s *Service) RealnameAlipayConfirm(c context.Context, arg *model.ArgRealnameAlipayConfirm) (err error) {
  43. err = s.client.Call(c, _RealnameAlipayConfirm, arg, &_noRes)
  44. return
  45. }
  46. // RealnameAlipayBizno get alipay realname certify bizno by mid
  47. func (s *Service) RealnameAlipayBizno(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameAlipayInfo, err error) {
  48. err = s.client.Call(c, _RealnameAlipayBizno, arg, &res)
  49. return
  50. }
  51. // RealnameDetail is
  52. func (s *Service) RealnameDetail(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameDetail, err error) {
  53. res = new(model.RealnameDetail)
  54. err = s.client.Call(c, _RealnameDetail, arg, res)
  55. return
  56. }