From b3f37f168612b7d53c5789b21739e627478ad1c0 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Fri, 13 Oct 2023 09:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=95=B0=E6=8D=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E7=B1=BB=E5=9E=8B=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dto/publishedGi/publishedGi.go | 1 + rtss_simulation | 2 +- service/publishedGi.go | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dto/publishedGi/publishedGi.go b/dto/publishedGi/publishedGi.go index c12fa31..58d1d88 100644 --- a/dto/publishedGi/publishedGi.go +++ b/dto/publishedGi/publishedGi.go @@ -16,6 +16,7 @@ type PublishedGiListReqDto struct { Name string `json:"name" form:"name"` Time dto.JsonTime `json:"time" form:"time" time_format:"2006-01-02 15:04:05"` + Type int32 `json:"type" form:"type"` } type PublishReqDto struct { diff --git a/rtss_simulation b/rtss_simulation index b6bdcc8..f9d845a 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit b6bdcc8748cbc6f347839d7ee8f8df9f50f52edd +Subproject commit f9d845a0cf0bb6375eaa93c2011b46b63c5a0e9f diff --git a/service/publishedGi.go b/service/publishedGi.go index 2bd76ed..3ea8471 100644 --- a/service/publishedGi.go +++ b/service/publishedGi.go @@ -33,6 +33,9 @@ func ListQueryPublishedGi(req *publishedGi.PublishedGiListReqDto) []*publishedGi if req.Name != "" { where = where.Where(dbquery.PublishedGi.Name.Like(fmt.Sprintf("%%%s%%", req.Name))) } + if req.Type != 0 { + where = where.Where(dbquery.PublishedGi.Type.Eq(req.Type)) + } find, err := where.Debug().Find() if err != nil { panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})