Closed VioletCoding closed 1 year ago
Enviornment (please complete the following information):
Describe the bug A clear and concise description of what the bug is.
func page(c *gin.Context) { query := &QueryPage{} _ = c.ShouldBindQuery(query) page := gplus.NewPage[User](query.Current, query.PageSize) page, _ = gplus.SelectPage(page, gplus.BuildQuery[User](c.Request.URL.Query())) c.JSON(200, gin.H{ "code": 0, "data": page, }) } user.GET("/page", page)
返回
{ "code": 0, "data": { "Current": 0, "Size": 0, "Total": 5, "Records": [ { "id": 407, "username": "张三", "password": "password1", "address": "地址1", "age": 25, "phone": "12345678901", "score": 80, "dept": "部门1", "createdAt": "2023-08-12T07:03:05+08:00", "updatedAt": "2023-08-12T07:03:05+08:00" } ], "RecordsMap": null } }
page的默认字段怎么改成小驼峰?
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
你感兴趣的话,可以提交代码,修改这个结构体就可以了
Enviornment (please complete the following information):
Describe the bug A clear and concise description of what the bug is.
返回
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.