当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_Common::getUserDataPositionById方法代码示例

本文整理汇总了PHP中Base_Common::getUserDataPositionById方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_Common::getUserDataPositionById方法的具体用法?PHP Base_Common::getUserDataPositionById怎么用?PHP Base_Common::getUserDataPositionById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_Common的用法示例。


在下文中一共展示了Base_Common::getUserDataPositionById方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPayDetailCount

 public function getPayDetailCount($StartTime, $EndTime, $UserId, $oWherePartnerPermission, $PassageId)
 {
     //查询列
     $select_fields = array('OrderCount' => 'count(*)');
     //分类统计列
     //初始化查询条件
     $whereStartTime = $StartTime ? " PayTime >= " . strtotime($StartTime) . " " : "";
     $whereEndTime = $EndTime ? " PayTime <= " . strtotime($EndTime) . " " : "";
     $whereUser = $UserId ? " AcceptUserId = " . $UserId . " " : "";
     $wherePassage = $PassageId ? " PassageId = " . $PassageId . " " : "";
     $whereCondition = array($whereUser, $whereStartTime, $whereEndTime, $oWherePartnerPermission, $wherePassage);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     if ($UserId) {
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Widget::getDbTable($this->table_user) . "_" . $position['db_fix'];
     } else {
         $Date = date("Ym", strtotime($StartTime));
         $table_to_process = Base_Widget::getDbTable($this->table_date) . "_" . $Date;
     }
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $PayCount = $this->db->getOne($sql, false);
     if ($PayCount) {
         return $PayCount;
     } else {
         return 0;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:30,代码来源:Pay.php

示例2: InsertCharacterKickOff

 public function InsertCharacterKickOff($KickOffArr)
 {
     $this->db->begin();
     $position = Base_Common::getUserDataPositionById($KickOffArr['UserId']);
     $table_user = Base_Common::getUserTable($this->character_kick_off, $position);
     $user = $this->db->insert($table_user, $KickOffArr);
     $Date = date("Ym", $KickOffArr['KickOffTime']);
     $table_date = $this->CreateCharacterKickOffLog($Date);
     $oSocketType = @(include __APP_ROOT_DIR__ . "/etc/SocketType.php");
     $oSocketQueue = new Config_SocketQueue();
     $uType = 60221;
     $TypeInfo = $oSocketType[$uType];
     if ($TypeInfo['Type']) {
         $DataArr = array('PackFormat' => $TypeInfo['PackFormat'], 'Length' => $TypeInfo['Length'], 'Length2' => 0, 'uType' => $uType, 'MsgLevel' => 0, 'Line' => 0, 'UserID' => $KickOffArr['UserId'], 'KickOffReason' => $KickOffArr['KickOffReason'], 'Serial' => $KickOffArr['KickOffId']);
     }
     $DataArr = array('ServerId' => $KickOffArr['ServerId'], 'uType' => $uType, 'UserId' => $DataArr['UserID'], 'MessegeContent' => serialize($DataArr), 'QueueTime' => time(), 'SendTime' => 0);
     $addQueue = $oSocketQueue->insert($DataArr);
     $log = $this->db->insert($table_date, $KickOffArr);
     if ($user && $log && $addQueue) {
         $this->db->commit();
         return true;
     } else {
         $this->db->rollBack();
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:26,代码来源:User.php

示例3: UserLoginSumDate

 public function UserLoginSumDate($UserId, $oWherePartnerPermission)
 {
     //初始化查询条件
     $whereCondition = array($oWherePartnerPermission);
     $where = Base_common::getSqlWhere($whereCondition);
     $position = Base_Common::getUserDataPositionById($UserId);
     $table_to_process = Base_Widget::getDbTable($this->table_user) . "_" . $position['db_fix'];
     $sql = "SELECT sum(`LogoutTime`-`LoginTime`) as `LoingTime` FROM {$table_to_process} WHERE `UserId` = {$UserId} and `LogoutTime` > 0 and `LogoutTime` > `LoginTime` " . $where;
     return $this->db->getOne($sql, false);
 }
开发者ID:eappl,项目名称:prototype,代码行数:10,代码来源:Login.php

示例4: getItemPickUpCount

 public function getItemPickUpCount($StartTime, $EndTime, $UserId, $ServerId, $oWherePartnerPermission, $ItemListText)
 {
     //查询列
     $select_fields = array('PickUpCount' => 'count(*)');
     //初始化查询条件
     $whereStartTime = $StartTime ? " ItemPickUpTime >= '" . strtotime($StartTime) . "' " : "";
     $whereEndTime = $EndTime ? " ItemPickUpTime <= '" . strtotime($EndTime) . "' " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $whereItemID = $ItemListText ? " ItemID in ( " . $ItemListText . " )" : "";
     $whereUser = $UserId ? " UserId = " . $UserId . " " : "";
     $whereCondition = array($whereStartTime, $whereEndTime, $whereUser, $whereServer, $oWherePartnerPermission, $whereItemID);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     if ($UserId) {
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Common::getUserTable($this->table_list['pickitem_user'], $position);
     } else {
         $Date = date("Ymd", strtotime($StartTime));
         $table_to_process = Base_Widget::getDbTable($this->table_list['pickitem']) . "_" . $Date;
     }
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $PickUpCount = $this->db->getOne($sql, false);
     if ($PickUpCount) {
         return $PickUpCount;
     } else {
         return 0;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:30,代码来源:Item.php

示例5: getPvpLogTotal

 public function getPvpLogTotal($whereTime)
 {
     $table_to_process = Base_Widget::getDbTable($this->table_pvp_log_total);
     $sql = "truncate {$table_to_process}";
     $this->db->query($sql);
     for ($i = 0; $i <= 255; $i++) {
         $position = Base_Common::getUserDataPositionById(sprintf("%03d", $i));
         $table_to_get = Base_Common::getUserTable($this->table_pvp_log_user, $position);
         $sql = "replace into {$table_to_process} (ServerId,UserId,Won,PvpCount) select ServerId,UserId,Won,Count(*) from {$table_to_get} where {$whereTime} group by ServerId,UserId,Won";
         echo $this->db->query($sql) . "-";
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:12,代码来源:Task.php

示例6: getUserExchangeCount

 public function getUserExchangeCount($UserId, $AppId, $PartnerId, $ServerId, $StartDate, $EndDate, $ExchangeStatus)
 {
     //查询列
     $select_fields = array('ExchangeCount' => 'count(*)');
     //初始化查询条件
     $whereStartDate = $StartDate ? " CreateExchangeTime >= " . strtotime($StartDate) . " " : "";
     $whereEndDate = $EndDate ? " CreateExchangeTime <= " . (strtotime($EndDate) + 86400 - 1) . " " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $wherePartner = $PartnerId ? " PartnerId = " . $PartnerId . " " : "";
     $whereApp = $AppId ? " AppId = " . $AppId . " " : "";
     $whereUser = $UserId ? " UserId = " . $UserId . " " : "";
     $whereCondition = array($whereStartDate, $whereEndDate, $whereServer, $wherePartner, $whereApp, $whereUser);
     if ($ExchangeStatus == 0) {
         //进行中
         $table_to_process = Base_Widget::getDbTable($this->table_exchange_queue);
     } elseif ($ExchangeStatus == 1) {
         //已成功
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Widget::getDbTable($this->table_user) . "_user_" . $position['db_fix'];
     } else {
         //已失败
         $table_to_process = Base_Widget::getDbTable($this->table_exchange_queue_error);
     }
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     $StatArr = array('ExchangeCount' => 0);
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $ExchangeCount = $this->db->getRow($sql, false);
     if (isset($ExchangeCount)) {
         $StatArr['ExchangeCount'] += $ExchangeCount['ExchangeCount'];
     }
     return $StatArr;
 }
开发者ID:eappl,项目名称:prototype,代码行数:35,代码来源:Exchange.php

示例7: getNpcItemPurchaseDetailCount

 public function getNpcItemPurchaseDetailCount($StartTime, $EndTime, $UserId, $ServerId, $MoneyType, $oWherePartnerPermission, $ItemListText)
 {
     //查询列
     $select_fields = array('PurchaseCount' => 'count(*)');
     //初始化查询条件
     $whereStartTime = $StartTime ? " NpcPurchaseTime >= '" . strtotime($StartTime) . "' " : "";
     $whereEndTime = $EndTime ? " NpcPurchaseTime <= '" . strtotime($EndTime) . "' " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $whereItemID = $ItemListText ? " ItemID in ( " . $ItemListText . " )" : "";
     $whereUser = $UserId ? " UserId = " . $UserId . " " : "";
     $whereMoney = $MoneyType ? " MoneyType = " . $MoneyType . " " : "";
     $groups = Base_common::getGroupBy($group_fields);
     $whereCondition = array($whereStartTime, $whereEndTime, $whereUser, $whereMoney, $whereServer, $oWherePartnerPermission, $whereItemID);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     if ($UserId) {
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Widget::getDbTable($this->table_npc_item_purchase) . "_user_" . $position['db_fix'];
     } else {
         $Date = date("Ym", strtotime($StartTime));
         $table_to_process = Base_Widget::getDbTable($this->table_npc_item_purchase) . "_" . $Date;
     }
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $PurchaseCount = $this->db->getOne($sql, false);
     if ($PurchaseCount) {
         return $PurchaseCount;
     } else {
         return 0;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:32,代码来源:Purchase.php

示例8: asignProductPackCode

 public function asignProductPackCode($UserName, $unsignedCode)
 {
     $oUser = new Lm_User();
     $UserInfo = $oUser->getUserByName($UserName);
     if ($UserInfo['UserId']) {
         if ($unsignedCode['ProductPackCode']) {
             $PackInfo = $this->getRow($unsignedCode['ProductPackId']);
             $CodeCount = $this->getUserProductPackCodeListCount($UserInfo['UserId'], 0, 0, $unsignedCode['GenId']);
             if ($CodeCount < $PackInfo['AsignCountLimit']) {
                 $this->db->begin();
                 $unsignedCode['AsignTime'] = time();
                 $unsignedCode['AsignUser'] = $UserInfo['UserId'];
                 $position = Base_Common::getUserDataPositionById($UserInfo['UserId']);
                 $table_user = Base_Common::getUserTable($this->table_code, $position);
                 $user = $this->db->replace($table_user, $unsignedCode);
                 $table_code = Base_Widget::getDbTable($this->table_code);
                 $bind = $unsignedCode;
                 unset($bind['ProductPackCode']);
                 $code = $this->db->update($table_code, $bind, '`ProductPackCode` = ?', $unsignedCode['ProductPackCode']);
                 if ($code && $user) {
                     $this->db->commit();
                     return true;
                 } else {
                     $this->db->rollback();
                     return false;
                 }
             } else {
                 return false;
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:36,代码来源:Pack.php

示例9: getUserOrderCount

 public function getUserOrderCount($UserId, $AppId, $PartnerId, $ServerId, $StartDate, $EndDate, $OrderStatus)
 {
     //查询列
     $select_fields = array('OrderCount' => 'count(*)');
     //分类统计列
     //初始化查询条件
     $whereStartDate = $StartDate ? " OrderTime >= " . strtotime($StartDate) . " " : "";
     $whereEndDate = $EndDate ? " OrderTime <= " . (strtotime($EndDate) + 86400 - 1) . " " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $wherePartner = $PartnerId ? " PartnerId = " . $PartnerId . " " : "";
     $whereApp = $AppId ? " AppId = " . $AppId . " " : "";
     $whereStatus = $OrderStatus != 5 ? " OrderStatus = " . $OrderStatus . " " : "";
     $whereUser = $UserId ? " AcceptUserId = " . $UserId . " " : "";
     $whereCondition = array($whereStartDate, $whereEndDate, $whereStatus, $whereServer, $wherePartner, $whereApp, $whereUser);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     $StatArr = array('OrderCount' => 0);
     $position = Base_Common::getUserDataPositionById($UserId);
     $table_name = Base_Widget::getDbTable($this->table_user) . "_" . $position['db_fix'];
     $sql = "SELECT {$fields} FROM {$table_name} as log where 1 " . $where;
     $OrderCount = $this->db->getRow($sql, false);
     if (isset($OrderCount)) {
         $StatArr['OrderCount'] += $OrderCount['OrderCount'];
     }
     return $StatArr;
 }
开发者ID:032404cxd,项目名称:prototype_main,代码行数:28,代码来源:Order.php

示例10: getSendErrorList

 public function getSendErrorList($UserId, $SendId, $fields = '*')
 {
     $position = Base_Common::getUserDataPositionById($UserId);
     $table_user = Base_Common::getUserTable($this->table_send_log_user, $position);
     $sql = "select {$fields} from {$table_user} where `SendStatus` = 2 and `UserId` = ? and `SendId` = ?";
     return $this->db->getAll($sql, array($UserId, $SendId));
 }
开发者ID:eappl,项目名称:prototype,代码行数:7,代码来源:Character.php

示例11: getSlkDetailCount

 public function getSlkDetailCount($StartTime, $EndTime, $UserId, $InstMapId, $HeroId, $ServerId, $oWherePartnerPermission)
 {
     //查询列
     $select_fields = array('SlkCount' => 'count(*)');
     //分类统计列
     //初始化查询条件
     $whereStartTime = $StartTime ? " CharacterSlkEnterTime >= " . strtotime($StartTime) . " " : "";
     $whereEndTime = $EndTime ? " CharacterSlkEnterTime <= " . strtotime($EndTime) . " " : "";
     $whereUser = $UserId ? " UserId = " . $UserId . " " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $whereInstMap = $InstMapId ? " SlkId = " . $InstMapId . " " : "";
     $whereHero = $HeroId != -1 ? " HeroId = " . $HeroId . " " : "";
     $whereCondition = array($whereUser, $whereStartTime, $whereEndTime, $whereServer, $whereInstMap, $whereHero, $oWherePartnerPermission);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     if ($UserId) {
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Widget::getDbTable($this->table) . "_user_" . $position['db_fix'];
     } else {
         $Date = date("Ym", strtotime($StartTime));
         $table_to_process = Base_Widget::getDbTable($this->table) . "_" . $Date;
     }
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $SlkCount = $this->db->getOne($sql, false);
     if ($SlkCount) {
         return $SlkCount;
     } else {
         return 0;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:32,代码来源:Task.php


注:本文中的Base_Common::getUserDataPositionById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。