diff --git a/src/dao/agent_dao.go b/src/dao/agent_dao.go index 885b41b..be9cfa9 100644 --- a/src/dao/agent_dao.go +++ b/src/dao/agent_dao.go @@ -16,7 +16,7 @@ type AgentDao interface { FindAgentRolePermissionGroup(id int) (list []*AgentWithRolePermissionGroup, total int64, err error) GetSuperAdmin(agentId int) (list *model.Agent) GetSuperAgentByUsername(username string) (agent *model.Agent, err error) - FindSuperAdminByAgebtId(agentId string, page, limit int) (list []model.Agent, total int64, err error) + FindSuperAdminByAgentId(agentId string, page, limit int) (list []model.Agent, total int64, err error) FindAllSuperAdmin() (list *[]model.Agent) } diff --git a/src/implement/agent_implement.go b/src/implement/agent_implement.go index 283866f..0e5aa9e 100644 --- a/src/implement/agent_implement.go +++ b/src/implement/agent_implement.go @@ -119,7 +119,7 @@ func (a AgentDb) GetSuperAgentByUsername(username string) (agent *model.Agent, e } return agent, nil } -func (a AgentDb) FindSuperAdminByAgebtId(agentId string, page, limit int) (list []model.Agent, total int64, err error) { +func (a AgentDb) FindSuperAdminByAgentId(agentId string, page, limit int) (list []model.Agent, total int64, err error) { sess := a.Db.Where("is_super_administrator=1").Desc("id").Limit(limit, (page-1)*limit) if agentId != "" { sess.In("agent_id", strings.Split(agentId, ","))