Commit a2b829a3 by xmy

Merge remote-tracking branch 'origin/test' into test

parents a443d431 043f8d18
...@@ -21,6 +21,8 @@ class Auth ...@@ -21,6 +21,8 @@ class Auth
private $option='=='; private $option='==';
private $allowTourist=false;
public function __construct(array $values) public function __construct(array $values)
{ {
...@@ -31,6 +33,10 @@ class Auth ...@@ -31,6 +33,10 @@ class Auth
if (isset($values['option'])) { if (isset($values['option'])) {
$this->option = $values['option']; $this->option = $values['option'];
} }
if (isset($values['allowTourist'])) {
$this->allowTourist = $values['allowTourist'];
}
} }
...@@ -53,4 +59,24 @@ class Auth ...@@ -53,4 +59,24 @@ class Auth
{ {
return $this->option; return $this->option;
} }
/**
* Get the value of allowTourist
*/
public function getAllowTourist()
{
return $this->allowTourist;
}
/**
* Set the value of allowTourist
*
* @return self
*/
public function setAllowTourist($allowTourist)
{
$this->allowTourist = $allowTourist;
return $this;
}
} }
\ No newline at end of file
...@@ -26,12 +26,15 @@ class AuthCollector implements CollectorInterface ...@@ -26,12 +26,15 @@ class AuthCollector implements CollectorInterface
if ($objectAnnotation instanceof Auth) { if ($objectAnnotation instanceof Auth) {
$scope = $objectAnnotation->getScope(); $scope = $objectAnnotation->getScope();
$option = $objectAnnotation->getOption(); $option = $objectAnnotation->getOption();
$allowTourist = $objectAnnotation->getAllowTourist();
if ( $methodName ==='' ) { if ( $methodName ==='' ) {
self::$auth[$className]['scope'] = $scope; self::$auth[$className]['scope'] = $scope;
self::$auth[$className]['option'] = $option; self::$auth[$className]['option'] = $option;
self::$auth[$className]['allowTourist'] = $allowTourist;
} else { } else {
self::$auth[$className]['methods'][$methodName]['scope'] = $scope; self::$auth[$className]['methods'][$methodName]['scope'] = $scope;
self::$auth[$className]['methods'][$methodName]['option'] = $option; self::$auth[$className]['methods'][$methodName]['option'] = $option;
self::$auth[$className]['methods'][$methodName]['allowTourist'] = $allowTourist;
} }
} }
......
...@@ -11,4 +11,6 @@ class PayOriginEnum ...@@ -11,4 +11,6 @@ class PayOriginEnum
const BUYER_MP = 6;//买家公众号 const BUYER_MP = 6;//买家公众号
const QUICKPAY_H5 = 7;// h5页面快速支付 const QUICKPAY_H5 = 7;// h5页面快速支付
const YUNMAIKJ_MP = 8; // 云脉科技公众号支付 const YUNMAIKJ_MP = 8; // 云脉科技公众号支付
const CATERING_BUYER_WEAPP = 9; // 餐饮行业买家端小程序
const CATERING_SELLER_WEAPP = 10; // 餐饮行业商家小程序
} }
\ 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