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()})