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

fix access card list

This commit is contained in:
xuecong
2021-11-21 11:47:29 +08:00
parent 8dc1db8c51
commit a18a658434

View File

@@ -13,6 +13,7 @@
import { Action } from '~/types/action';
import { SUCCESS } from '~/constant/code';
import utils from '~/utils';
import { BINDING_BUILDING } from '~/constant/status';
import { SELF_ACCESS_CODE } from '~/constant/enter_access';
interface RequestBody {
@@ -50,6 +51,8 @@ const MpAccessListAction = <Action>{
.leftJoin('ejyy_building_info', 'ejyy_building_info.id', 'ejyy_user_building.building_id')
.where('ejyy_building_info.community_id', community_id)
.whereIn('ejyy_user_building.building_id', building_ids)
.andWhere('ejyy_user_building.wechat_mp_user_id', ctx.mpUserInfo.id)
.andWhere('ejyy_user_building.status', BINDING_BUILDING)
.select('ejyy_user_building.building_id')
.orderBy('ejyy_user_building.id', 'desc');