This commit is contained in:
2025-10-24 13:34:03 +08:00
parent a2ef7bc093
commit 0068e1053c

View File

@@ -51,7 +51,11 @@ func (l *AdminGetAgentListLogic) AdminGetAgentList(req *types.AdminGetAgentListR
for _, c := range closures { for _, c := range closures {
ids = append(ids, c.DescendantId) ids = append(ids, c.DescendantId)
} }
builder = builder.Where("id IN (?)", ids) interfaceIds := make([]interface{}, len(ids))
for i, id := range ids {
interfaceIds[i] = id
}
builder = builder.Where("id IN (?)", interfaceIds...)
} }
agents, total, err := l.svcCtx.AgentModel.FindPageListByPageWithTotal(l.ctx, builder, req.Page, req.PageSize, "id DESC") agents, total, err := l.svcCtx.AgentModel.FindPageListByPageWithTotal(l.ctx, builder, req.Page, req.PageSize, "id DESC")