lihao il y a 4 ans
Parent
commit
0f1eb52f33

+ 12 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -808,6 +808,18 @@ namespace GxPress.Service.Implement.Note
                 }
                 if (item.Data == null || item.Data.Count == 0)
                     item.Data = new List<ContentJsonData>();
+                foreach (var data in item.Data)
+                {
+                    if (data.Type == AllTypeConst.CollectFolder.GetHashCode())
+                    {
+                        var userName = await _userRepository.GetNameAsync(data.SourceUserId);
+                        data.Author = userName;
+                    }
+                    if (string.IsNullOrEmpty(data.Title))
+                        data.Title = string.Empty;
+                    if (string.IsNullOrEmpty(data.FileName))
+                        data.FileName = string.Empty;
+                }
             }
             result.IsDraft = await _noteRepository.IsExistsDraftAsync(request.UserId, false);
             result.DraftId = await _noteRepository.GetNoteIdByDraftAsync(request.UserId, false);