user_chipwheel.go 820 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package gatesink
  2. import (
  3. "fmt"
  4. "strconv"
  5. "bet24.com/log"
  6. "bet24.com/servers/coreservice/client"
  7. )
  8. func (this *user) getChipWheelConfig(msg string) {
  9. userId := this.getUserId()
  10. if userId == 0 {
  11. return
  12. }
  13. list := client.GetChipWheelConfig()
  14. this.WriteMsg(msg, list)
  15. }
  16. func (this *user) doChipWheel(msg, data string) {
  17. userId := this.getUserId()
  18. if userId == 0 {
  19. return
  20. }
  21. bet, err := strconv.Atoi(data)
  22. if err != nil {
  23. log.Release("user.doChipWheel invalid argument [%d] %s", userId, data)
  24. return
  25. }
  26. retMsg := fmt.Sprintf("%d", client.ChipWheel(this.getUserId(), bet, this.GetIP()))
  27. this.WriteMsg(msg, retMsg)
  28. }
  29. func (this *user) getChipWheelHistory(msg string) {
  30. userId := this.getUserId()
  31. if userId == 0 {
  32. return
  33. }
  34. list := client.GetChipWheelHistory(userId)
  35. this.WriteMsg(msg, list)
  36. }