29 lines
733 B
PHP
29 lines
733 B
PHP
<?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'));
|
|
}
|
|
|
|
|
|
} |