10162 后台优化(特殊账号针对270服合服特殊处理;特殊账号查流向只查本服ID,目前已处理充值查询)
3个文件已修改
63 ■■■■■ 已修改文件
Account/User.php 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Server/eventdata/CTGOKSort.py 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SuperGMToolClient/QueryEventDataSend.php 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Account/User.php
@@ -400,12 +400,14 @@
    }
    //根据指定的spid获取对应服务器列表配置
    public function GetServersCfg($spid)
    public function GetServersCfg($spid, $checkSpecial = true)
    {
        $ConfigFile = dirname(__FILE__) . "\Server\Server_" . $spid . ".ini";
        if (file_exists($ConfigFile)) {
            $serversCfg = parse_ini_file($ConfigFile, true);
            if (!$checkSpecial) {
                return $serversCfg;
            }
            $UserAccount = $this->userData["UserAccount"];
            \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart);
            \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList);
@@ -442,11 +444,29 @@
            return $this->serversArray;
        }
        $spid = $this->GetSPID();
        $serversCfg = $this->GetServersCfg($spid);
        $serversCfg = $this->GetServersCfg($spid, false);
        if (!count($serversCfg)) {
            return $serversCfg;
        }
        $this->serversArray = $serversCfg;
        $UserAccount = $this->userData["UserAccount"];
        \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart);
        \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList);
        $SpecialAccountList = explode(",", $SpecialAccountList);
        $SpecialServerIDStart = intval($SpecialServerIDStart);
        $isSpecialUser = in_array($UserAccount, $SpecialAccountList);
        $specialServerID = 270; // 270服特殊处理,被合到270以前的服了
        $specialMainServerID = 0; // 特殊服所属主服
        if ($isSpecialUser) {
            foreach ($serversCfg as $info) {
                $ServerID = intval($info["ServerID"]);
                if ($ServerID == $specialServerID && $info["MainServer"]) {
                    $specialMainServerID = intval($info["MainServer"]);
                    break;
                }
            }
        }
        # 统计合服列表
        $mixServerArray = array();
@@ -462,6 +482,13 @@
                $mixServerArray[$mainServerID] = array("MixServerIDList" => array(), "MixServerStr" => "");
            }
            array_push($mixServerArray[$mainServerID]["MixServerIDList"], intval($serverInfo["ServerID"]));
        }
        if ($isSpecialUser) {
            if ($specialMainServerID) {
                // 特殊服只显示这两个服
                $mixServerArray[$specialMainServerID] = array("MixServerIDList" => array($specialMainServerID, $specialServerID), "MixServerStr" => "");
            }
        }
        # 翻译合服字符串信息
@@ -515,6 +542,16 @@
            $this->serversArray[$serverName]["MixServerIDList"] = $mixServerInfo["MixServerIDList"];
            $this->serversArray[$serverName]["MixServerStr"] = $mixServerInfo["MixServerStr"];
        }
        // 特殊账号,只能看指定服及以上
        if ($isSpecialUser) {
            foreach ($this->serversArray as $key => $info) {
                $serverID = intval($info["ServerID"]);
                if ($serverID < $SpecialServerIDStart && $serverID != $specialMainServerID) {
                    unset($this->serversArray[$key]);
                }
            }
        }
        return $this->serversArray;
    }
Server/eventdata/CTGOKSort.py
@@ -30,6 +30,7 @@
# 支付订单支持类型 1-人民币;2-美元;3-越南盾;4-soha币; 5-使用订单价值对应货币支付
DefaultOrderType = 1 # 默认人民币
PayByMoneyOrderTypeList = [5] # 使用游戏货币支付的订单类型
OnlyServerID = 0
class ValueObj():
    def __init__(self):
@@ -37,9 +38,12 @@
    
def getCTGOKSumInfo(argvDict):
    ## 统计所有玩家充值累加
    global OnlyServerID
    
    startDate = argvDict.get("startDate", "")
    endDate = argvDict.get("endDate", "")
    OnlyServerID = CommFunc.toInt(argvDict.get("OnlyServerID", "0"))
    logging.info("OnlyServerID:%s" % OnlyServerID)
    # 查询中心备份的
    if CommFunc.isQueryCenterbak(argvDict):
@@ -208,6 +212,12 @@
    sumInfoDict = showSumInfoDict[payOrderType]
    
    pkValue = drDict[PKKey]
    if OnlyServerID:
        serverID = CommFunc.getServerID(pkValue)
        if CommFunc.getServerID(pkValue) != OnlyServerID:
            # logging.info("OnlyServerID:%s, 不统计 %s" % (OnlyServerID, pkValue))
            return
    if pkValue not in sumInfoDict:
        sumInfoDict[pkValue] = ValueObj()
    vObj = sumInfoDict[pkValue]
SuperGMToolClient/QueryEventDataSend.php
@@ -61,6 +61,13 @@
    unset($pack_data["multiservers"]);
    unset($pack_data["server_select_all"]);
    $UserAccount = $_SESSION['UserAccount'];
    \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart);
    \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList);
    $SpecialAccountList = explode(",", $SpecialAccountList);
    $SpecialServerIDStart = intval($SpecialServerIDStart);
    $isSpecialUser = in_array($UserAccount, $SpecialAccountList);
    $pack_data["spID"] = $user->GetSPID();
    $pack_data["lang"] = \Lang\getLang();
    for ($i = 0; $i < count($sendServers); $i++) {
@@ -71,6 +78,9 @@
            $pack_data["mixServerIDInfo"] = $serversArray[$serverName]["ServerID"];
        }
        $pack_data["serverID"] = $serversArray[$serverName]["ServerID"];
        if ($isSpecialUser) { // 特殊账号默认只查本服ID
            $pack_data["OnlyServerID"] = $pack_data["serverID"];
        }
        $sendServers[$i][2] = $pack_data;
    }