|
|
@@ -17,10 +17,24 @@ use SixShop\System\Trait\ConfigTrait;
|
|
|
* @property string $sub_appid 子商户公众账号ID
|
|
|
* @property string $receiver_agreement_file 默认合作协议文件
|
|
|
* @property string $random_discount_max 随机立减金额上限
|
|
|
+ * @property array{merchant_no:string,term_no:string}[] $sub_merchant_list 子商户列表
|
|
|
*/
|
|
|
class Config
|
|
|
{
|
|
|
- use ConfigTrait;
|
|
|
+ use ConfigTrait {
|
|
|
+ getConfig as traitGetConfig;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getConfig(string $key = null, mixed $default = null): mixed
|
|
|
+ {
|
|
|
+ if ($key == 'merchant_no') {
|
|
|
+ return $this->getConfig('sub_merchant_list')[0]['merchant_no'];
|
|
|
+ }
|
|
|
+ if ($key == 'term_no') {
|
|
|
+ return $this->getConfig('sub_merchant_list')[0]['term_no'];
|
|
|
+ }
|
|
|
+ return $this->traitGetConfig($key, $default);
|
|
|
+ }
|
|
|
|
|
|
public function getExtensionID(): string
|
|
|
{
|