Commit 4739e110 authored by wangjj's avatar wangjj

优惠券接口

parent d4ab12ac
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/5/27
* Time: 17:40
*/
use internalApi\shop\Coupon;
require __DIR__.'/_init.php';
Coupon::setDebug();
$arr = Coupon::getAllCoupon();
//$arr = Shop::fetchList(null, 1, 50);
//Shop::saveShop([
// 'id' => 15,
// 'status' => 0
//]);
......@@ -43,7 +43,7 @@ return [
'clientSecret' => 'qlOCFMUfxWjOhK2bdL88e3w2DjdhUDIA'
],
'_async_server' => [
'host' => '172.16.0.181',
'host' => '192.168.99.181',
'port' => 11300,
'tube' => 'internal-api'
]
......
......@@ -25,4 +25,27 @@ class Coupon extends Client
{
return self::call('coupon.sendByBuyVip', compact('uid'));
}
/**
* 获取可用优惠券列表
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function getAllCoupon()
{
return self::call('coupon.getAllCoupon');
}
/**
* 发送优惠券
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function addOneCouponByApi($uid)
{
return self::call('coupon.addOneCouponByApi', compact('uid'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment