Commit d2e1edad by feixiang

Merge remote-tracking branch 'origin/master'

parents 134ace4d 5f3337d1
...@@ -39,10 +39,8 @@ class Alisms ...@@ -39,10 +39,8 @@ class Alisms
// 短信模板预设参数 // 短信模板预设参数
$this->templateParam = $templateParam; $this->templateParam = $templateParam;
$configurator = \Swoft\App::getBean('config'); $commonConfigs = include dirname(__FILE__, 2).'/Config/config.php';
$configurator->load('@vendor/hdll/services/src/Common/Config'); $this->config = $commonConfigs['alisms'];
$this->config = $configurator->get('alisms');
} }
/** /**
......
...@@ -26,10 +26,8 @@ class Upload ...@@ -26,10 +26,8 @@ class Upload
public function __construct(array $config = []) public function __construct(array $config = [])
{ {
if (empty($config)) { if (empty($config)) {
/**@var Config */ $config = include alias('@vendor/hdll/services/src/Common/Config').'/config.php';
$bConfig = \Swoft\App::getBean('config'); $config = $config['qCloud'];
$bConfig->load('@vendor/hdll/services/src/Common/Config');
$config = $bConfig->get('qCloud');
} }
$this->Bucket = $config['Bucket']; $this->Bucket = $config['Bucket'];
$this->Region = $config['Region']; $this->Region = $config['Region'];
...@@ -68,4 +66,27 @@ class Upload ...@@ -68,4 +66,27 @@ class Upload
} }
return $result; return $result;
} }
public function uploadStream($stream, $name = '')
{
$cosClient = new Client(
[
'region' => $this->Region,
'credentials' => [
'secretId' => $this->SecretId,
'secretKey' => $this->SecretKey,
]
]
);
try {
$result = $cosClient->Upload(
$this->Bucket,
$name,
$stream
);
} catch (\Exception $e) {
throw new CommonException(['msg' => $e->getMessage()]);
}
return $result;
}
} }
\ No newline at end of file
...@@ -12,16 +12,13 @@ use Swoft\Core\ResultInterface; ...@@ -12,16 +12,13 @@ use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferOpenVip($storeId,$orderId,$money) * @method ResultInterface deferOpenVip($storeId,$orderId,$money)
* @method ResultInterface deferUpdate($storeId,$condition, $data)
* Interface SellerInterface * Interface SellerInterface
* @package App\Lib * @package App\Lib
*/ */
interface VipInterface interface VipInterface
{ {
public function openVip($storeId,$orderId,$money); public function openVip($storeId,$orderId);
public function update($storeId,$condition, $data);
} }
\ No newline at end of file
<?php
/**
* 买家佣金提现接口
*
* @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\WithdrawCash\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of BuyerCnDrawInterface service
*
* @method ResultInterface deferPaySuccess(int $storeId,int $id,string $wxOrderSn,int $fee)
* @method ResultInterface deferPayFailed(int $storeId,int $id,string $message)
*/
interface BuyerCnDrawInterface{
/**
* 支付成功接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $wxOrderSn 微信支付订单号
* @param integer $fee 手续费
* @return void
*/
public function paySuccess(int $storeId,int $id,string $wxOrderSn,int $fee);
/**
* 支付失败接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $message 失败信息
* @return void
*/
public function payFailed(int $storeId,int $id,string $message);
}
\ No newline at end of file
<?php
/**
* 买家营业额提现接口
*
* @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\WithdrawCash\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of SellerFundDrawInterface service
*
* @method ResultInterface deferPaySuccess(int $storeId,int $id,string $wxOrderSn,int $fee)
* @method ResultInterface deferPayFailed(int $storeId,int $id,string $message)
*/
interface SellerFundDrawInterface{
/**
* 支付成功接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $wxOrderSn 微信支付订单号
* @param integer $fee 手续费
* @return boolean
*/
public function paySuccess(int $storeId,int $id,string $wxOrderSn,int $fee);
/**
* 支付失败接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $message 失败信息
* @return boolean
*/
public function payFailed(int $storeId,int $id,string $message);
}
\ No newline at end of file
<?php <?php
/** /**
* 家佣金提现接口 * 家佣金提现接口
* *
* @link https://swoft.org * @link https://swoft.org
* @document https://doc.swoft.org * @document https://doc.swoft.org
...@@ -11,30 +11,32 @@ namespace Hdll\Services\WithdrawCash\Lib; ...@@ -11,30 +11,32 @@ namespace Hdll\Services\WithdrawCash\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* The interface of SellerCnDrawInterface service * The interface of WithdrawCashInterface service
* *
* @method ResultInterface deferPaySuccess(int $storeId,int $id,string $wxOrderSn,int $fee) * @method ResultInterface deferPaySuccess(int $type,int $storeId,int $id,string $wxOrderSn,int $fee)
* @method ResultInterface deferPayFailed(int $storeId,int $id,string $message) * @method ResultInterface deferPayFailed(int $type,int $storeId,int $id,string $message)
*/ */
interface SellerCnDrawInterface{ interface WithdrawCashInterface{
/** /**
* 支付成功接口 * 支付成功接口
* *
* @param integer $type 提现类型
* @param integer $storeId 店铺ID * @param integer $storeId 店铺ID
* @param integer $id 提现记录ID * @param integer $id 提现记录ID
* @param string $wxOrderSn 微信支付订单号 * @param string $wxOrderSn 微信支付订单号
* @param integer $fee 手续费 * @param integer $fee 手续费
* @return boolean * @return boolean
*/ */
public function paySuccess(int $storeId,int $id,string $wxOrderSn,int $fee); public function paySuccess(int $type,int $storeId,int $id,string $wxOrderSn,int $fee);
/** /**
* 支付失败接口 * 支付失败接口
* *
* @param integer $type 提现类型
* @param integer $storeId 店铺ID * @param integer $storeId 店铺ID
* @param integer $id 提现记录ID * @param integer $id 提现记录ID
* @param string $message 失败信息 * @param string $message 失败信息
* @return boolean * @return boolean
*/ */
public function payFailed(int $storeId,int $id,string $message); public function payFailed(int $type,int $storeId,int $id,string $message);
} }
\ 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