From 6264d105abd470caddd7d131349d940c41f2d405 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 4 Jul 2024 17:22:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/DTO/ExploreRecommendViewModel.cs | 4 +++- .../Service/Common/ExploreRecommendService.cs | 4 ++-- IRaCIS.Core.Domain/Common/ExploreRecommend.cs | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/DTO/ExploreRecommendViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/ExploreRecommendViewModel.cs index 382271cf1..c61cb31a8 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/ExploreRecommendViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/ExploreRecommendViewModel.cs @@ -43,7 +43,9 @@ namespace IRaCIS.Core.Application.ViewModel /// ExploreRecommendAddOrEdit 列表查询参数模型 public class ExploreRecommendAddOrEdit { - public Guid Id { get; set; } + public Guid? Id { get; set; } + public string ExploreType { get; set; } + public string Version { get; set; } public string Title { get; set; } diff --git a/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs b/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs index b67c4f25f..17f314441 100644 --- a/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs @@ -51,9 +51,9 @@ namespace IRaCIS.Core.Application.Service { var verifyExp2 = new EntityVerifyExp() { - VerifyExp = u => u.IsDeleted == addOrEditExploreRecommend.IsDeleted, + VerifyExp = u => u.IsDeleted == addOrEditExploreRecommend.IsDeleted && u.ExploreType == addOrEditExploreRecommend.ExploreType, - VerifyMsg = "当前启用版本只允许有一个", + VerifyMsg = "当前浏览器启用版本只允许有一个", IsVerify = addOrEditExploreRecommend.IsDeleted == false }; diff --git a/IRaCIS.Core.Domain/Common/ExploreRecommend.cs b/IRaCIS.Core.Domain/Common/ExploreRecommend.cs index db000e174..b58cd06b5 100644 --- a/IRaCIS.Core.Domain/Common/ExploreRecommend.cs +++ b/IRaCIS.Core.Domain/Common/ExploreRecommend.cs @@ -15,8 +15,10 @@ namespace IRaCIS.Core.Domain.Models [Table("ExploreRecommend")] public class ExploreRecommend : Entity, IAuditUpdate, IAuditAdd,ISoftDelete { - - public string Version { get; set; }=string.Empty; + public string ExploreType { get; set; } = string.Empty; + + + public string Version { get; set; }=string.Empty; public string Title { get; set; } = string.Empty;