Skip to content

[BUG提交]notice的代码 #218

@gitee1

Description

@gitee1

internal/logic/admin/notice.go的UnreadCount方法
read, err := dao.AdminNoticeRead.Ctx(ctx).As("nr"). LeftJoin("admin_notice n", "nr.notice_id=n.id"). Where("n.type", t). WhereIn("n.id", in.MessageIds). Where("nr.member_id", in.MemberId). Count()
LeftJoin应该使用
LeftJoin(dao.AdminNotice.Table()+" n", "nr.notice_id=n.id").
这种方式吧。上面的方式直接报错,表admin_notice不存在

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions