|
|
|
@ -10,7 +10,6 @@ use app\model\AgentRechargeRecords; |
|
|
|
use app\model\AgentUser; |
|
|
|
use app\model\RechargeRecords; |
|
|
|
use app\model\User; |
|
|
|
use app\model\User as UserModel; |
|
|
|
use app\model\WithdrawalRecords; |
|
|
|
use think\facade\Db; |
|
|
|
use think\facade\Request; |
|
|
|
@ -37,7 +36,7 @@ class AdminTeam extends BaseController |
|
|
|
|
|
|
|
$where = []; |
|
|
|
|
|
|
|
$UserModel = new UserModel(); |
|
|
|
$UserModel = new User(); |
|
|
|
|
|
|
|
# 用户id / 手机号码查询 |
|
|
|
if (isset($request['title']) && !empty($request['title'])) { |
|
|
|
@ -83,7 +82,7 @@ class AdminTeam extends BaseController |
|
|
|
|
|
|
|
validate(UserValidate::class)->scene('editUser')->check($param); |
|
|
|
|
|
|
|
$UserModel = new UserModel(); |
|
|
|
$UserModel = new User(); |
|
|
|
$result = $UserModel->retrieve($param); |
|
|
|
|
|
|
|
if (!$result['status']) throw new ValidateException($result['msg']); |
|
|
|
@ -94,6 +93,28 @@ class AdminTeam extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除用户 |
|
|
|
* @return array |
|
|
|
*/ |
|
|
|
public function deleteUser() |
|
|
|
{ |
|
|
|
$param = Request::param(); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
validate(UserValidate::class)->scene('delUser')->check($param); |
|
|
|
|
|
|
|
$result = User::destroy($param['user_id']); |
|
|
|
|
|
|
|
if (!$result) throw new ValidateException('删除失败'); |
|
|
|
|
|
|
|
return $this->renderSuccess('已删除'); |
|
|
|
} catch (ValidateException $validateException) { |
|
|
|
return $this->renderError($validateException->getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 用户上分 |
|
|
|
* @return array |
|
|
|
|