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