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