Commit 2dcfecae by dzhang

Merge branch 'master' of http://git.2b3.cn/tencent/services

parents 49557387 e8a1cfe5
......@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSaveBill(string $token,int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money)
* @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId)
* Interface AgencyInterface
* @package App\Lib
*/
......@@ -36,5 +37,7 @@ interface BillInterface{
int $money
);
public function getListByOrderId(int $storeId, int $orderId);
}
\ No newline at end of file
......@@ -14,14 +14,23 @@ namespace Hdll\Services\Buyer\Lib;
interface CommissionInterface
{
/**
* 扣除可提现金额(仅限于对账服务使用,切记!!!)
* 扣除可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public function reduceBalanceCommissionCompare($storeId, $buyerId, $money);
public function reduceBalanceCommission($storeId, $buyerId, $money);
/**
* 增加可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public function addBalanceCommission($storeId, $buyerId, $money);
/**
* 增加可提现金额(仅限于对账服务使用,切记!!!)
......
......@@ -12,14 +12,31 @@ use Swoft\Redis\Operator\Processor\PrefixProcessor;
class Redis extends \Swoft\Redis\Redis
{
private $prefix;
/**
* 设置redis前缀
* @param $prefix
*/
public function setPrefix($prefix)
{
$this->prefix = $prefix;
}
public function call(string $method, array $params)
{
$config = App::getBean(PrefixProcessor::class);
$config->setPrefix($prefix);
$config->setPrefix($this->prefix);
$res = parent::call($method, $params);
$config->setPrefix(config("redis.prefix",''));
return $res;
}
public function __destruct()
{
$config = App::getBean(PrefixProcessor::class);
$config->setPrefix(config("redis.prefix",''));
}
......
......@@ -36,6 +36,13 @@ class OrderEnum
self::TYPE_COLLECTION,
];
const PAID_STATUS = [
self::STATUS_PAID,
self::STATUS_DELIVERY,
self::STATUS_DELIVERED,
self::STATUS_EVALUATION
];
//对账状态
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,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 = '')
* @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,int $goodsId,string $reservation_time = '')
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
......@@ -35,6 +35,7 @@ interface OrderInterface
* @param string $goods_name
* @param string $goods_image
* @param string $activity_name
* @param int $goodsId,
* @param string $reservation_time
* @return mixed
*/
......@@ -50,6 +51,7 @@ interface OrderInterface
string $goods_name,
string $goods_image,
string $activity_name,
int $goodsId,
string $reservation_time = '');
public function getOrderInfo(int $storeId,int $orderId);
......
......@@ -15,6 +15,7 @@ use Swoft\Core\ResultInterface;
* method ResultInterface deferReduceBalance($sellerId, $money)
* method ResultInterface deferAddTotal($sellerId, $money)
* method ResultInterface deferReduceTotal($sellerId, $money)
* method ResultInterface deferListByOrderId($storeId, $orderId)
* Interface SellerDistributionInterface
* @package App\Lib
*/
......@@ -79,4 +80,13 @@ interface SellerDistributionInterface{
* @author Administrator
*/
public function reduceTotal($sellerId, $money);
/**
* 获取分销记录
* @param $storeId
* @param $orderId
* @return mixed
* @author Administrator
*/
public function listByOrderId($storeId, $orderId);
}
\ 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