Commit bc6168f7 by 王召彬

Merge branch 'ft-region'

parents e8edccb8 24b00f8d
...@@ -140,6 +140,11 @@ class User ...@@ -140,6 +140,11 @@ class User
$this->setValue('subStoreId', $value); $this->setValue('subStoreId', $value);
} }
public function setRgId($value)
{
return $this->setValue('rgId', $value);
}
public function getSubStoreId() public function getSubStoreId()
{ {
return $this->getValue('subStoreId')??0; return $this->getValue('subStoreId')??0;
...@@ -193,6 +198,11 @@ class User ...@@ -193,6 +198,11 @@ class User
return $this->getValue('scope'); return $this->getValue('scope');
} }
public function getRgId()
{
return $this->getValue('rgId');
}
/** /**
* 是否是通过托管的小程序授权 * 是否是通过托管的小程序授权
* *
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
namespace Hdll\Services\Common\Lib; namespace Hdll\Services\Common\Lib;
use Hdll\Services\Common\Config\CfgCenter; use Hdll\Services\Common\Config\CfgCenter;
use Swoft\App; use Hdll\Services\V2\Common\Config\CfgCenter as CfgCenter2;
use Swoft\Redis\Redis;
class Xcrypt class Xcrypt
{ {
...@@ -39,7 +38,11 @@ class Xcrypt ...@@ -39,7 +38,11 @@ class Xcrypt
} }
private static function getKey(){ private static function getKey(){
if(class_exists('\Swoft\App')) {
$key = CfgCenter::getByOemId(CfgCenter::ENCRYPT_KEY, 0); $key = CfgCenter::getByOemId(CfgCenter::ENCRYPT_KEY, 0);
} else {
$key = CfgCenter2::getByOemId(CfgCenter::ENCRYPT_KEY, 0);
}
if (empty($key)){ if (empty($key)){
throw new \Exception('加密密钥获取失败!'); throw new \Exception('加密密钥获取失败!');
} }
......
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