From 0d5405d21ae09feee50b941a851ca63d1df70536 Mon Sep 17 00:00:00 2001 From: hgc Date: Mon, 23 Dec 2024 16:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/OAuthController.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/app/controller/OAuthController.php b/app/controller/OAuthController.php index c8aec23..5217978 100644 --- a/app/controller/OAuthController.php +++ b/app/controller/OAuthController.php @@ -7,7 +7,8 @@ use support\Request; use support\Response; use DI\Annotation\Inject; use app\model\ThirdUserAdvertiser; -use app\model\ThirdUser; +use app\model\ThirdUser as ThirdUserModel; +use think\facade\Db as ThinkDb; class OAuthController { @@ -87,6 +88,26 @@ class OAuthController public function testRefreshToken(Request $request) { +// $list = ThinkDb::table('bps.bps_third_user')->where('third_type', 'google')->select(); +// return $this->successResponse($list); + +// $user = new ThirdUserModel; +// $data = [ +// ['access_token' => 'bar', 'third_type' => 'google'], +// ['access_token' => 'bar1', 'third_type' => 'google'], +// ['access_token' => 'bar2', 'third_type' => 'google'] +// ]; +// $user->saveAll($data); + +// +// +// ThinkDb::table('bps.bps_third_user')->insertAll($data); + +// ThinkDb::name('bps_third_user') +// ->update(['id' => 10, 'user_id' => 'bbb']); +// +// return $this->successResponse(['added' =>'success']); + // 使用 ThinkDb 进行联表查询 // $advertiserId = 'your-advertiser-id'; // 假设你已经获得了广告商ID $requestData = $request->all(); // 获取请求数据