This commit is contained in:
@@ -53,7 +53,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
VerifyExp = u => u.IsDeleted == addOrEditExploreRecommend.IsDeleted && u.ExploreType == addOrEditExploreRecommend.ExploreType,
|
||||
|
||||
VerifyMsg = "当前浏览器启用版本只允许有一个",
|
||||
// "当前类型浏览器启用版本只允许有一个"
|
||||
VerifyMsg = _localizer["ExploreRecommend_OnlyOneTypePerType"] ,
|
||||
|
||||
IsVerify = addOrEditExploreRecommend.IsDeleted == false
|
||||
};
|
||||
@@ -68,7 +69,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpDelete("{exploreRecommendId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteExploreRecommend(Guid exploreRecommendId)
|
||||
{
|
||||
var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true);
|
||||
var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true,true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
@@ -80,8 +81,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
var result = await _exploreRecommendRepository.Where(t => t.IsDeleted == false).ProjectTo<ExploreRecommendView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
if (result .Count==0)
|
||||
{
|
||||
throw new QueryBusinessObjectNotExistException("系统浏览器版本推荐未维护,请联系维护人员");
|
||||
{ //"系统浏览器版本推荐未维护,请联系维护人员"
|
||||
throw new QueryBusinessObjectNotExistException(_localizer["ExploreRecommend_NoExporeRecord"]);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -50,21 +50,24 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (!Version.TryParse(addOrEditPublishLog.Version, out version))
|
||||
{
|
||||
return ResponseOutput.NotOk("版本号不符合要求");
|
||||
//"版本号不符合要求"
|
||||
return ResponseOutput.NotOk(_localizer["PublishLog_NotValidVersion"] );
|
||||
}
|
||||
|
||||
var verifyExp1 = new EntityVerifyExp<PublishLog>()
|
||||
{
|
||||
VerifyExp = u => u.Version == addOrEditPublishLog.Version,
|
||||
|
||||
VerifyMsg = "发布编号不能重复"
|
||||
//"发布编号不能重复"
|
||||
VerifyMsg = _localizer["PublishLog_RepeatVersion"]
|
||||
};
|
||||
|
||||
var verifyExp2 = new EntityVerifyExp<PublishLog>()
|
||||
{
|
||||
VerifyExp = u => u.IsCurrentVersion == addOrEditPublishLog.IsCurrentVersion,
|
||||
|
||||
VerifyMsg = "当前发布版本只允许有一个",
|
||||
//"当前发布版本只允许有一个"
|
||||
VerifyMsg = _localizer["PublishLog_OnlyOneCurrentVersion"] ,
|
||||
|
||||
IsVerify=addOrEditPublishLog.IsCurrentVersion==true
|
||||
};
|
||||
@@ -90,8 +93,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
//系统当前版本未标记,请联系维护人员
|
||||
throw new QueryBusinessObjectNotExistException("系统当前版本未标记,请联系维护人员");
|
||||
//"系统当前版本未标记,请联系维护人员"
|
||||
throw new QueryBusinessObjectNotExistException(_localizer["PublishLog_NoCurrentVersion"] );
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user