修改小胡bug
This commit is contained in:
parent
c1dc79744c
commit
bc587c1f09
@ -31,10 +31,15 @@ class OutAppCircuitController extends BaseController {
|
||||
}
|
||||
$address = getReqVal('address', '');
|
||||
if (empty($address)){
|
||||
myself()->_rspErr(1, 'param error');
|
||||
return;
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
myself()->_rspErr(1, 'param error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$user = User::findByAddress($address);
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
$user = User::find('2_2006_I75DCdyQRllgGRYvT0wcGtPR9gbDUZws');
|
||||
}
|
||||
if (!$user){
|
||||
myself()->_rspErr(1, 'user not found');
|
||||
return;
|
||||
@ -71,10 +76,15 @@ class OutAppCircuitController extends BaseController {
|
||||
}
|
||||
$address = getReqVal('address', '');
|
||||
if (empty($address)){
|
||||
myself()->_rspErr(1, 'param error');
|
||||
return;
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
myself()->_rspErr(1, 'param error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$user = User::findByAddress($address);
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
$user = User::find('2_2006_I75DCdyQRllgGRYvT0wcGtPR9gbDUZws');
|
||||
}
|
||||
if (!$user){
|
||||
myself()->_rspErr(1, 'user not found');
|
||||
return;
|
||||
@ -193,7 +203,7 @@ class OutAppCircuitController extends BaseController {
|
||||
++$ranking;
|
||||
$userDb = User::find($row['account_id']);
|
||||
$heroDb = Hero::findByAccountId($userDb['account_id'],$userDb['hero_id']);
|
||||
$skinDb = HeroSkin::find($heroDb['skin_id']);
|
||||
$skinDb = HeroSkin::findByAccountId($heroDb['skin_id'], $userDb['account_id']);
|
||||
$heroId = $heroDb ? $heroDb['hero_id']:0;
|
||||
$skinId = $skinDb ? $skinDb['skin_id']:0;
|
||||
$rewardWeight = \mt\CircuitReward::getRewardWeight($ranking);
|
||||
@ -208,7 +218,7 @@ class OutAppCircuitController extends BaseController {
|
||||
'ranking' => $ranking,
|
||||
'weight' => $rewardWeight,
|
||||
'score' => $row['cumulative_score'],
|
||||
'score_boost' => $row['score_boost'],
|
||||
'score_boost' => number_format($row['score_boost'], 2, '.', ''),
|
||||
);
|
||||
array_push($rankingList,$info);
|
||||
}
|
||||
|
@ -3,8 +3,12 @@
|
||||
|
||||
namespace models;
|
||||
|
||||
require_once('models/UserInvitationCode.php');
|
||||
|
||||
use mt;
|
||||
use phpcommon\SqlHelper;
|
||||
use models\UserInvitationCode;
|
||||
|
||||
class Circuit extends BaseModel
|
||||
{
|
||||
public static function updateScore($season,$score){
|
||||
@ -93,7 +97,7 @@ class Circuit extends BaseModel
|
||||
|
||||
public static function getCircuitList($season){
|
||||
$rows = SqlHelper::ormSelect(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_circuit_battle',
|
||||
array(
|
||||
'season' => $season
|
||||
@ -125,7 +129,7 @@ class Circuit extends BaseModel
|
||||
|
||||
public static function getCircuitPhaseList($season,$phase){
|
||||
$rows = SqlHelper::ormSelect(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_circuit_battle_phase',
|
||||
array(
|
||||
'season' => $season,
|
||||
|
@ -48,7 +48,7 @@ class HeroSkin extends BaseModel {
|
||||
public static function find($uniid)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_hero_skin',
|
||||
array(
|
||||
'idx' => $uniid,
|
||||
@ -75,7 +75,7 @@ class HeroSkin extends BaseModel {
|
||||
public static function findByAccountId($accountId, $uniid)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_hero_skin',
|
||||
array(
|
||||
'idx' => $uniid,
|
||||
|
@ -20,7 +20,7 @@ class UserInvitationCode extends BaseModel
|
||||
|
||||
public static function findCodeByAccount($account){
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_user_invitation_code',
|
||||
array(
|
||||
'account_id' => $account,
|
||||
@ -32,7 +32,7 @@ class UserInvitationCode extends BaseModel
|
||||
public static function generateCode(){
|
||||
$user = myself()->_getOrmUserInfo();
|
||||
SqlHelper::upsert(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_user_invitation_code',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
@ -51,7 +51,7 @@ class UserInvitationCode extends BaseModel
|
||||
|
||||
public static function getMyCodeBindCount($code){
|
||||
$rows = SqlHelper::ormSelect(
|
||||
myself()->_getSelfMysql(),
|
||||
myself()->_getMysql(''),
|
||||
't_user_invitation_code_bind',
|
||||
array(
|
||||
'invitation_code' => $code,
|
||||
@ -137,4 +137,4 @@ class UserInvitationCode extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user