diff --git a/.idea/.gitignore b/.idea/.gitignore index 35410ca..87a58f6 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -6,3 +6,5 @@ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml + +/conf diff --git a/cmd/controller/art_show.go b/cmd/controller/art_show.go index 71c2ad9..fa9d92c 100644 --- a/cmd/controller/art_show.go +++ b/cmd/controller/art_show.go @@ -85,9 +85,6 @@ func (p *ArtShowProvider) ShowList(ctx context.Context, req *artShow.ShowListReq if req.PageSize == 0 { req.Page = 10 } - if req.IsShow == 0 { - req.IsShow = m.ARTSHOW_INSIDE - } res = new(artShow.ShowListRes) err, res = service.ArtShowList(req) if err != nil { diff --git a/cmd/dao/art_show.go b/cmd/dao/art_show.go index a9354b2..a9c7cfd 100644 --- a/cmd/dao/art_show.go +++ b/cmd/dao/art_show.go @@ -32,7 +32,9 @@ func ArtShowList(in *artShow.ShowListReq) (err error, total int64, out []*model. if in.StartTime != "" && in.EndTime != "" { queryDB = queryDB.Where("convert(show_time, date) between ? and ?", in.StartTime, in.EndTime) } - queryDB = queryDB.Where("is_show = ?", in.IsShow) + if in.IsShow != 0 { + queryDB = queryDB.Where("is_show = ?", in.IsShow) + } err = queryDB.Count(&total).Error if err != nil {