<?php

namespace app\api\controller\order;

use app\api\controller\Controller;
use app\api\service\order\Refund as RefundService;
use think\facade\Request;

/**
 * @package app\api\controller\order
 * @class Refund
 * @author xzncit 2024/3/20
 */
class Refund extends Controller {

    public function index(){
        return returnAjax("msg:ok",1,RefundService::getList(Request::param()));
    }

    /**
     * 详情
     * @return \think\response\Json
     * @throws \app\common\exception\BaseException
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function detail(){
        return returnAjax("msg:ok",1,RefundService::detail(Request::param("order_id",0,"intval")));
    }

    public function save(){
        return returnAjax("msg:ok",1,RefundService::save(Request::param()));
    }

}