sunpengfei
2025-08-07 b4943813a032976e0febdd7f22d8bcf084e331c5
FlexJobApi.User.Application/Menus/Commands/SaveMenuCommandHandler.cs
@@ -31,6 +31,7 @@
        public async Task<Guid> Handle(SaveMenuCommand request, CancellationToken cancellationToken)
        {
            return await request.SaveData<Menu, SaveMenuCommand>(
                q => q.Include(it => it.Children),
                it =>
                    it.UserType == request.UserType
                    && it.ClientType == request.ClientType
@@ -39,7 +40,7 @@
                    && it.Id != request.Id,
                (entity) =>
                {
                    entity.Path = DbUtils.GetTreeDataPath<DictionaryData>(request.ParentId, cancellationToken).Result;
                    entity.Path = DbUtils.GetTreeDataPath<Menu>(request.ParentId, cancellationToken).Result;
                    if (request.Id.HasValue)
                    {
                        if (entity.UserType != request.UserType) throw Oops.Oh(EnumErrorCodeType.s410, "用户类型");