test_lgq/niucloud/app/api/controller/order/Recharge.php
2024-01-24 17:36:08 +08:00

53 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\api\controller\order;
use app\service\api\order\RechargeOrderService;
use core\base\BaseApiController;
use think\Response;
class Recharge extends BaseApiController
{
/**
* 充值订单创建
* @return Response
*/
public function create()
{
//['order_from' => 'h5', 'ip' => '127.0.0.1', 'member_message' => '','recharge_money' => 12.00]
$data = $this->request->params([
['member_message', ''],
['recharge_money', 0]
]);
$res = (new RechargeOrderService())->recharge($data);
return success($res);
}
public function lists(){
$data = $this->request->params([
['order_status', '']
]);
$res = (new RechargeOrderService())->getPage($data);
return success($res);
}
/**
* 查询充值订单详情
* @param int $order_id
* @return Response
*/
public function detail(int $order_id){
$res = (new RechargeOrderService())->getDetail($order_id);
return success($res);
}
}