111 lines
2.7 KiB
PHP
111 lines
2.7 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\financial_transfers;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\lists\financial_transfers\FinancialTransfersLists;
|
|
use app\admin\logic\financial_transfers\FinancialTransfersLogic;
|
|
use app\admin\validate\financial_transfers\FinancialTransfersValidate;
|
|
|
|
|
|
/**
|
|
* FinancialTransfers控制器
|
|
* Class FinancialTransfersController
|
|
* @package app\admin\controller\financial_transfers
|
|
*/
|
|
class FinancialTransfersController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取列表
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/14 10:10
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new FinancialTransfersLists());
|
|
}
|
|
|
|
public function send_transfers()
|
|
{
|
|
$params = (new FinancialTransfersValidate())->post()->goCheck('send');
|
|
$result = FinancialTransfersLogic::dealsend($params);
|
|
|
|
if (true === $result) {
|
|
return $this->success('发送成功', [], );
|
|
}
|
|
return $this->fail(FinancialTransfersLogic::getError());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* @notes 添加
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/14 10:10
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new FinancialTransfersValidate())->post()->goCheck('add');
|
|
$result = FinancialTransfersLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(FinancialTransfersLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/14 10:10
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new FinancialTransfersValidate())->post()->goCheck('edit');
|
|
$result = FinancialTransfersLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(FinancialTransfersLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/14 10:10
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new FinancialTransfersValidate())->post()->goCheck('delete');
|
|
FinancialTransfersLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取详情
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/06/14 10:10
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new FinancialTransfersValidate())->goCheck('detail');
|
|
$result = FinancialTransfersLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
|
|
} |