添加显示绑定用户列表功能

This commit is contained in:
wangxiaowei 2024-10-08 14:40:18 +08:00
parent 076a7c8dd3
commit 69025cb6e7
2 changed files with 22 additions and 0 deletions

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

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