add
This commit is contained in:
29
app/admin/controller/Invite.php
Normal file
29
app/admin/controller/Invite.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\model\UserIntegral;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\library\DatabaseRoute;
|
||||
use think\facade\Db;
|
||||
|
||||
class Invite extends Backend
|
||||
{
|
||||
protected array $noNeedPermission = ['selectInviteByUserIdLists'];
|
||||
|
||||
|
||||
public function selectInviteByUserIdLists()
|
||||
{
|
||||
$get = $this->request->get();
|
||||
if(empty($get['userId'])) {
|
||||
$this->error('userId 不能为空');
|
||||
}
|
||||
$user = DatabaseRoute::getDb('tb_user', $get['userId'])->find();
|
||||
if(empty($user)) {
|
||||
$this->error('用户不存在');
|
||||
}
|
||||
return $this->ApiDataReturn(\app\api\model\Invite::selectInviteByUserIdLists($user, $get, 'admin'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user