95 lines
2.3 KiB
PHP
95 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\user_recharge;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\lists\user_recharge\UserRechargeLists;
|
|
use app\admin\logic\user_recharge\UserRechargeLogic;
|
|
use app\admin\validate\user_recharge\UserRechargeValidate;
|
|
|
|
|
|
/**
|
|
* 充值记录控制器
|
|
* Class UserRechargeController
|
|
* @package app\admin\controller\user_recharge
|
|
*/
|
|
class UserRechargeController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取充值记录列表
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/06 14:29
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new UserRechargeLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加充值记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/06 14:29
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new UserRechargeValidate())->post()->goCheck('add');
|
|
$result = UserRechargeLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserRechargeLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑充值记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/06 14:29
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new UserRechargeValidate())->post()->goCheck('edit');
|
|
$result = UserRechargeLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserRechargeLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除充值记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/06 14:29
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new UserRechargeValidate())->post()->goCheck('delete');
|
|
UserRechargeLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取充值记录详情
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/06 14:29
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new UserRechargeValidate())->goCheck('detail');
|
|
$result = UserRechargeLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
|
|
} |