Commit 7dc7d1bd by xmy
parents 5b92d34c 92167b83
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties;
/**
* the config of service user
*
* @Bean()
*/
class BuyerPoolConfig extends PoolProperties
{
protected $name = 'buyer';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 50;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 100;
/**
* Maximum waiting time
*
* @var int
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
* @var int
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
* @var int
*/
protected $timeout = 200;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected $uri = [
'192.168.3.100:8101',
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
* @var bool
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
* @var string
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
* @var string
*/
protected $provider = '';
}
<?php
/**
* Created by PhpStorm.
* User: lwt
* Date: 2018/7/10
* Time: 13:15
*/
namespace Hdll\Services\Order\Enum;
class LimitTimeBuyEnum
{
//订单状态
const STATUS_NORMAL = 10; //待支付
}
\ No newline at end of file
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace Hdll\Services\Order\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferBackNum(string $token, int $consignee_id, int $limit_id, int $selected_num, int $order_type, int $goods_id, string $reservation_time = '')
*/
interface LimitTimeBuyInterface
{
/**
*
* 补回 未支付 限购活动 库存
* @param string $token
* @param int $consignee_id
* @param int $limit_id
* @param int $selected_num
* @param int $order_type
* @param int $goods_id
* @param string $reservation_time
* @return mixed
*/
public function backNum(
string $token,
int $consignee_id,
int $limit_id,
int $selected_num,
int $order_type,
int $goods_id,
string $reservation_time = '');
}
\ No newline at end of file
......@@ -28,8 +28,8 @@ class OrderEnum
const TYPE_LIMIT = 2; //限时购订单
//对账状态
const BALANCE_STATE_FALSE = 0;
const BALANCE_STATE_TRUE = 1;
const BALANCE_STATE_FALSE = 0; //未对账
const BALANCE_STATE_TRUE = 1;//已对账
......
......@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferCreateOrder( string $token,int $consignee_id,array $activity_info,int $selected_num,int $order_type,float $total,array $goods_info,string $reservation_time = '')
* @method ResultInterface deferCreateOrder( string $token,int $consignee_id,int $activity_id,int $selected_num,int $order_type,float $total,float $goods_price,string $goods_name,string $goods_image,string $activity_name,string $reservation_time = '')
*/
interface OrderInterface
{
......@@ -23,21 +23,27 @@ interface OrderInterface
* 创建订单
* @param string $token
* @param int $consignee_id
* @param array $activity_info
* @param int $item_id
* @param int $selected_num
* @param int $order_type
* @param float $total
* @param array $goods_info,
* @param float $goods_price
* @param string $goods_name
* @param string $goods_image
* @param string $activity_name
* @param string $reservation_time
* @return mixed
*/
public function createOrder(
string $token,
int $consignee_id,
array $activity_info,
int $item_id,
int $selected_num,
int $order_type,
float $total,
array $goods_info,
float $goods_price,
string $goods_name,
string $goods_image,
string $activity_name,
string $reservation_time = '');
}
\ 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