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