From 0579f4c610e63b64b26653836bd2c81a66070bfe Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 26 Aug 2024 11:29:24 +0800 Subject: [PATCH] update --- app/admin/md/md_enterprise.go | 1 + app/admin/svc/svc_enterprise.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/admin/md/md_enterprise.go b/app/admin/md/md_enterprise.go index 60479f8..63ed222 100644 --- a/app/admin/md/md_enterprise.go +++ b/app/admin/md/md_enterprise.go @@ -50,6 +50,7 @@ type EnterpriseListReq struct { Kind int `json:"kind" label:"种类"` Pvd int `json:"pvd" label:"场景"` Mode int `json:"mode" label:"模式"` + State int32 `json:"state" label:"状态"` } type EnterpriseDetailResp struct { diff --git a/app/admin/svc/svc_enterprise.go b/app/admin/svc/svc_enterprise.go index 44a928e..094cfb5 100644 --- a/app/admin/svc/svc_enterprise.go +++ b/app/admin/svc/svc_enterprise.go @@ -38,6 +38,9 @@ func EnterpriseList(admin model.Admin, req md.EnterpriseListReq) (m []model.Ente if req.Mode != 0 { sess.And("mode = ?", req.Mode) } + if req.State != 0 { + sess.And("state = ?", req.State) + } total, err = sess.FindAndCount(&m) if err != nil { return