95 lines
2.2 KiB
PHP
95 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\user_bill;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\lists\user_bill\UserBillLists;
|
|
use app\admin\logic\user_bill\UserBillLogic;
|
|
use app\admin\validate\user_bill\UserBillValidate;
|
|
|
|
|
|
/**
|
|
* 资金记录控制器
|
|
* Class UserBillController
|
|
* @package app\admin\controller\user_bill
|
|
*/
|
|
class UserBillController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取资金记录列表
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new UserBillLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加资金记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new UserBillValidate())->post()->goCheck('add');
|
|
$result = UserBillLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserBillLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑资金记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new UserBillValidate())->post()->goCheck('edit');
|
|
$result = UserBillLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserBillLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除资金记录
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new UserBillValidate())->post()->goCheck('delete');
|
|
UserBillLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取资金记录详情
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new UserBillValidate())->goCheck('detail');
|
|
$result = UserBillLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
|
|
} |