|
@@ -441,7 +441,7 @@ namespace GxPress.Service.Implement.Middle
|
|
|
if (request.ParentId > 0 && middle != null)
|
|
|
{
|
|
|
//获取父级子集集合
|
|
|
- var ids = await _middleRepository.GetAllMiddleChildrenByParentIdAsync(request.Ids.ToList(),request.Ids.ToList());
|
|
|
+ var ids = await _middleRepository.GetAllMiddleChildrenByParentIdAsync(request.Ids.ToList(), request.Ids.ToList());
|
|
|
//修改
|
|
|
await _middleRepository.UpdateAsync(Q.Set(nameof(Entity.Middle.Middle.ParentId), request.ParentId).Set(nameof(Entity.Middle.Middle.RoleId), middle.RoleId).WhereIn(nameof(Entity.Middle.Middle.Id), request.Ids));
|
|
|
//修改共享
|
|
@@ -481,7 +481,7 @@ namespace GxPress.Service.Implement.Middle
|
|
|
await _middleRepository.UpdateAsync(Q.Set(nameof(Entity.Middle.Middle.ParentId), request.ParentId).WhereIn(nameof(Entity.Middle.Middle.Id), request.Ids));
|
|
|
foreach (var item in request.Ids)
|
|
|
{
|
|
|
- var ids = await _middleRepository.GetAllMiddleChildrenByParentIdAsync(new List<int> { item },new List<int> { });
|
|
|
+ var ids = await _middleRepository.GetAllMiddleChildrenByParentIdAsync(new List<int> { item }, new List<int> { });
|
|
|
await _middleRepository.UpdateAsync(Q.Set(nameof(Entity.Middle.Middle.MiddleSonId), item).WhereIn(nameof(Entity.Middle.Middle.Id), ids));
|
|
|
}
|
|
|
}
|
|
@@ -779,6 +779,17 @@ namespace GxPress.Service.Implement.Middle
|
|
|
// result.MiddleId = middle == null ? 0 : middle.Id;
|
|
|
var recordFolder = await recordFolderRepository.GetAsync(folderType, userId);
|
|
|
var result = new MiddleDefaultResult();
|
|
|
+ //获取笔记默认
|
|
|
+ if (recordFolder.Id == 0 && folderType == 21)
|
|
|
+ {
|
|
|
+ var middle = await _middleRepository.GetMiddleAsync(Q.Where(nameof(Entity.Middle.Middle.FolderType), AllTypeConst.Note.GetHashCode()).Where(nameof(Entity.Middle.Middle.AttributeValue), 2).Where(nameof(Entity.Middle.Middle.IsSystemDefault), true).Where(nameof(Entity.Middle.Middle.UserId), userId));
|
|
|
+ result.IsDefault = middle != null ? middle.IsSystemDefault : false;
|
|
|
+ result.FolderName = middle != null ? middle.FolderName : "";
|
|
|
+ result.FolderType = middle != null ? middle.FolderType : 0;
|
|
|
+ result.MiddleId = middle == null ? middle.Id : 0;
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ result = new MiddleDefaultResult();
|
|
|
result.IsDefault = recordFolder != null;
|
|
|
result.FolderName = recordFolder == null ? "" : recordFolder.FolderName;
|
|
|
result.FolderType = recordFolder == null ? 0 : recordFolder.FolderType;
|