初始化项目
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 管理系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2023 https://www.zizai.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 自在科技
|
||||
// +----------------------------------------------------------------------
|
||||
declare (strict_types=1);
|
||||
|
||||
namespace app\api\controller\syb;
|
||||
|
||||
use app\api\controller\Controller;
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
* Class SybVoucher
|
||||
* @package app\api\controller
|
||||
*/
|
||||
class SybVoucher extends Controller
|
||||
{
|
||||
/** 优惠券下单
|
||||
* @param $data
|
||||
* @return array|mixed|string[]
|
||||
*/
|
||||
public function voucherCreateOrder($data)
|
||||
{
|
||||
$header = [
|
||||
'method' => 'syb.opt.voucher.createOrder',
|
||||
];
|
||||
$body = [
|
||||
'orgNo' => config('crypto.company_no'),
|
||||
'model' => $data['model']??'',
|
||||
'voucherAmount' => $data['voucherAmount']??'',
|
||||
'fullAmount' => $data['fullAmount']??'',
|
||||
'storeNum' => $data['storeNum']??'',
|
||||
'validTime' => $data['validTime']??'',
|
||||
];
|
||||
|
||||
$response = $this->sendRequest(config('crypto.url').'/api/1.0.0/voucher/createOrder', $body, $header);
|
||||
$this->saveLog("优惠券下单".json_encode($response,320));
|
||||
return $response;
|
||||
}
|
||||
|
||||
/** 优惠券订单查询
|
||||
* @param $data
|
||||
* @return array|mixed|string[]
|
||||
*/
|
||||
public function voucherOrderListPage($data)
|
||||
{
|
||||
$header = [
|
||||
'method' => 'syb.opt.voucher.order.listPage',
|
||||
];
|
||||
$body = [
|
||||
'orgNo' => config('crypto.company_no'),
|
||||
'orderNo' => $data['orderNo']??'',
|
||||
'model' => $data['model']??'',
|
||||
'pageLimit' => $data['pageLimit']??'',
|
||||
'pageNum' => $data['pageNum']??'',
|
||||
];
|
||||
|
||||
$response = $this->sendRequest(config('crypto.url').'/api/1.0.0/voucher/order/listPage', $body, $header);
|
||||
$this->saveLog("优惠券订单查询".json_encode($response,320));
|
||||
return $response;
|
||||
}
|
||||
|
||||
/** 卡券查询
|
||||
* @param $data
|
||||
* @return array|mixed|string[]
|
||||
*/
|
||||
public function voucherItemListPage($data)
|
||||
{
|
||||
$header = [
|
||||
'method' => 'syb.opt.voucher.item.listPage',
|
||||
];
|
||||
$body = [
|
||||
'orgNo' => config('crypto.company_no'),
|
||||
'orderNo' => $data['orderNo']??'',
|
||||
'model' => $data['model']??'',
|
||||
'pageLimit' => $data['pageLimit']??'',
|
||||
'pageNum' => $data['pageNum']??'',
|
||||
];
|
||||
|
||||
$response = $this->sendRequest(config('crypto.url').'/api/1.0.0/voucher/item/listPage', $body, $header);
|
||||
$this->saveLog("卡券查询".json_encode($response,320));
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user