where('ticket', $ticket)->find(); } /** * @param $type * @param $id * @return array|Model|null * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * @author zfy * @day 2020-04-28 */ public function getForeverQrcode($type, $id) { return WechatQrcode::getDB()->where('third_id', $id)->where('third_type', $type)->where('expire_seconds', 0)->find(); } /** * @param $type * @param $id * @return array|Model|null * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * @author zfy * @day 2020-04-28 */ public function getTemporaryQrcode($type, $id) { return WechatQrcode::getDB()->where('third_id', $id)->where('third_type', $type)->where('expire_seconds', '>', 0)->find(); } }