|
@@ -620,7 +620,7 @@ namespace GxPress.Service.Implement.Note
|
|
|
FolderId = note.FolderId,
|
|
|
MiddleId = note.Id,
|
|
|
FolderType = note.IsTopic ? AllTypeConst.TopicNote.GetHashCode() : AllTypeConst.Note.GetHashCode(),
|
|
|
- UserId = note.UserId,
|
|
|
+ UserId = entity.UserId,
|
|
|
MiddleSonId = 0,
|
|
|
AttributeValue = 1,
|
|
|
IsAdmin = true
|
|
@@ -650,7 +650,11 @@ namespace GxPress.Service.Implement.Note
|
|
|
note.IsDelete = true;
|
|
|
await _noteRepository.DeleteAsync(id);
|
|
|
//获取middle修改middle
|
|
|
- var middle = await _middleRepository.GetMiddleAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), id).Where(nameof(Entity.Middle.Middle.UserId), userId));
|
|
|
+ var query = Q.NewQuery();
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.MiddleId), id);
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.UserId), userId);
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.FolderType), note.IsTopic ? AllTypeConst.TopicNote.GetHashCode() : AllTypeConst.Note.GetHashCode());
|
|
|
+ var middle = await _middleRepository.GetMiddleAsync(query);
|
|
|
await _middleRepository.DeleteAsync(Q.Where(nameof(Entity.Middle.Middle.Id), middle.Id));
|
|
|
transactionScope.Complete();
|
|
|
}
|