修复分页参数引擎
All checks were successful
Deploy on Tag / build-and-deploy (push) Successful in 26s

This commit is contained in:
wzj 2024-11-13 16:35:29 +08:00
parent 6acc371b4e
commit 31878a4e77

View File

@ -97,13 +97,14 @@ func (c *ItemController) GetTypes() mvc.Result {
// @Accept json
// @Produce json
// @Param keyword query string true "搜索关键字"
// @Param pagingParam query validate.PagingParam true "分页信息"
// @Success 200 {object} []model.ItemModel "{["id":1],["id":2]}"
// @Failure 400 {object} map[string]interface{} "{"msg": "错误信息","code":0}"
// @Router /api/item/search [get]
func (c *ItemController) Search() mvc.Result {
keyword := c.Ctx.URLParam("keyword")
pagineParam := new(validate.PagingParam)
e := validate.ReadQuery(c.Ctx, pagineParam)
pagingParam := new(validate.PagingParam)
e := validate.ReadQuery(c.Ctx, pagingParam)
if e.Error() {
return e.Response()
}