diff --git a/services/admin/internal/logic/authorityeditlogic.go b/services/admin/internal/logic/authorityeditlogic.go index bcd693c..5af6297 100644 --- a/services/admin/internal/logic/authorityeditlogic.go +++ b/services/admin/internal/logic/authorityeditlogic.go @@ -165,7 +165,7 @@ func (l *AuthorityEditLogic) getData(adminInfo utils.UserInfo, in *admin.Authori return edit, utils.SetError(utils.ErrorMissingParams, "权限名称已存在") } - check = l.check(edit.Id, map[string]string{ + check = l.check(in.Id, map[string]string{ "service_id": strconv.FormatInt(edit.ServiceId, utils.NumberTen), "identification": edit.Identification, }) @@ -261,7 +261,7 @@ func (l *AuthorityEditLogic) getSort(pid, serviceId int64) uint8 { w := modelbase.Params{ Eq: map[string]string{ "parent_id": strconv.FormatInt(pid, utils.NumberTen), - "project_id": strconv.FormatInt(serviceId, utils.NumberTen)}, + "service_id": strconv.FormatInt(serviceId, utils.NumberTen)}, Order: "sort DESC", } info := dao.Authority{}