From 69025cb6e7ea7e38cbd3424ce058971c3648d11d Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Tue, 8 Oct 2024 14:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=BE=E7=A4=BA=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/LocalStore.php | 12 ++++++++++++ app/api/logic/LocalStoreLogic.php | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/app/api/controller/LocalStore.php b/app/api/controller/LocalStore.php index 55165c25..9a774aaa 100755 --- a/app/api/controller/LocalStore.php +++ b/app/api/controller/LocalStore.php @@ -395,6 +395,18 @@ class LocalStore extends Api return JsonServer::error('未找到该用户'); } + // 绑定用户列表 + public function bindList() + { + try { + $post = $this->request->post(); + LocalStoreLogic::bindList($post); + return JsonServer::success('添加成功'); + } catch (\Exception $e) { + return JsonServer::error($e->getMessage()); + } + } + // 绑定用户 public function bindUser() { diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index 7e674439..5afd89f4 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -9,6 +9,7 @@ use app\common\model\localstore\LocalStoreBind; use app\common\model\LocalStoreOrder; use app\common\model\LocalStorePostStation; use app\common\model\user\User; +use think\db\Where; use think\facade\Db; use think\facade\Config; @@ -493,6 +494,15 @@ class LocalStoreLogic extends Logic return false; } + public static function bindList($post) + { + $user = LocalStoreBind::where([ + 'lstore_id' => $post['lstore_id'], + 'is_unbind' => 0, + ])->group('bind_user_id')->select(); + dump($user);die; + } + public static function bindUser($post) { if ($post['user']['id'] <=0 ) {