1
0
mirror of https://github.com/chowa/ejyy.git synced 2026-01-21 05:07:48 +08:00

fix notice publish status

This commit is contained in:
xuecong
2022-03-02 10:21:58 +08:00
parent 807807179f
commit de82450f4b
2 changed files with 3 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ const MpHomeMainAction = <Action>{
const notice = await ctx.model
.from('ejyy_notice_to_user')
.where('community_id', community_id)
.andWhere('published', TRUE)
.limit(3)
.offset(0)
.select('id', 'title', 'overview', 'created_at')

View File

@@ -12,6 +12,7 @@
import { Action } from '~/types/action';
import { SUCCESS, QUERY_ILLEFAL } from '~/constant/code';
import { TRUE } from '~/constant/status';
interface RequestParams {
id: number;
@@ -48,6 +49,7 @@ const MpNoticeReadAction = <Action>{
.table('ejyy_notice_to_user')
.leftJoin('ejyy_community_info', 'ejyy_community_info.id', 'ejyy_notice_to_user.community_id')
.andWhere('ejyy_notice_to_user.id', id)
.andWhere('ejyy_notice_to_user.published', TRUE)
.select(
'ejyy_notice_to_user.id',
'ejyy_notice_to_user.title',