123456789101112131415161718192021222324252627282930 |
- package controller
- import (
- "fmt"
- "github.com/gin-gonic/gin"
- "base-gin/service"
- "base-gin/utils/base"
- )
- type Param struct {
- WarehouseCode string `form:"warehouseCode" binding:"required"`
- Type int `form:"type"` // 1盘填1,2盘填2
- }
- func TestGet(c *gin.Context) {
- var input Param
- if err := c.ShouldBind(&input); err != nil {
- base.RenderJsonFail(c, err)
- return
- }
- ret, err := service.TestGet(c)
- if err != nil {
- base.RenderJsonFail(c, err)
- return
- }
- base.RenderJsonSucc(c, gin.H{"detail": ret})
- fmt.Printf("hello test")
- }
|