fix: お知らせの未読通知が消えない不具合を修正
This commit is contained in:
parent
f85b80f376
commit
9fb3966b53
|
@ -51,7 +51,6 @@ export class AnnouncementService {
|
||||||
'read."announcementId" = announcement.id AND read."userId" = :userId',
|
'read."announcementId" = announcement.id AND read."userId" = :userId',
|
||||||
{ userId: user.id },
|
{ userId: user.id },
|
||||||
);
|
);
|
||||||
q.andWhere('read.id IS NULL');
|
|
||||||
|
|
||||||
q
|
q
|
||||||
.where('announcement.isActive = true')
|
.where('announcement.isActive = true')
|
||||||
|
@ -62,7 +61,8 @@ export class AnnouncementService {
|
||||||
.andWhere(new Brackets(qb => {
|
.andWhere(new Brackets(qb => {
|
||||||
qb.orWhere('announcement.forExistingUsers = false');
|
qb.orWhere('announcement.forExistingUsers = false');
|
||||||
qb.orWhere('announcement.id > :userId', { userId: user.id });
|
qb.orWhere('announcement.id > :userId', { userId: user.id });
|
||||||
}));
|
}))
|
||||||
|
.andWhere('read.id IS NULL');
|
||||||
|
|
||||||
q.orderBy({
|
q.orderBy({
|
||||||
'announcement."displayOrder"': 'DESC',
|
'announcement."displayOrder"': 'DESC',
|
||||||
|
|
Loading…
Reference in a new issue