setConfig($data, '畅捷支付配置', 1, $where); } /** * Common: 获取主要设置项 * Author: wu-hui * Time: 2024/07/22 9:24 * @param int $siteId * @param string $appModule * @return array|mixed */ public function getConfig($siteId = 0, $appModule = 'shop'){ $where = [ ['site_id','=',$siteId], ['app_module','=',$appModule], ['config_key','=','CY_PAY_CONFIG'] ]; $config = (new ConfigModel())->getConfig($where); $data = $config['data'] ?? []; return $data['value'] ?? []; } /** * 获取支付配置 */ public function getPayConfig($site_id = 0, $app_module = 'shop') { $config = new ConfigModel(); $res = $config->getConfig([['site_id', '=', $site_id], ['app_module', '=', $app_module], ['config_key', '=', 'CY_PAY_CONFIG']]); if (empty($res['data']['value'])) { $res['data']['value'] = [ 'refund_status' => 0, 'wechatpay' => 0, 'alipay' => 0, 'is_isp' => 0, 'cj_public_key' => '', 'private_key' => '', 'mch_id' => '', ]; } return $res; } }