demo.go 869 Bytes
package controllers

import (
	"apigame/models"
	"apigame/service/code-msg"
	"apigame/util/util-lx/lxalilog"
	"fmt"
)

// DemoController 绑定控制器
type DemoController struct {
	BaseController
}

// Demo demo
func (c *DemoController) Demo() {
	req := new(models.ReqDemo)
	if !c.GetPostData(req) {
		return
	}
	rsp := models.RspDemo{}

	fmt.Println("DemoController.demo")

	lxalilog.Errors("DemoController.demo")

	//{
	//	gameId := "10149"
	//	{
	//		conf := new(confdemo.DemoConfig)
	//		has := confbase.LoadData[*confdemo.DemoConfig, confdemo.DemoConfigRaw](gameId, 1, conf)
	//		fmt.Println(has)
	//		fmt.Println(conf)
	//
	//		confbase.SaveCache(gameId, conf)
	//	}
	//	{
	//		conf := &confdemo.DemoConfig{Id: 1}
	//		has := confbase.LoadCache(gameId, conf)
	//		fmt.Println(has)
	//		fmt.Println(conf)
	//	}
	//}

	c.RetRspCodeData(code_msg.RECODE_OK, rsp)
}