Commit 2ef66174 by xmy

服务

parent 070e5090
......@@ -8,7 +8,7 @@
namespace Hdll\Services\Order\Enum;
class BuyerDistributionEnum
class BuyerDistributionError
{
const E101 = ['101', '金额不能小于0'];
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/30
* Time: 10:32
*/
namespace Hdll\Services\Vip\Enum;
class VipEnum{
const VIP_TOTAL_FEE = 10;//价格
const PAY_NOTIFY = 'http://www.baidu.com';
const STATUS_UNPAID = 10;//未支付
const STATUS_PAID = 20;//已支付
}
\ No newline at end of file
......@@ -8,10 +8,10 @@
namespace Hdll\Services\Order\Enum;
class SellerDistributionEnum
class SellerError
{
const E101 = ['101', '金额不能小于0'];
const E101 = [101, '金额不能小于0'];
const E102 = [102, '该数据不属于您', 403];
const E103 = [103, '请勿重复创建', 403];
const E104 = [104, '该用户不存在或属于您的团队', 403];
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/17
* Time: 14:19
*/
namespace App\Exception;
class SellerDistributionError
{
const E001 = [001, '参数非法',400];
const E002 = [002, '无效的Token',403];
const E003 = [003, '无权限操作',403];
const E004 = [004, '数据不存在',404];
const E101 = [101, '微信支付错误', 500];
const E102 = [102, '订单不存在或状态异常', 404];
const E103 = [103, '升级VIP失败,没有找到对应的店铺', 404];
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
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/25
* Time: 14:00
*/
namespace App\Lib;
interface SellerDistributionInterface{
/**
* 保存账单
* @param $orderId
* @param $sellerId
* @param $money
* @param $level
* @param string $memo
* @return mixed
* @author Administrator
*/
public function saveBill($orderId, $sellerId, $money, $level, $memo = '');
public function saveCommission();
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/30
* Time: 10:32
*/
namespace Hdll\Services\Vip\Enum;
class VipEnum{
const VIP_TOTAL_FEE = 10;//价格
const PAY_NOTIFY = 'http://www.baidu.com';
const STATUS_UNPAID = 10;//未支付
const STATUS_PAID = 20;//已支付
}
\ 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