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 +}