You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.9 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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\log;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\log\UserPayOrderLists;
use app\adminapi\logic\log\UserPayOrderLogic;
use app\adminapi\validate\log\UserPayOrderValidate;
/**
* UserPayOrder控制器
* Class UserPayOrderController
* @package app\adminapi\controller\log
*/
class UserPayOrderController extends BaseAdminController
{
/**
* @notes 获取列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/14 17:18
*/
public function lists()
{
return $this->dataLists(new UserPayOrderLists());
}
/**
* @notes 添加
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/14 17:18
*/
public function add()
{
$params = (new UserPayOrderValidate())->post()->goCheck('add');
$result = UserPayOrderLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserPayOrderLogic::getError());
}
/**
* @notes 编辑
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/14 17:18
*/
public function edit()
{
$params = (new UserPayOrderValidate())->post()->goCheck('edit');
$result = UserPayOrderLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserPayOrderLogic::getError());
}
/**
* @notes 删除
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/14 17:18
*/
public function delete()
{
$params = (new UserPayOrderValidate())->post()->goCheck('delete');
UserPayOrderLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/14 17:18
*/
public function detail()
{
$params = (new UserPayOrderValidate())->goCheck('detail');
$result = UserPayOrderLogic::detail($params);
return $this->data($result);
}
}