This commit is contained in:
hujiabin 2022-11-24 18:49:07 +08:00
parent 62312e60f1
commit 8b7c653b3c
5 changed files with 32 additions and 3 deletions

View File

@ -429,6 +429,7 @@ class FragmentController extends BaseAuthedController
'hero_tili' => strval(round(FormulaService::Hero_NFT_Maximum_Physical_Strength(1,$heroLucky),3)),
'hero_tili_max' => strval(round(FormulaService::Hero_NFT_Maximum_Physical_Strength(1,$heroLucky),3)),
'chip_strength_sum' =>0,
'labour'=>0
);
$hero['current_pvp_get_ceg'] = strval(round(FormulaService::getHeroPvpDailyCegUpLimit($hero),2));
$hero['pvp_ceg_uplimit'] = strval(round(FormulaService::getHeroPvpDailyCegUpLimit($hero),2));
@ -449,6 +450,7 @@ class FragmentController extends BaseAuthedController
'durability' => strval(round(FormulaService::Weapon_NFT_Maximum_Durability(1,$gunLucky),3)),
'durability_max' => strval(round(FormulaService::Weapon_NFT_Maximum_Durability(1,$gunLucky),3)),
'chip_strength_sum' =>0,
'labour'=>0
);
$gun['current_pvp_get_ceg'] = strval(round(FormulaService::getWeaponPvpDailyCegUpLimit($gun),2)) ;
$gun['pvp_ceg_uplimit'] = strval(round(FormulaService::getWeaponPvpDailyCegUpLimit($gun),2)) ;

View File

@ -425,7 +425,7 @@ class GunController extends BaseAuthedController {
$costGunUniId = getReqVal('cost_gun_uniid', 0);
$gunUniId = getReqVal('gun_uniid', 0);
$gunDb = Gun::find($gunUniId);
$costGunDb = Gun::find($costGunUniId);
$costGunDb = Gun::findEx($costGunUniId);
if (!$gunDb || !$costGunDb) {
$this->_rspErr(100, 'server internal error');
return;

View File

@ -240,11 +240,17 @@ class HeroController extends BaseAuthedController {
$heroDto = Hero::toDto($hero);
$costHeroDto = Hero::toDto($costHero);
}
$tranDb= Transaction::find($value['trans_id']);
if (!$tranDb){
myself()->_rspErr(1, 'ERROR param '. $value['trans_id']);
continue;
}
$info = array(
'trans_id'=>$value['trans_id'],
'state'=>$value['state'],
'heroInfo'=>$heroDto,
'costHeroInfo'=>$costHeroDto,
'result'=>$tranDb['result']
);
array_push($infos,$info);
}
@ -802,8 +808,8 @@ class HeroController extends BaseAuthedController {
$heroUniId = getReqVal('hero_uniid', 0);
$costHeroUniId = getReqVal('cost_hero_uniid', 0);
$heroDb = Hero::find($heroUniId);
$costHeroDb = Hero::find($costHeroUniId);
if (!$heroDb || !$costHeroDb) {
$costHeroDb = Hero::findEx($costHeroUniId);
if (!$heroDb) {
$this->_rspErr(100, 'server internal error');
return;
}

View File

@ -48,6 +48,16 @@ class Gun extends BaseModel {
}
return $row;
}
public static function findEx($gunUniId){
$row = SqlHelper::ormSelectOne(
myself()->_getSelfMysql(),
't_gun',
array(
'idx' => $gunUniId,
)
);
return $row;
}
public static function findByTokenId($tokenId)
{

View File

@ -40,6 +40,17 @@ class Hero extends BaseModel {
return self::internalFind(myself()->_getAccountId(), $heroUniId);
}
public static function findEx($heroUniId){
$row = SqlHelper::ormSelectOne(
myself()->_getMysql(myself()->_getAccountId()),
't_hero',
array(
'idx' => $heroUniId,
)
);
return $row;
}
public static function findByAccountId($accountId, $heroUniId)
{
return self::internalFind($accountId, $heroUniId);