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 ) {