first commit
This commit is contained in:
163
app/adminapi/controller/finance/RechargeRecordController.php
Normal file
163
app/adminapi/controller/finance/RechargeRecordController.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\{RechargeRecordLists,AgentRechargeRecordLists};
|
||||
use app\adminapi\logic\finance\RechargeRecordLogic;
|
||||
use app\adminapi\validate\finance\RechargeRecordValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 充值记录控制器
|
||||
* Class RechargeRecordController
|
||||
* @package app\adminapi\controller\finance
|
||||
*/
|
||||
class RechargeRecordController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取充值记录列表
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new RechargeRecordLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取代理充值记录列表
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function agentLists()
|
||||
{
|
||||
return $this->dataLists(new AgentRechargeRecordLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除充值记录
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new RechargeRecordValidate())->post()->goCheck('delete');
|
||||
RechargeRecordLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 同意充值
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function agree()
|
||||
{
|
||||
$params = (new RechargeRecordValidate())->post()->goCheck('agree');
|
||||
$result = RechargeRecordLogic::agree($params['id']);
|
||||
if (true === $result) {
|
||||
return $this->success('同意成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 拒绝充值
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function refuse()
|
||||
{
|
||||
$params = (new RechargeRecordValidate())->post()->goCheck('refuse');
|
||||
$result = RechargeRecordLogic::refuse($params['id']);
|
||||
if (true === $result) {
|
||||
return $this->success('拒绝成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 = RechargeRecordLogic::remark($params);
|
||||
if (true === $result) {
|
||||
return $this->success('备注成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改充值金额
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function changeAmount()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = RechargeRecordLogic::changeAmount($params);
|
||||
if (true === $result) {
|
||||
return $this->success('修改成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 新充值提现条数
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function warmCount()
|
||||
{
|
||||
$result = RechargeRecordLogic::warmCount();
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 充值统计
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function stat()
|
||||
{
|
||||
$result = RechargeRecordLogic::stat();
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user