|
@@ -515,10 +515,10 @@ namespace Hotline.Api.Controllers
|
|
{
|
|
{
|
|
return new List<KeyValuePair<int, string>>
|
|
return new List<KeyValuePair<int, string>>
|
|
{
|
|
{
|
|
- new KeyValuePair<int, string>(1, "已上架"),
|
|
|
|
- new KeyValuePair<int, string>(2, "已下架"),
|
|
|
|
- new KeyValuePair<int, string>(3, "审核中"),
|
|
|
|
- new KeyValuePair<int, string>(4, "审核不通过")
|
|
|
|
|
|
+ new KeyValuePair<int, string>(3, "已上架"),
|
|
|
|
+ new KeyValuePair<int, string>(4, "已下架"),
|
|
|
|
+ new KeyValuePair<int, string>(1, "审核中"),
|
|
|
|
+ new KeyValuePair<int, string>(5, "审核不通过")
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1342,10 +1342,10 @@ namespace Hotline.Api.Controllers
|
|
if (await _knowledgeCollectGroupRepository
|
|
if (await _knowledgeCollectGroupRepository
|
|
.Queryable()
|
|
.Queryable()
|
|
.Where(m => m.Name == dto.Name && m.CreatorId == _sessionContext.UserId)
|
|
.Where(m => m.Name == dto.Name && m.CreatorId == _sessionContext.UserId)
|
|
- .AnyAsync() == true) throw new UserFriendlyException("分组名重复, 请重新输入!");
|
|
|
|
|
|
+ .AnyAsync() == true) throw UserFriendlyException.SameMessage("分组名重复, 请重新输入!");
|
|
|
|
|
|
var key = await _knowledgeCollectGroupRepository.AddAsync(entity);
|
|
var key = await _knowledgeCollectGroupRepository.AddAsync(entity);
|
|
- if (key.IsNullOrEmpty()) throw new UserFriendlyException("添加失败, 请重试");
|
|
|
|
|
|
+ if (key.IsNullOrEmpty()) throw UserFriendlyException.SameMessage("添加失败, 请重试");
|
|
var outDto = dto.Adapt<KnowledgeCollectGroupOutDto>();
|
|
var outDto = dto.Adapt<KnowledgeCollectGroupOutDto>();
|
|
outDto.Id = key;
|
|
outDto.Id = key;
|
|
return outDto;
|
|
return outDto;
|