|
@@ -416,7 +416,7 @@ namespace GxPress.Service.Implement.Notice
|
|
|
query.ForPage(request.Page, request.PerPage);
|
|
|
query.Select(
|
|
|
"tede_middle.Id", "tede_middle.MiddleId", "tede_middle.IsTop", "tede_middle.AttributeValue", "tede_middle.FolderName", "tede_middle.CreatedDate"
|
|
|
- , "tede_notice.{UserId,UserName,SourceId,Title,Content,TypeValue,IsRecall}"
|
|
|
+ , "tede_notice.{UserId,UserName,SourceId,Title,TypeValue,IsRecall}"
|
|
|
, "tede_user.{AvatarUrl}"
|
|
|
, "tede_addressee.{Id as NoticeAddresseeId, SourceId as NoticeId}");
|
|
|
|
|
@@ -463,7 +463,7 @@ namespace GxPress.Service.Implement.Notice
|
|
|
item.FlowState = FlowState.Checking;
|
|
|
}
|
|
|
}
|
|
|
- item.Title = _contentJsonService.GetTitile(item.Title, item.Content);
|
|
|
+ // item.Title = _contentJsonService.GetTitile(item.Title, item.Content);
|
|
|
if (request.SearchType == 3)
|
|
|
item.NoticeStatus = 0;
|
|
|
else if (request.SearchType == 2)
|
|
@@ -520,5 +520,18 @@ namespace GxPress.Service.Implement.Notice
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ public async Task<bool> UpdateNoticeTitleAsync()
|
|
|
+ {
|
|
|
+ var query = Q.NewQuery();
|
|
|
+ query.Where(n => n.OrWhereNull(nameof(Entity.Notice.Title)).OrWhere(nameof(Entity.Notice.Title), "=", ""));
|
|
|
+ var result = await _noticeRepository.GetAllAsync(query);
|
|
|
+ foreach (var item in result)
|
|
|
+ {
|
|
|
+ item.Title = _contentJsonService.GetTitile(item.Title, item.Content);
|
|
|
+ await _noticeRepository.UpdateAsync(item);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|