diff --git a/apps/vue/src/api/platform/user-favorites-menu/index.ts b/apps/vue/src/api/platform/user-favorites-menu/index.ts index 6162bce68..3245e35d4 100644 --- a/apps/vue/src/api/platform/user-favorites-menu/index.ts +++ b/apps/vue/src/api/platform/user-favorites-menu/index.ts @@ -18,9 +18,7 @@ export const create = (userId: string, input: UserFavoriteMenuCreateDto) => { params: { userId: userId, }, - data: { - input: input, - }, + data: input, }); }; @@ -30,9 +28,7 @@ export const createMyFavoriteMenu = (input: UserFavoriteMenuCreateDto) => { service: remoteService.name, controller: remoteService.controller, action: 'CreateMyFavoriteMenuAsync', - data: { - input: input, - }, + data: input, }); }; @@ -45,9 +41,7 @@ export const del = (userId: string, menuId: string) => { userId: userId, }, data: { - input: { - menuId: menuId, - }, + menuId: menuId, }, }); }; @@ -58,9 +52,7 @@ export const delMyFavoriteMenu = (menuId: string) => { controller: remoteService.controller, action: 'DeleteMyFavoriteMenuAsync', data: { - input: { - menuId: menuId, - }, + menuId: menuId, }, }); }; @@ -73,9 +65,7 @@ export const update = (userId: string, input: UserFavoriteMenuUpdateDto) => { params: { userId: userId, }, - data: { - input: input, - }, + data: input, }); }; @@ -84,9 +74,7 @@ export const updateMyFavoriteMenu = (input: UserFavoriteMenuUpdateDto) => { service: remoteService.name, controller: remoteService.controller, action: 'UpdateMyFavoriteMenuAsync', - data: { - input: input, - }, + data: input, }); }; diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/UserFavoriteMenuAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/UserFavoriteMenuAppService.cs index 2aac9e760..19a5961fd 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/UserFavoriteMenuAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/UserFavoriteMenuAppService.cs @@ -57,7 +57,7 @@ public class UserFavoriteMenuAppService : PlatformApplicationServiceBase, IUserF public async virtual Task CreateMyFavoriteMenuAsync(UserFavoriteMenuCreateDto input) { var userId = CurrentUser.GetId(); - if (!await UserFavoriteMenuRepository.CheckExistsAsync(input.Framework, userId, input.MenuId)) + if (await UserFavoriteMenuRepository.CheckExistsAsync(input.Framework, userId, input.MenuId)) { throw new BusinessException(PlatformErrorCodes.UserDuplicateFavoriteMenu); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json b/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json index 7ea5b4e19..949faa44f 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json @@ -7,6 +7,8 @@ "Platform:02003": "The menu level has reached the specified maximum: {Depth}!", "Platform:02101": "The menu metadata is missing the necessary element :{Name}, which is defined in the data dictionary :{DataName}!", "Platform:03001": "The metadata format does not match!", + "Platform:04400": "The user favorites the menu repeatedly!", + "Platform:04404": "User Favorites menu not found!", "UploadFileSizeBeyondLimit": "Upload file size cannot exceed {0} MB!", "NotAllowedFileExtensionName": "Not allowed file extension: {0}!", "DisplayName:VersionFileLimitLength": "File limit size", diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json b/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json index d6e2ad316..4e03b0e83 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json @@ -7,6 +7,8 @@ "Platform:02003": "菜单层级已达到规定最大值: {Depth}!", "Platform:02101": "菜单元数据缺少必要的元素: {Name},此选项在数据字典:{DataName} 中定义!", "Platform:03001": "元数据格式不匹配!", + "Platform:04400": "用户重复收藏菜单!", + "Platform:04404": "用户收藏菜单未找到!", "UploadFileSizeBeyondLimit": "上传文件大小不能超过 {0} MB!", "NotAllowedFileExtensionName": "不被允许的文件扩展名: {0}!", "DisplayName:VersionFileLimitLength": "文件限制大小",