1
This commit is contained in:
parent
94336932c0
commit
a0cb91a85c
@ -222,7 +222,7 @@ class OutAppCircuitController extends BaseController {
|
|||||||
|
|
||||||
private function _extractRankingInfo($data)
|
private function _extractRankingInfo($data)
|
||||||
{
|
{
|
||||||
return myself()->_callServiceStatic('CircuitRankingService', 'extractRankingInfo');
|
return myself()->_callServiceStatic('CircuitRankingService', 'extractRankingInfo', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _extractRankingInfoOld($data){
|
private function _extractRankingInfoOld($data){
|
||||||
|
@ -2,11 +2,18 @@
|
|||||||
|
|
||||||
namespace services;
|
namespace services;
|
||||||
|
|
||||||
|
require_once('models/User.php');
|
||||||
|
require_once('models/Hero.php');
|
||||||
|
require_once('models/HeroSkin.php');
|
||||||
|
|
||||||
require_once('mt/CircuitTime.php');
|
require_once('mt/CircuitTime.php');
|
||||||
require_once('mt/CircuitTime.php');
|
require_once('mt/CircuitTime.php');
|
||||||
|
|
||||||
use mt;
|
use mt;
|
||||||
use phpcommon\SqlHelper;
|
use phpcommon\SqlHelper;
|
||||||
|
use models\User;
|
||||||
|
use models\Hero;
|
||||||
|
use models\HeroSkin;
|
||||||
|
|
||||||
class CircuitRankingService extends BaseService {
|
class CircuitRankingService extends BaseService {
|
||||||
|
|
||||||
@ -123,6 +130,16 @@ class CircuitRankingService extends BaseService {
|
|||||||
$heroId = 0;
|
$heroId = 0;
|
||||||
$skinId = 0;
|
$skinId = 0;
|
||||||
if ($data['is_android']) {
|
if ($data['is_android']) {
|
||||||
|
$robotMeta = myself()->_callMtStatic('Robot', 'get', $row['account_id']);
|
||||||
|
$userDb = array(
|
||||||
|
'account_id' => $row['account_id'],
|
||||||
|
'name' => $robotMeta['name'],
|
||||||
|
);
|
||||||
|
$heroDb = array(
|
||||||
|
|
||||||
|
);
|
||||||
|
$heroId = $heroDb ? $heroDb['hero_id']:0;
|
||||||
|
$skinId = $skinDb ? $skinDb['skin_id']:0;
|
||||||
} else {
|
} else {
|
||||||
$userDb = User::find($row['account_id']);
|
$userDb = User::find($row['account_id']);
|
||||||
$heroDb = Hero::findByAccountId($userDb['account_id'],$userDb['hero_id']);
|
$heroDb = Hero::findByAccountId($userDb['account_id'],$userDb['hero_id']);
|
||||||
@ -130,6 +147,7 @@ class CircuitRankingService extends BaseService {
|
|||||||
$heroId = $heroDb ? $heroDb['hero_id']:0;
|
$heroId = $heroDb ? $heroDb['hero_id']:0;
|
||||||
$skinId = $skinDb ? $skinDb['skin_id']:0;
|
$skinId = $skinDb ? $skinDb['skin_id']:0;
|
||||||
}
|
}
|
||||||
|
error_log(json_encode($row));
|
||||||
$rewardWeight = \mt\CircuitReward::getRewardWeight($ranking);
|
$rewardWeight = \mt\CircuitReward::getRewardWeight($ranking);
|
||||||
if ($userDb){
|
if ($userDb){
|
||||||
$info = array(
|
$info = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user