main.go 797 B

1234567891011121314151617181920212223242526272829
  1. package handler
  2. import (
  3. "bet24.com/log"
  4. "bet24.com/servers/micros/slotsservice/handler/slotpanda"
  5. )
  6. // 获取slot配置,包括Slots,WinShapres,Wins,BetLevels
  7. func GetSlotConfig(slotGame string, userId int) string {
  8. log.Debug("GetSlotConfig %s,%d", slotGame, userId)
  9. switch slotGame {
  10. case slotpanda.GAME_NAME:
  11. return slotpanda.GetSlotConfig(userId)
  12. default:
  13. log.Release("GetSlotConfig %s not exist", slotGame)
  14. }
  15. return ""
  16. }
  17. // 下注并返回结果
  18. func Spin(slotGame string, userId int, amount int, isChip bool, extra string) (success bool, spinAmount int, resultData string) {
  19. switch slotGame {
  20. case slotpanda.GAME_NAME:
  21. return slotpanda.Spin(userId, amount, isChip, extra)
  22. default:
  23. log.Release("Spin %s not exist", slotGame)
  24. }
  25. return false, 0, "invalid game"
  26. }