|
@@ -608,14 +608,24 @@ namespace GxPress.Service.Implement.Note
|
|
|
throw new BusinessException("标题和内容至少一项必填!");
|
|
|
if (!string.IsNullOrWhiteSpace(note.Content))
|
|
|
{
|
|
|
+ entity.TextContent = string.Empty;
|
|
|
var json = JsonConvert.DeserializeObject<List<ContentJsonData>>(note.Content);
|
|
|
foreach (var item in json)
|
|
|
+ {
|
|
|
item.File = StringUtils.RemoveDomain(item.File);
|
|
|
+ if (item.Type == AllTypeConst.Text.GetHashCode())
|
|
|
+ entity.TextContent += item.Text;
|
|
|
+ }
|
|
|
entity.Content = JsonConvert.SerializeObject(json);
|
|
|
- entity.HtmlContent = note.HtmlContent;
|
|
|
+ entity.TextContent = note.TextContent;
|
|
|
+
|
|
|
}
|
|
|
else
|
|
|
- entity.Content = "";
|
|
|
+ {
|
|
|
+ entity.Content = string.Empty;
|
|
|
+ entity.HtmlContent = string.Empty;
|
|
|
+ entity.TextContent = string.Empty;
|
|
|
+ }
|
|
|
if (note.FolderId > 0)
|
|
|
{
|
|
|
entity.FolderId = note.FolderId;
|
|
@@ -824,8 +834,9 @@ namespace GxPress.Service.Implement.Note
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(item.TextContent))
|
|
|
await _noteRepository.UpdateAsync(item);
|
|
|
- else{
|
|
|
- item.TextContent="[]";
|
|
|
+ else
|
|
|
+ {
|
|
|
+ item.TextContent = "[]";
|
|
|
await _noteRepository.UpdateAsync(item);
|
|
|
}
|
|
|
}
|