platformInfo.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package controller
  2. import (
  3. "net/http"
  4. "bet24.com/log"
  5. "bet24.com/servers/adminserver/dao"
  6. "github.com/gin-gonic/gin"
  7. )
  8. //平台信息列表
  9. func PlatformInfoList(c *gin.Context) {
  10. obj := dao.NewPlatformInfoList()
  11. if err := c.ShouldBind(&obj.In); err != nil {
  12. log.Debug("%s shouldBind err %v", "platformInfoList", err)
  13. return
  14. }
  15. obj.DoAction(nil)
  16. c.JSON(http.StatusOK, obj.Out)
  17. return
  18. }
  19. //平台信息修改
  20. func PlatformInfoUp(c *gin.Context) {
  21. obj := dao.NewPlatformInfoUp()
  22. if err := c.ShouldBind(&obj.In); err != nil {
  23. log.Debug("%s shouldBind err %v", "platformInfoUp", err)
  24. return
  25. }
  26. obj.DoAction(nil)
  27. c.JSON(http.StatusOK, obj.Out)
  28. return
  29. }
  30. //平台配置信息
  31. func PlatformConfig(c *gin.Context) {
  32. obj := dao.NewPlatformConfig()
  33. obj.DoAction(nil)
  34. c.JSON(http.StatusOK, obj.Out)
  35. return
  36. }
  37. //修改平台配置信息
  38. func PlatformConfigUp(c *gin.Context) {
  39. obj := dao.NewPlatformConfigUp()
  40. if err := c.ShouldBind(&obj.In); err != nil {
  41. log.Debug("%s shouldBind err %v", "platformConfigUp", err)
  42. return
  43. }
  44. obj.DoAction(nil)
  45. c.JSON(http.StatusOK, obj.Out)
  46. return
  47. }