Commit 265fecbb by xmy

Merge branch 'buyer-agent' into test

parents 9ac8583b 6b258f0a
# 2.0.29
- 添加分销代理者角色
# 2.0.28
- token里添加万人万店标识
# 2.0.27
- 公众号通知跳转url
# 2.0.26
- 添加新的支付来源常量
......
......@@ -11,7 +11,8 @@ class AuthEnum
{
const SCOPE_BUYER = 1; //买家
const SCOPE_EMPLOYEE = 2; //手艺人
const SCOPE_EMPLOYEE = 2; //手艺人
const SCOPE_AGENT = 2; // 店铺分销代理者
const SCOPE_SELLER = 3; //卖家
......@@ -19,11 +20,14 @@ class AuthEnum
const SCOPE_SUPER_ADMIN = 5; //超级管理员
const AUTH_BACKEND = 100;
const AUTH_FRONTEND = 101;
const AUTH_TYPE_SELLER = 200; //卖家授权
const AUTH_TYPE_EMPLOYEE = 201; //员工授权
const AUTH_TYPE_AGENT = 201; //店铺分销代理者授权
const AUTH_TYPE_E_AND_S = 203; //选择授权(用户自己选择进行员工授权还是卖家授权)
const AUTH_TYPE_BUYER = 204; //买家授权
......
......@@ -12,12 +12,13 @@ namespace Hdll\Services\Buyer\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSaveBill(int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money,string $orderName,int $orderType)
* @method ResultInterface deferSaveBill(int $order_id, int $buyer_id, int $store_id, string $order_sn, int $money, string $orderName, int $orderType,int $agentId)
* @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId)
* Interface AgencyInterface
* @package App\Lib
*/
interface BillInterface{
interface BillInterface
{
/**
* 保存账单数据
......@@ -28,6 +29,7 @@ interface BillInterface{
* @param int $money //订单金额
* @param string $orderName //订单名称
* @param int $orderType //订单类型
* @param int $agentId //代理商id
* @return mixed
* @author Administrator
*/
......@@ -38,21 +40,22 @@ interface BillInterface{
string $orderSn,
int $money,
string $orderName,
int $orderType
int $orderType,
int $agentId
);
public function getListByOrderId(int $storeId, int $orderId);
public function getListByOrderId(int $storeId, int $orderId);
public function updateByCondition(int $storeId, array $condition, array $info);
public function updateByCondition(int $storeId, array $condition, array $info);
/**
* 退款成功逻辑
*
* @param $storeId
* @param $orderId
* @return mixed
*/
public function refundSuccess($storeId, $orderId);
/**
* 退款成功逻辑
*
* @param $storeId
* @param $orderId
* @return mixed
*/
public function refundSuccess($storeId, $orderId);
}
\ No newline at end of file
......@@ -197,6 +197,19 @@ class User
return false;
}
/**
* 是否是通过“万人万店”的小程序授权
*
* @return boolean 如果是 返回true
*/
public function isWrwd()
{
$wrwd = $this->getValue('isWrwd');
if($wrwd == 1) {
return true;
}
return false;
}
public function initUser($token)
{
......
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