$user_id]; return (new static())->where($where)->with(['idCardFrontPhoto','idCardBackPhoto','licensePhoto','settlementIdCardFrontPhoto','settlementIdCardBackPhoto','bankCardPhoto','storeFrontPhoto','storeCashPhoto','storeEnvPhoto',])->find(); } public static function authStatus($user_id) { $detail = self::detail($user_id); return !empty($detail) ? $detail['auth_status'] : '-1'; } /** * 创建记录 */ public function add($data,$app_id) { $order_no = $this->orderNo(); $data["merchant_order_sn"] = $order_no; $this->startTrans(); try { $this->save($data); //如果是付呗接口,配置参数 by yj $app = FbPay::getFbPayApp($app_id, 'wx'); $FbPay = new FbPay($app); $account_id = $FbPay->subaccount($data); if(empty($account_id)){ $this->error = '实名认证失败'; return false; } $update_data = [ 'account_id' => $account_id, ]; $this->save($update_data); $this->commit(); } catch (\Exception $e) { $this->rollback(); throw new BaseException(['msg' => $e->getMessage()]); } return $order_no; } /** * 修改记录 */ public function edit($data) { $data['update_time'] = time(); return $this->save($data); } }