| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- package controller
- import (
- "net/http"
- "bet24.com/log"
- "bet24.com/servers/adminserver/dao"
- notification "bet24.com/servers/micros/notification/proto"
- "github.com/gin-gonic/gin"
- )
- // 金币日志
- func GetCashLog(c *gin.Context) {
- obj := dao.NewGetCashLog()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "getCashLog", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 钻石日志
- func GetDiamondLog(c *gin.Context) {
- obj := dao.NewGetDiamondLog()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "getDiamondLog", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 投注日志
- func GetBetLog(c *gin.Context) {
- obj := dao.NewGetBetLog()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "getBetLog", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 投注详情
- func GetBetDetail(c *gin.Context) {
- obj := dao.NewGetBetDetail()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "getBetDetail", err)
- return
- }
- obj.DoAction()
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 加金
- func CashSend(c *gin.Context) {
- obj := dao.NewCashSend()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "cashSend", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 扣金
- func CashDel(c *gin.Context) {
- obj := dao.NewCashDel()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "cashDel", err)
- return
- }
- obj.DoAction(nil)
- // 通知客户端
- go notification.AddNotification(obj.In.UserID, notification.Notification_Gold, "")
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 金币场解锁
- func CashUnlock(c *gin.Context) {
- obj := dao.NewCashUnlock()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "cashUnlock", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 金币锁信息
- func CashLockInfo(c *gin.Context) {
- obj := dao.NewCashLockInfo()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "cashLockInfo", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 货币统计
- func MoneyStat(c *gin.Context) {
- obj := dao.NewMoneyStat()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "moneyStat", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 后台扣减钻石
- func DiamondWebReduce(c *gin.Context) {
- obj := dao.NewDiamondWebReduce()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "diamondWebReduce", err)
- return
- }
- obj.DoAction()
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 后台钻石日志
- func GetDiamondAdminLog(c *gin.Context) {
- obj := dao.NewGetDiamondAdminLog()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "getDiamondAdminLog", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 游戏金币流量统计
- func MoneyFlowStat(c *gin.Context) {
- obj := dao.NewMoneyFlowStat()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "MoneyFlowStat", err)
- return
- }
- obj.DoAction(nil)
- c.JSON(http.StatusOK, obj.Out)
- return
- }
- // 赠送日志
- func CashTransferLog(c *gin.Context) {
- obj := dao.NewTransferLog()
- if err := c.ShouldBind(&obj.In); err != nil {
- log.Debug("%s shouldBind err %v", "ChipTransferLog", err)
- return
- }
- obj.GetCashTransferLog()
- c.JSON(http.StatusOK, obj.Out)
- return
- }
|