1234567891011121314151617181920212223242526272829303132 |
- package service
- import (
- "github.com/gin-gonic/gin"
- models "base-gin/model"
- )
- type resTest struct {
- WarehouseCode string `form:"warehouseCode"`
- BoxCode string `form:"boxCode"`
- StartID string `form:"startID"`
- PageSize int `form:"pageSize"`
- IsCurrent int `form:"isCurrent"`
- }
- func TestGet(c *gin.Context) (res *resTest, err error) {
- res = &resTest{
- WarehouseCode: "11",
- BoxCode: "box01",
- StartID: "start111",
- PageSize: 50,
- IsCurrent: 1,
- }
- return res, nil
- }
- func GetConfig(c *gin.Context, key string) (res string, err error) {
- res, err = models.GetConfigValue(c, key)
- if err != nil {
- return "", err
- }
- return res, nil
- }
|