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:
@@ -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')
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user