From e8c14697dad3f5137a97009ada133143220a02fa Mon Sep 17 00:00:00 2001 From: Ky_Gyt <1971574843@qq.com> Date: Thu, 8 Jul 2021 17:13:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=86=E7=A0=81=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/account/setting/satety/password.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web-react/src/pages/system/account/setting/satety/password.jsx b/web-react/src/pages/system/account/setting/satety/password.jsx index b37eb86..8393f03 100644 --- a/web-react/src/pages/system/account/setting/satety/password.jsx +++ b/web-react/src/pages/system/account/setting/satety/password.jsx @@ -23,13 +23,6 @@ export default class form extends Component { open = () => { this.setState({ visible: true }) - } - - /** - * mount后回调 - */ - componentDidMount() { - this.props.created && this.props.created(this) api.getPwdRule({}).then(({ success, data, message }) => { if (success) { const { pattern, descriptions } = data @@ -43,6 +36,13 @@ export default class form extends Component { }) } + /** + * mount后回调 + */ + componentDidMount() { + this.props.created && this.props.created(this) + } + updatePwd(values) { let { password, newPassword } = values.current.getFieldsValue() password = encryptByRSA(password, RSA_PUBLIC_KEY) From bd09a3f769fb5e256520da7c038d99b8d79e8caf Mon Sep 17 00:00:00 2001 From: Connor <9174814+connorxia618@user.noreply.gitee.com> Date: Thu, 8 Jul 2021 17:33:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?count=20=E9=80=BB=E8=BE=91=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Core/Service/Notice/SysNoticeService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Api/Ewide.Core/Service/Notice/SysNoticeService.cs b/Api/Ewide.Core/Service/Notice/SysNoticeService.cs index b182d18..31af392 100644 --- a/Api/Ewide.Core/Service/Notice/SysNoticeService.cs +++ b/Api/Ewide.Core/Service/Notice/SysNoticeService.cs @@ -254,10 +254,9 @@ WHERE SNU.UserId = @UserId AND SN.Status = @Status"; [HttpGet("/sysNotice/unread")] public async Task GetUnreadCount() { - //删除 或者 草稿都不让显示 - var noticeList = await _sysNoticeRep.Where(u => u.Status != (int)NoticeStatus.DELETED&& u.Status != (int)NoticeStatus.DRAFT).Select(s => s.Id).ToListAsync(); - var noticeUserList = await _sysNoticeUserRep.Where(u => u.UserId == _userManager.UserId && noticeList.Contains(u.NoticeId) && u.ReadStatus == (int)NoticeUserStatus.UNREAD).ToListAsync(); - return noticeUserList.Count(); + //删除 或者 草稿 未发布 都不让显示 + var noticeList = await _sysNoticeRep.Where(u => u.Status == (int)NoticeStatus.PUBLIC).Select(s => s.Id).ToListAsync(); + return await _sysNoticeUserRep.Where(u => u.UserId == _userManager.UserId && noticeList.Contains(u.NoticeId) && u.ReadStatus == (int)NoticeUserStatus.UNREAD).CountAsync(); } ///