signin.pb.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package proto
  2. import (
  3. "bet24.com/log"
  4. "bet24.com/servers/micros/common"
  5. "context"
  6. )
  7. func CheckUserSignTip(userId int) bool {
  8. xclient := getClient()
  9. args := &Request{
  10. UserId: userId,
  11. }
  12. reply := &Response{}
  13. err := xclient.Call(context.Background(), "CheckUserSignTip", args, reply)
  14. if err != nil {
  15. common.GetClientPool().RemoveClient(ServiceName)
  16. log.Debug("activityservice.CheckUserSignTip failed to call: %v", err)
  17. return false
  18. }
  19. return reply.Success
  20. }
  21. func GetUserSigninInfo(userId int) string {
  22. xclient := getClient()
  23. args := &Request{
  24. UserId: userId,
  25. }
  26. reply := &Response{}
  27. err := xclient.Call(context.Background(), "GetUserSigninInfo", args, reply)
  28. if err != nil {
  29. common.GetClientPool().RemoveClient(ServiceName)
  30. log.Debug("activityservice.GetUserSigninInfo failed to call: %v", err)
  31. return ""
  32. }
  33. return reply.Data
  34. }
  35. func DoUserSignin(userId int) string {
  36. xclient := getClient()
  37. args := &Request{
  38. UserId: userId,
  39. }
  40. reply := &Response{}
  41. err := xclient.Call(context.Background(), "DoUserSignin", args, reply)
  42. if err != nil {
  43. common.GetClientPool().RemoveClient(ServiceName)
  44. log.Debug("activityservice.DoUserSignin failed to call: %v", err)
  45. return ""
  46. }
  47. return reply.Data
  48. }