user_level.go 559 B

123456789101112131415161718192021222324252627
  1. package gatesink
  2. import (
  3. "bet24.com/log"
  4. userservices "bet24.com/servers/micros/userservices/proto"
  5. "encoding/json"
  6. )
  7. func (this *user) getLevelList(msg, data string) {
  8. resp := userservices.GetLevelList()
  9. this.WriteMsg(msg, resp)
  10. return
  11. }
  12. func (this *user) loginAward(msg, data string) {
  13. var resp struct {
  14. RetCode bool
  15. Amount int
  16. }
  17. resp.RetCode, resp.Amount = userservices.LoginAward(this.getUserId())
  18. if !resp.RetCode {
  19. log.Debug("user.loginAward failed %v", resp)
  20. }
  21. d, _ := json.Marshal(resp)
  22. this.WriteMsg(msg, string(d))
  23. return
  24. }