From 7425052414f7f2b7e4746f6d43a80d5c751aad3f Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期五, 03 十一月 2023 16:50:47 +0800 Subject: [PATCH] 位置列表添加类型选择 --- controllers/location.go | 2 +- request/location.go | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/controllers/location.go b/controllers/location.go index 2ef2a95..0860808 100644 --- a/controllers/location.go +++ b/controllers/location.go @@ -67,7 +67,7 @@ if params.PageInfo.Check() { search.SetPage(params.Page, params.PageSize) } - list, total, err := search.SetKeyword(params.KeyWord).SetJointName(params.JointName).SetOrder("created_at desc").Find() + list, total, err := search.SetKeyword(params.KeyWord).SetType(params.Type).SetJointName(params.JointName).SetOrder("created_at desc").Find() if err != nil { util.ResponseFormat(c, code.RequestParamError, "鏌ユ壘澶辫触") return diff --git a/request/location.go b/request/location.go index a762856..b12f724 100644 --- a/request/location.go +++ b/request/location.go @@ -9,6 +9,7 @@ type GetLocationList struct { PageInfo + Type int `json:"type"` KeyWord string `json:"keyWord"` JointName string `json:"jointName"` //鎷兼帴鍚嶇О } -- Gitblit v1.8.0