发布数据列表查询接口增加按类型查询
This commit is contained in:
parent
a7ea286638
commit
b3f37f1686
|
@ -16,6 +16,7 @@ type PublishedGiListReqDto struct {
|
||||||
Name string `json:"name" form:"name"`
|
Name string `json:"name" form:"name"`
|
||||||
|
|
||||||
Time dto.JsonTime `json:"time" form:"time" time_format:"2006-01-02 15:04:05"`
|
Time dto.JsonTime `json:"time" form:"time" time_format:"2006-01-02 15:04:05"`
|
||||||
|
Type int32 `json:"type" form:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublishReqDto struct {
|
type PublishReqDto struct {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b6bdcc8748cbc6f347839d7ee8f8df9f50f52edd
|
Subproject commit f9d845a0cf0bb6375eaa93c2011b46b63c5a0e9f
|
|
@ -33,6 +33,9 @@ func ListQueryPublishedGi(req *publishedGi.PublishedGiListReqDto) []*publishedGi
|
||||||
if req.Name != "" {
|
if req.Name != "" {
|
||||||
where = where.Where(dbquery.PublishedGi.Name.Like(fmt.Sprintf("%%%s%%", 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()
|
find, err := where.Debug().Find()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||||
|
|
Loading…
Reference in New Issue