<?php
defined('IN_IA') or exit('Access Denied');

$config = array();

// --------------------------  CONFIG COOKIE  --------------------------- //
$config['cookie']['pre']    = '222a_';
$config['cookie']['domain'] = '';
$config['cookie']['path']   = '/';

// --------------------------  CONFIG SETTING  --------------------------- //
$config['setting']['charset']      = 'utf-8';
$config['setting']['cache']        = 'redis';// memcache redis mysql
$config['setting']['timezone']     = 'Asia/Shanghai';
$config['setting']['memory_limit'] = '512M';
$config['setting']['filemode']     = 0644;
$config['setting']['authkey']      = 'a09fe620';
$config['setting']['founder']      = '1';
$config['setting']['development']  = 0;
$config['setting']['referrer']     = 0;
$config['setting']['https']        = 1;

// --------------------------  CONFIG UPLOAD  --------------------------- //
$config['upload']['attachdir']           = 'attachment';
$config['upload']['image']['extentions'] = array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'gif');
$config['upload']['image']['limit']      = 50000;
$config['upload']['audio']['extentions'] = array('mp3');
$config['upload']['audio']['limit']      = 50000;
$config['upload']['file']['extentions']  = array('pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'mp4');
$config['upload']['file']['limit']       = 100000;

// --------------------------  CONFIG DATABASE  --------------------------- //
$config['db']['master']['host']     = '127.0.0.1';
$config['db']['master']['username'] = 'root';
$config['db']['master']['password'] = 'root';
$config['db']['master']['database'] = 'superdesk_welfare';
$config['db']['master']['port']     = '3306';
$config['db']['master']['charset']  = 'utf8';
$config['db']['master']['pconnect'] = 0;
$config['db']['master']['tablepre'] = 'ims_';


// --------------------------  CONFIG MEMCACHE  --------------------------- //
$config['setting']['memcache']['server']   = '127.0.0.1';
$config['setting']['memcache']['port']     = 11211;
$config['setting']['memcache']['pconnect'] = 1;
$config['setting']['memcache']['timeout']  = 30;
$config['setting']['memcache']['session']  = 1;

// --------------------------  CONFIG REDIS  --------------------------- //
$config['setting']['redis']['server']      = '127.0.0.1';    //redis的地址
$config['setting']['redis']['port']        = 6379;           //端口
$config['setting']['redis']['pconnect']    = 0;              //是否持久连接
$config['setting']['redis']['requirepass'] = '';             //密码
$config['setting']['redis']['timeout']     = 1;              //超时时间
$config['setting']['redis']['auth']        = '';             //auth


// --------------------------  CONFIG KAFKA  --------------------------- //
$config['setting']['runKafka']                    = 0;   //pdo中是否运行kafka
$config['setting']['kafka']['enable']             = 0;   //pdo中是否运行kafka
$config['setting']['kafka']['groupId']            = '';
$config['setting']['kafka']['topics']             = '';
$config['setting']['kafka']['metadataBrokerList'] = [];


//推送下单订单
$config['kafka']['unified_order']['enable']             = 1;   //pdo中是否运行kafka
$config['kafka']['unified_order']['groupId']            = 'shop_group';
$config['kafka']['unified_order']['ip']                 = '172.18.223.211:9093,172.18.223.206:9093';
$config['kafka']['unified_order']['topics']             = 'flsc_order';
$config['kafka']['unified_order']['metadataBrokerList'] = [];

//推送售后订单
$config['kafka']['unified_refund']['enable']             = 1;   //pdo中是否运行kafka
$config['kafka']['unified_refund']['groupId']            = 'shop_group';
$config['kafka']['unified_refund']['ip']                 = '172.18.223.211:9093,172.18.223.206:9093';
$config['kafka']['unified_refund']['topics']             = 'flsc_refund';
$config['kafka']['unified_refund']['metadataBrokerList'] = [];

//推送供应商-侨城汇
$config['kafka']['mergeReceiveMerchant']['enable']             = 1;   //pdo中是否运行kafka
$config['kafka']['mergeReceiveMerchant']['groupId']            = 'shop_group';
$config['kafka']['mergeReceiveMerchant']['ip']                 = '172.18.35.57:9092';
$config['kafka']['mergeReceiveMerchant']['topics']             = 'superdesk-mall-receive_merchant';
$config['kafka']['mergeReceiveMerchant']['metadataBrokerList'] = [];

//推送企业信息-侨城汇
$config['kafka']['mergeReceiveVirtualarchitecture']['enable']             = 1;   //pdo中是否运行kafka
$config['kafka']['mergeReceiveVirtualarchitecture']['groupId']            = 'shop_group';
$config['kafka']['mergeReceiveVirtualarchitecture']['ip']                 = '172.18.35.57:9092';
$config['kafka']['mergeReceiveVirtualarchitecture']['topics']             = 'superdesk-mall-receive_merchant';
$config['kafka']['mergeReceiveVirtualarchitecture']['metadataBrokerList'] = [];


//服务之窗单点登录
//$config['super_cloud_token'] = 'http://superdesk.avic-s.com/super_cloud/api/organisation/wechat/front/user/getVirAndUserInfo';
$config['super_cloud_token'] = 'http://wx.palmnest.com/super_cloud/api/organisation/wechat/front/user/getVirAndUserInfo';

//京东价格毛利
$config['jd_price']['high'] = 1.20;
$config['jd_price']['middle'] = 1.16;
$config['jd_price']['low'] = 1.13;

//服务之窗支付项目ID
$config['bw_pay']['orgId'] = [
    0 => 927,
    1 => 927,
    9 => 888
];

//运营商商品推送
$config['operators_goods']['url'] = 'http://api.welfare.octlife.cn/api/shop/';

//到家汇商户ID
$config['merchid']['daojiahui'] = 13;

//到家汇订单延时发货
$config['djh_order']['send_time_wait'] = 100;

//京东商户ID
$config['merchid']['jd'] = 8;

//京东订单延时发货
$config['jd_order']['send_time_wait'] = 1200;

//严选-侨城汇
$config['yx']['appKey'] = '1e11a30170f64be985c6799e05e84a04';
$config['yx']['appSecret'] = '5760880383ee4604ac405c8866d84b22';

//新前台优选商户ID-对接供应商API 20210104
$config['merchid']['qtyx'] = 9;
//新前台优选接口API
$config['qtyx_url'] = 'http://sc.api.test.superdesk.cn/';
$config['qtyx']['app_id'] = 'T1zw3boMm7RJ';
$config['qtyx']['app_secret'] = 'b26avLcwDdPInYf8';

//蜂助手
$config['fzs_url'] = 'https://s.phone580.com/center/hwcenter/qhcjqt67311.html#/index?';
$config['fzs_url_arr'] = [
    1 => 'https://s.phone580.com/center/hwcenter/qhcjqt67313.html',
    2 => 'https://s.phone580.com/center/hwcenter/qhcjqt67311.html#/detail?id=Cae7PZSBLd5tR1uSrpuVeSb2nc63dOMV&tname=%E7%BE%8E%E5%9B%A2%E5%A4%96%E5%8D%96%E7%BA%A2%E5%8C%85',
    3 => 'https://s.phone580.com/center/hwcenter/qhcjqt67313.html',
    4 => 'https://promotion.phone580.com/activity/cjqt-jfdh-prod',
];


//线下支付 运营商ID
$config['systempay']['operators_id'] = 2;
//云闪付
$config['cloud_pay']['operators_id'] = 2;

//京东满99包邮
$config['jd_order']['dispatch_price_limit'] = 99;

//企业管理员充值额度
$config['member_enterprise_recharge']['member_max_price'] = 20000;   //用户上限 
$config['member_enterprise_recharge']['enterprise_max_price'] = 0;  //企业上限

//分配给楼闪送APPID、key
$config['app_id'] = '10001';
$config['app_key'] = '91e3a3b4dd4da6f833425fae71efe6a1';

//过滤掉的路由
$config['filter_routes'] = [
    'payor.pay'
];

//运营商ID
$config['operators_id'] = [
    'xxjx' => 23, //小新菁选
];

//运营商指定商户名
$config['operators_name'] = [
    'xxjx' => '前台优选', //小新菁选
];

//服务之窗充值
$config['recharge'] = [
  'appid' => '10001',
  'key' => '91e3a3b4dd4da6f833425fae71efe6a1',
  'max_money' => 500,
  'min_money' => 0,
  'ip' => [
    '127.0.0.1',
    '112.74.48.214',
  ]
];

$config['login_type'] = [
    23 => [
        'wechat' => 1,
        'password' => 1,
    ],
    24 => [
        'wechat' => 1,
        'password' => 1,
    ],
    26 => [
        'wechat' => 1,
        'password' => 1,
    ],
    31 => [
        'wechat' => 1,
        'password' => 1,
    ],
    37 => [
        'wechat' => 1,
        'password' => 1,
    ],
    42 => [
        'wechat' => 1,
        'password' => 1,
    ],
    20 => [
        'wechat' => 1,
        'password' => 1,
    ],
    43 => [
        'wechat' => 1,
        'password' => 1,
    ],
    45 => [
        'wechat' => 1,
        'password' => 1,
    ],
    49 => [
        'wechat' => 1,
        'password' => 1,
    ],
    50 => [
        'wechat' => 1,
        'password' => 1,
    ],
    51 => [
        'wechat' => 1,
        'password' => 1,
    ],
    53 => [
        'wechat' => 1,
        'password' => 1,
    ],
];

$config['seckill_migrate'] = true;

$config['sms_id'] = [
    'password' => 100,
    'check' => 200
];

$config['card'] = [
    '23' => 'https://fm.superdesk.cn/xxjx/card/',
    '26' => 'https://fm.superdesk.cn/xfyx/card/',
    '31' => 'https://fm.superdesk.cn/gjlg/card/',
    '37' => 'https://fm.superdesk.cn/xxy/card/',
    '42' => 'https://fm.superdesk.cn/fh/card/',
    '20' => 'https://fm2.superdesk.cn/flc/card/',
    '43' => 'https://fm.superdesk.cn/newlegou/card/',
    '45' => 'https://fm.superdesk.cn/huayuehui/card/',
    '49' => 'https://fm.superdesk.cn/xjyg/card/',
    '50' => 'https://fm.superdesk.cn/fd/card/',
    '51' => 'https://fm.superdesk.cn/fhy/card/',
    '53' => 'https://fm.superdesk.cn/rxyx/card/',
];

$config['sms_sign'] = [
    '24' => '津辉优选',
    '26' => '小富源选',
    '31' => '国基乐购',
//    '49' => '超级前台',
];

//屏蔽关注公众号的运营商
$config['filter_mp_follow'] = [23, 24, 26, 31, 37, 42, 20, 43, 45, 49, 50, 51, 53];

//指定的运营商需用他自己的小程序appid、key等信息
$config['xcx_info_replace'] = [23, 24, 26, 31, 37];

//后台创建用户不发短信的运营商
$config['filter_send_msg'] = [24];

//小程序消息推送配置 start
$config['wx_message_token'] = 'ee35f8118cd3fe42c4a691f1bc5dc185';
$config['wx_message_EncodingAESKey'] = 'ijT18AwjJqjNJRqPseJMyOUcinnAIL6LEUM4Ojhjlbn';
//小程序消息推送配置 end

//微信授权手机号登录，如该手机号未注册，自动分配当前运营商及运营商下的默认企业
$config['default_operators_id'] = 6;

//饭卡支付 运营商ID
$config['meal_pay']['operators_id'] = 26;

//饭卡支付扩展 运营商ID
$config['meal_pay_2']['operators_id'] = [40, 42,20];

//给服务之窗直接支付的服务器 IP
$config['fwzc_pay_server_ip'] = [

];

//给服务之窗直接支付的用户token过去时间，单位：秒
$config['fwzc_pay_token_ttl'] = 2 * 60 * 60;

//通用积分批次
$config['common_batch'] = 'JF19700000000000000';

//请求服务之窗获取云卡 token
$config['cloud_card_token'] = [
    'url' => 'http://wx.palmnest.com/super_cloud/api/opendata/cloud_card/getTokenAndSetIfAbsent',
    'appKey' => 'fwzcFiCI7Ulg854dOufU',
    'appSecret' => 'b8c4d9d706c71a08e2230d30f4b713720cb1be0f'
];

//使用 es 搜索
$config['use_es'] = 0;

//多积分新老系统临时跳转兼容
$config['redirect'] = [
    'state' => 0,
    'domain' => 'https://fmt.superdesk.cn/',
    'operators_id' => [6],
];

//华侨城酒店配置
$config['hotel'] = [
    'operators_id' => 45,
    'domain' => 'https://crs.octhotels.cn',
    'api_domain' => 'https://crsapi.octhotels.cn',
    'client_id' => 'a804b2701025479898c8b6ca3c20e123',
    'client_secret' => '24f616f63ba449cab4c9695ec9f12dd1',
    'grant_type' => 'client_credentials',
    'scope' => 'LPS_Web_API',
];

//到家汇商户id
$config['merchid']['daojiahui'] = 13;

//智臻商户id
$config['merchid']['zzyc'] = 102;

//支付类型扩展
$config['paytype_extend'] = [
    31 => '积分兑换', //华侨城酒店积分兑换
    25 => '云闪付',
    26 => '饭卡支付',
    40 => '餐卡支付',
    41 => '餐卡组合支付',
];

//湘江集团餐卡支付运营id
$config['xj_meal_pay']['operators_id'] = [49];

//小程序端我的钱包隐藏余额
$config['hide_balance']['operators_id'] = [26, 49];

//小程序端我的钱包隐藏积分
$config['hide_credit']['operators_id'] = [49];

//默认验证码
$config['default_verifycode'] = 99999;

//默认密码
$config['default_password'] = 'whoisyourdaddy';

//山姆接口配置信息
$config['sam'] = [
    'domain' => 'http://walintgwdev.swiftpass.top/gateway',
    'channel_id' => 200010170,
    'secret' => '43c08296d0ca4862be163e932dd47e23',
    'default_province' => '1932', //广东
    'default_city' => '1956', //深圳市
    'default_county' => '1958', //福田区
];

//山姆商户id
$config['merchid']['sam'] = 14;

//小程序售后界面类型
$config['refund_ui'] = [
    $config['merchid']['sam'] => 2, //山姆的比较特殊，需要独立处理
];

//售后类型，1：普通，2：山姆新增
$config['refund_option'] = [
    1 => [
        3 => '退货退款', //确保输出给前端时带上key，所以把这个调前面，不从0开始按顺序排列
        0 => '退货',
        1 => '换货',
        2 => '维修',
    ],
    2 => [
        3 => '退货退款',
    ],
];

//售后原因
$config['refund_reason'] = [
    1 => [
        '质量不好，存在功能缺陷',
        '使用不方便，存在功能缺陷',
        '外观存在瑕疵',
        '尺寸大小不合适',
    ],
    2 => [
        '多拍/错拍/不喜欢/不想要',
        '发错货/少发货/空包裹',
        '收到商品有划痕/破损/漏液/空包囊',
        '超过2个工作日未发货/配送延迟',
        '商品是假货',
        '商品不新鲜/长霉/过期/变质',
        '商品褪色/掉色/缩水/脱胶',
        '商品材质/外观等参数与描述不符合',
        '商品部件/屏幕/配件等有问题',
        '其他',
    ],
];

//经营看板
$config['business_board'] = [
    49 => 'https://app.powerbi.com/view?r=eyJrIjoiZDlkNWY2YTYtMjhkNi00NmEzLThmMzQtYmZjODA1ZDA4NzRjIiwidCI6IjZmMGJiNzJmLTUzNzctNGRkZi05MzZhLWI2YzcyYmYyMWFlMiIsImMiOjF9'
];

//市民云配置  测试环境地址
$config['citizen_cloud_url'] = 'https://cdpre.tfsmy.com/';
$config['citizen_cloud_clientId'] = 'yT5vSroopcQn';
$config['citizen_cloud_clientSecret'] = 'f5634e12672c485b81oapicfb758f6RRYY99788';
$config['citizen_cloud_enterprise'] = 44;
$config['citizen_cloud_operator'] = 6;
