Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
17f3328381
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/dao/agent_dao.go
  2. +1
    -1
      src/implement/agent_implement.go

+ 1
- 1
src/dao/agent_dao.go View File

@@ -16,7 +16,7 @@ type AgentDao interface {
FindAgentRolePermissionGroup(id int) (list []*AgentWithRolePermissionGroup, total int64, err error) FindAgentRolePermissionGroup(id int) (list []*AgentWithRolePermissionGroup, total int64, err error)
GetSuperAdmin(agentId int) (list *model.Agent) GetSuperAdmin(agentId int) (list *model.Agent)
GetSuperAgentByUsername(username string) (agent *model.Agent, err error) 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) FindAllSuperAdmin() (list *[]model.Agent)
} }




+ 1
- 1
src/implement/agent_implement.go View File

@@ -119,7 +119,7 @@ func (a AgentDb) GetSuperAgentByUsername(username string) (agent *model.Agent, e
} }
return agent, nil 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) sess := a.Db.Where("is_super_administrator=1").Desc("id").Limit(limit, (page-1)*limit)
if agentId != "" { if agentId != "" {
sess.In("agent_id", strings.Split(agentId, ",")) sess.In("agent_id", strings.Split(agentId, ","))


Loading…
Cancel
Save