update 公告内容截取
This commit is contained in:
@@ -5512,11 +5512,6 @@
|
||||
通知公告接收参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.NoticeReceiveOutput.Id">
|
||||
<summary>
|
||||
Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.NoticeReceiveOutput.ReadStatus">
|
||||
<summary>
|
||||
阅读状态(字典 0未读 1已读)
|
||||
|
||||
@@ -7,11 +7,6 @@ namespace Ewide.Core.Service
|
||||
/// </summary>
|
||||
public class NoticeReceiveOutput : NoticeBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅读状态(字典 0未读 1已读)
|
||||
/// </summary>
|
||||
@@ -21,5 +16,7 @@ namespace Ewide.Core.Service
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
public DateTime ReadTime { get; set; }
|
||||
|
||||
public string Avatar { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,9 @@ namespace Ewide.Core.Service.Notice
|
||||
{
|
||||
var sql = @"SELECT
|
||||
SN.*,
|
||||
SU.Avatar,SNU.ReadStatus
|
||||
SU.Avatar,
|
||||
SNU.ReadStatus,
|
||||
SNU.ReadTime
|
||||
FROM sys_notice SN
|
||||
LEFT JOIN sys_notice_user SNU ON SN.Id = SNU.NoticeId
|
||||
LEFT JOIN sys_user SU ON SN.PublicUserId = SU.Id
|
||||
@@ -231,16 +233,14 @@ WHERE SNU.UserId = @UserId AND SN.Status = @Status";
|
||||
_userManager.UserId,
|
||||
Status = (int)NoticeStatus.PUBLIC
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"Type","Title","ReadStatus"
|
||||
}
|
||||
new[] { "Type", "Title", "ReadStatus" }
|
||||
);
|
||||
|
||||
data.Items = data.Items.Select(p =>
|
||||
{
|
||||
var r = p.Adapt<dynamic>();
|
||||
r.Content = Regex.Replace(r.Content, @"<\/?.+?\/?>", "").Replace("\r\n", "");
|
||||
var r = p.Adapt<NoticeReceiveOutput>();
|
||||
var content = Regex.Replace(r.Content, @"<\/?.+?\/?>|[\r\n]", "");
|
||||
r.Content = content.Substring(0, content.Length > 50 ? 50 : content.Length);
|
||||
return r;
|
||||
});
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class notice extends Component {
|
||||
} = await api.sysNoticeReceived({
|
||||
pageIndex,
|
||||
pageSize: 5,
|
||||
sortField: 'createdTime',
|
||||
sortField: 'publicTime',
|
||||
sortOrder: 'descend',
|
||||
})
|
||||
if (!items.length) {
|
||||
@@ -109,7 +109,7 @@ export default class notice extends Component {
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
<div className="ellipsis-3 text-gray">{item.content}</div>
|
||||
<div className="ellipsis-2 text-gray">{item.content}</div>
|
||||
</List.Item>
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user