fix iot entrance vistor and ower

This commit is contained in:
xuecong 2021-11-18 16:35:43 +08:00
parent 08d20db965
commit fb2b08aed3

View File

@ -104,8 +104,8 @@ async function accessMethod(params: AccessParams, entranceInfo: EjyyIotEntrance,
} }
await model.from('ejyy_iot_entrance_log').insert({ await model.from('ejyy_iot_entrance_log').insert({
wechat_mp_user_id: reuslt.type === VISTOR_ACCESS_QRCODE ? null : reuslt.id, wechat_mp_user_id: reuslt.type === SELF_ACCESS_QRCODE ? reuslt.id : null,
vistor_id: reuslt.type === SELF_ACCESS_QRCODE ? null : reuslt.id, vistor_id: reuslt.type === VISTOR_ACCESS_QRCODE ? reuslt.id : null,
entrance_id: entranceInfo.id, entrance_id: entranceInfo.id,
method, method,
created_at: mom.valueOf() created_at: mom.valueOf()