<?php
//初始化开通付费帐号的经纪人
$conf_basedir = "../../../"; //相对主目录的位置
$conf_where = "admin"; //选择调用相应模块
$directory = basename(dirname(__FILE__)); //定义当前所在的目录，引入模块公用函数
include_once($conf_basedir . "base.inc.php");
include_once WEB_MODULE . '/growth/base.inc.php';

$growthBrokerPayAccount = new GrowthBrokerPayAccount();

$dbback = Container::getInstance()->get('dbback');

$sql = SqlCombinHelper::select_sql('broker', 'uid', 'is_pay = 0');

$arrBrokerUid = $dbback->getAll($sql);



if ($arrBrokerUid) {
    $payAccount = array();
    foreach($arrBrokerUid as $v) {
        $payAccount[] = array(
            'broker_id' => $v['uid'],
            'get_credit' => 1,
            'get_exp' => 1,
         );
    }
    $effectRows = $growthBrokerPayAccount->insertMutl($payAccount);
    echo "共执行了{$effectRows}条数据";
}
