From 34155f5d84c980c8f7a8a6f7bae16feeccaca7f9 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 4 Nov 2024 13:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/implement/medium_implement.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/implement/medium_implement.go b/src/implement/medium_implement.go index d5629ac..ea584be 100644 --- a/src/implement/medium_implement.go +++ b/src/implement/medium_implement.go @@ -133,3 +133,12 @@ func (m MediumDb) GetSuperAdmin(mediumId int) (list *model.Medium) { } return list } +func (m MediumDb) FindAllSuperAdmin() (list *[]model.Medium) { + list = &[]model.Medium{} + sess := m.Db.Where("is_super_administrator=1") + err := sess.Find(list) + if err != nil { + return nil + } + return list +}