From 46bba01f06301b86a971bd40af9c24378473e2f7 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Tue, 8 Oct 2024 15:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=A3=E9=99=A4=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=94=A8=E6=88=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreLogic.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index ebc31ce1..4e0b09c8 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -557,5 +557,19 @@ class LocalStoreLogic extends Logic public static function unbindUser($post) { + if ($post['id'] <=0 ) { + throw new \Exception('缺少ID'); + } + + $result = LocalStoreBind::where('id', $post['id'])->update([ + 'is_unbind' => 1, + 'unbind_time' => time() + ]); + + if ($result) { + return true; + } + + throw new \Exception('解绑失败'); } } \ No newline at end of file