first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,298 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\{UserLists,UserAgentLists};
use app\adminapi\logic\user\UserLogic;
use app\adminapi\validate\user\{AdjustUserMoney,AddUserValidate,UserValidate};
use app\api\validate\RegisterValidate;
/**
* 用户控制器
* Class UserController
* @package app\adminapi\controller\user
*/
class UserController extends BaseAdminController
{
/**
* @notes 用户列表
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:16
*/
public function lists()
{
return $this->dataLists(new UserLists());
}
/**
* @notes 代理用户列表
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:16
*/
public function agentLists()
{
return $this->dataLists(new UserAgentLists());
}
/**
* @notes 添加用户
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function add()
{
$params = (new AddUserValidate())->post()->goCheck('add');
$res = UserLogic::add($params);
if (true === $res) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 修改用户密码
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changePwd()
{
$params = (new UserValidate())->post()->goCheck('changePwd');
UserLogic::changePwd($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置支付密码
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetPayPwd()
{
$params = $this->request->post();
UserLogic::resetPayPwd($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 修改邮箱
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changeEmail()
{
$params = (new UserValidate())->post()->goCheck('changeEmail');
UserLogic::changeEmail($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置邮箱验证
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetEmail()
{
$params = $this->request->post();
UserLogic::resetEmail($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置谷歌验证
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetGoogle()
{
$params = $this->request->post();
UserLogic::resetGoogle($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 调整用户余额
* @return \think\response\Json
* @author BD
* @date 2023/2/23 14:33
*/
public function adjustMoney()
{
$params = (new AdjustUserMoney())->post()->goCheck();
$res = UserLogic::adjustUserMoney($params);
if (true === $res) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateMemberStatus()
{
$params = $this->request->post();
$result = UserLogic::updateMemberStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateLhStatus()
{
$params = $this->request->post();
$result = UserLogic::updateLhStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateTransferStatus()
{
$params = $this->request->post();
$result = UserLogic::updateTransferStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateSnStatus()
{
$params = $this->request->post();
$result = UserLogic::updateSnStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateOpenStatus()
{
$params = $this->request->post();
$result = UserLogic::updateOpenStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateAgentStatus()
{
$params = $this->request->post();
$result = UserLogic::updateAgentStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail($result);
}
/**
* @notes 修改代理名称
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changeAgentName()
{
$params = $this->request->post();
$result = UserLogic::changeAgentName($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail($result);
}
/**
* @notes 发送站内信
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function sendNotice()
{
$params = $this->request->post();
$res = UserLogic::sendNotice($params);
if (true === $res) {
return $this->success('发送成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 彩金赠送
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function caijin()
{
$params = $this->request->post();
$res = UserLogic::caijin($params);
if (true === $res) {
return $this->success('赠送成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 备注
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function remark()
{
$params = $this->request->post();
$params['admin_id'] = $this->adminId;
$result = UserLogic::remark($params);
if (true === $result) {
return $this->success('备注成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
}