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; ...@@ -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 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 * Interface AgencyInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -36,5 +37,7 @@ interface BillInterface{ ...@@ -36,5 +37,7 @@ interface BillInterface{
int $money int $money
); );
public function getListByOrderId(int $storeId, int $orderId);
} }
\ No newline at end of file
...@@ -14,14 +14,23 @@ namespace Hdll\Services\Buyer\Lib; ...@@ -14,14 +14,23 @@ namespace Hdll\Services\Buyer\Lib;
interface CommissionInterface interface CommissionInterface
{ {
/** /**
* 扣除可提现金额(仅限于对账服务使用,切记!!!) * 扣除可提现金额
* *
* @param $storeId * @param $storeId
* @param $buyerId * @param $buyerId
* @param $money * @param $money
* @return bool * @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; ...@@ -12,14 +12,31 @@ use Swoft\Redis\Operator\Processor\PrefixProcessor;
class Redis extends \Swoft\Redis\Redis class Redis extends \Swoft\Redis\Redis
{ {
private $prefix;
/** /**
* 设置redis前缀 * 设置redis前缀
* @param $prefix * @param $prefix
*/ */
public function setPrefix($prefix) public function setPrefix($prefix)
{ {
$this->prefix = $prefix;
}
public function call(string $method, array $params)
{
$config = App::getBean(PrefixProcessor::class); $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 ...@@ -36,6 +36,13 @@ class OrderEnum
self::TYPE_COLLECTION, 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_FALSE = 0; //未对账
const BALANCE_STATE_TRUE = 1;//已对账 const BALANCE_STATE_TRUE = 1;//已对账
......
...@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface; ...@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface;
/** /**
* The interface of demo service * 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 deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId) * @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo) * @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
...@@ -35,6 +35,7 @@ interface OrderInterface ...@@ -35,6 +35,7 @@ interface OrderInterface
* @param string $goods_name * @param string $goods_name
* @param string $goods_image * @param string $goods_image
* @param string $activity_name * @param string $activity_name
* @param int $goodsId,
* @param string $reservation_time * @param string $reservation_time
* @return mixed * @return mixed
*/ */
...@@ -50,6 +51,7 @@ interface OrderInterface ...@@ -50,6 +51,7 @@ interface OrderInterface
string $goods_name, string $goods_name,
string $goods_image, string $goods_image,
string $activity_name, string $activity_name,
int $goodsId,
string $reservation_time = ''); string $reservation_time = '');
public function getOrderInfo(int $storeId,int $orderId); public function getOrderInfo(int $storeId,int $orderId);
......
...@@ -15,6 +15,7 @@ use Swoft\Core\ResultInterface; ...@@ -15,6 +15,7 @@ use Swoft\Core\ResultInterface;
* method ResultInterface deferReduceBalance($sellerId, $money) * method ResultInterface deferReduceBalance($sellerId, $money)
* method ResultInterface deferAddTotal($sellerId, $money) * method ResultInterface deferAddTotal($sellerId, $money)
* method ResultInterface deferReduceTotal($sellerId, $money) * method ResultInterface deferReduceTotal($sellerId, $money)
* method ResultInterface deferListByOrderId($storeId, $orderId)
* Interface SellerDistributionInterface * Interface SellerDistributionInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -79,4 +80,13 @@ interface SellerDistributionInterface{ ...@@ -79,4 +80,13 @@ interface SellerDistributionInterface{
* @author Administrator * @author Administrator
*/ */
public function reduceTotal($sellerId, $money); 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