Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato24s committed Mar 5, 2024
1 parent 350f5c6 commit 0e19a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/announcement/repository/already_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
func (r *impl) FindAlreadyRead(ctx context.Context, conds announcementport.FindAlreadyReadConds, lock sharedport.Lock) (*announcementdomain.AlreadyRead, error) {
db := r.db.
WithContext(ctx).
Where("user_id = ?", conds.UserID.String()).
Where("read_user = ?", conds.UserID.String()).
Where("information_id = ?", conds.AnnouncementID.String())

if lock != sharedport.LockNone {
Expand All @@ -39,7 +39,7 @@ func (r *impl) ListAlreadyReads(ctx context.Context, conds announcementport.List
db := r.db.WithContext(ctx)

if conds.UserID != nil {
db = db.Where("user_id = ?", conds.UserID.String())
db = db.Where("read_user = ?", conds.UserID.String())
}

if conds.AnnouncementIDs != nil {
Expand Down

0 comments on commit 0e19a97

Please sign in to comment.