Commit 209bcacb by 王召彬
parents e5671d85 1632fcaa
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/17
* Time: 14:19
*/
namespace Hdll\Services\Order\Enum;
class BuyerDistributionEnum
{
const E101 = ['101', '金额不能小于0'];
const E102 = [102, '该数据不属于您', 403];
const E103 = [103, '请勿重复创建', 403];
const E104 = [104, '该用户不存在或属于您的团队', 403];
public function getError($code)
{
$reflect = new \ReflectionClass(self::class);
$arr = $reflect->getConstant('E' . substr($code, -3));
if (!is_array($arr)) {
return false;
}
return [
'code' => $arr[0],
'msg' => $arr[1],
'errorCode' => $arr[2],
];
}
}
\ No newline at end of file
...@@ -6,77 +6,44 @@ ...@@ -6,77 +6,44 @@
* Time: 13:48 * Time: 13:48
*/ */
namespace Hdll\Services\BuyerDistribution\Lib; namespace Hdll\Services\Shop\Lib;
use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferGetSetting(string $token) * @method ResultInterface deferAddSellerFreezeMoney(int $storeId,int $money)
* @method ResultInterface deferPutSetting(string $token,array $param) * @method ResultInterface deferGetBuyerCommission(int $buyerId)
* @method ResultInterface deferGetTeam(string $token,int $pid,int $page) * @method ResultInterface deferGetSellerFund(int $storeId)
* @method ResultInterface deferSaveAgencyBill(string $token,array $order) * @method ResultInterface deferSaveBill(string $token,int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money)
* Interface AgencyInterface * Interface AgencyInterface
* @package App\Lib * @package App\Lib
*/ */
interface AgencyInterface{ interface AgencyInterface{
/**
* 获取分销设置
* @return mixed
* @author Administrator
*/
public function getSetting(string $token);
/**
* 写入或更新分销设置
* @param array $param
* @return mixed
* @author Administrator
*/
public function putSetting(string $token,array $param);
/**
* 获取团队列表
* @param $pid
* @param $page
* @return mixed
* @author Administrator
*/
// public function getTeam(string $token,int $pid,int $page);
/**
* 保存分销账单
* @param array $order 订单数据
* @return mixed
* @author Administrator
*/
public function saveAgencyBill(string $token,array $order);
/** /**
* 增加卖家冻结金额 * 增加卖家冻结金额
* @param string $token * @param int $storeId
* @param int $money * @param int $money 冻结金额(千分)
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function addSellerFreezeMoney(string $token,int $money); public function addSellerFreezeMoney(int $storeId,int $money);
/** /**
* 获取买家佣金数据 * 获取买家佣金数据
* @param string $token * @param int $buyerId
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function getBuyerCommission(string $token); public function getBuyerCommission(int $buyerId);
/** /**
* 获取卖家资金数据 * 获取卖家资金数据
* @param string $token * @param int $storeId
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function getSellerFund(string $token); public function getSellerFund(int $storeId);
/** /**
* 保存账单数据 * 保存账单数据
...@@ -99,5 +66,4 @@ interface AgencyInterface{ ...@@ -99,5 +66,4 @@ interface AgencyInterface{
); );
public function getBillList(string $token,array $condition, int $page, int $limit = 15);
} }
\ 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