Commit 94022ca0 by 王召彬

Merge branch 'ft-oem'

parents 1691554f 3455aa05
...@@ -15,6 +15,7 @@ class AuthEnum ...@@ -15,6 +15,7 @@ class AuthEnum
const SCOPE_AGENT = 2; // 店铺分销代理者 const SCOPE_AGENT = 2; // 店铺分销代理者
const SCOPE_SELLER = 3; //卖家 const SCOPE_SELLER = 3; //卖家
const SCOPE_OEMADM = 3.1; //oem管理员
const SCOPE_ADMIN = 4;//管理员 const SCOPE_ADMIN = 4;//管理员
const SCOPE_SUPER_ADMIN = 5; //超级管理员 const SCOPE_SUPER_ADMIN = 5; //超级管理员
...@@ -30,6 +31,7 @@ class AuthEnum ...@@ -30,6 +31,7 @@ class AuthEnum
const AUTH_TYPE_E_AND_S = 203; //选择授权(用户自己选择进行员工授权还是卖家授权) const AUTH_TYPE_E_AND_S = 203; //选择授权(用户自己选择进行员工授权还是卖家授权)
const AUTH_TYPE_BUYER = 204; //买家授权 const AUTH_TYPE_BUYER = 204; //买家授权
const AUTH_TYPE_OEMADM = 205; //oem管理员授权
......
...@@ -24,6 +24,7 @@ class CfgCenter ...@@ -24,6 +24,7 @@ class CfgCenter
const PAY_ZHIMEI = 'pay_zhimei'; //致美的支付配置 const PAY_ZHIMEI = 'pay_zhimei'; //致美的支付配置
const SELLER_DISTRIBUTION = 'seller_distribution'; //卖家分销配置 const SELLER_DISTRIBUTION = 'seller_distribution'; //卖家分销配置
const MP_ZHIMEI = 'mp_zhimei'; //致美的公众号配置 const MP_ZHIMEI = 'mp_zhimei'; //致美的公众号配置
const MP_OEMADM = 'mp_oemadm'; // OEM机构管理员公众号后台,使用云脉科技公众号
/** /**
* 根据用户token获取配置, 优先使用此方法读取配置 * 根据用户token获取配置, 优先使用此方法读取配置
...@@ -145,6 +146,26 @@ class CfgCenter ...@@ -145,6 +146,26 @@ class CfgCenter
return is_array($resArr) ? $resArr : $result['value']; return is_array($resArr) ? $resArr : $result['value'];
} }
/**
* 根据配置名称查询所有匹配项。包含所有oem机构的配置
*
* @param string $keyName
* @return array
*/
public static function getByKey(string $keyName)
{
$result = [];
$dbConn = self::dbConnect();//连接配置库
$rows = $dbConn->select("config", ['oemId', 'value'], ['name' => $keyName]);
foreach($rows as $row) {
$result[$row['oemId']] = [
'oemId' => $row['oemId'],
'value' => json_decode($row['value'], true),
];
}
return $result;
}
public static function dbConnect($database='') public static function dbConnect($database='')
{ {
if($database == '') { if($database == '') {
......
...@@ -27,7 +27,7 @@ use Swoft\Core\ResultInterface; ...@@ -27,7 +27,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferUpdateStore(int $storeId, array $data) * @method ResultInterface deferUpdateStore(int $storeId, array $data)
* @method ResultInterface deferAddVipTime(int $storeId, int $days) * @method ResultInterface deferAddVipTime(int $storeId, int $days)
* @method ResultInterface deferDeleteStore(int $storeId) * @method ResultInterface deferDeleteStore(int $storeId)
* @method ResultInterface deferGetStoreCount(int $startTime, int $endTime, $edition=null) * @method ResultInterface deferGetStoreCount(int $startTime, int $endTime, $edition=null, $oemId=0)
* @method ResultInterface deferGetWxacodeUrl(int $storeId, int $type, string $page, string $scene) * @method ResultInterface deferGetWxacodeUrl(int $storeId, int $type, string $page, string $scene)
*/ */
interface StoreInterface interface StoreInterface
...@@ -179,6 +179,6 @@ interface StoreInterface ...@@ -179,6 +179,6 @@ interface StoreInterface
* @param integer $edition * @param integer $edition
* @return integer * @return integer
*/ */
public function getStoreCount(int $startTime, int $endTime, $edition=null); public function getStoreCount(int $startTime, int $endTime, $edition=null, $oemId=0);
} }
\ 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