This commit is contained in:
hujiabin 2024-10-22 16:52:55 +08:00
parent 40adb32d0b
commit 083d192cde
3 changed files with 7 additions and 14 deletions

View File

@ -937,7 +937,8 @@ class BaseAuthedController extends BaseController {
public function _getVipRightsVal($type) public function _getVipRightsVal($type)
{ {
$vip = User::getVipLv(myself()->_getAddress()); $details = \services\StakingVipService::getDetails(myself()->_getAddress());
$vip = $details['lv'];
return myself()->_callMtStatic('StakingVip', 'getValByLv', $vip, $type); return myself()->_callMtStatic('StakingVip', 'getValByLv', $vip, $type);
} }
} }

View File

@ -29,6 +29,7 @@ require_once('services/NameService.php');
require_once('services/ChipPageService.php'); require_once('services/ChipPageService.php');
require_once('services/LogService.php'); require_once('services/LogService.php');
require_once('services/NftService.php'); require_once('services/NftService.php');
require_once('services/StakingVipService.php');
use phpcommon\SqlHelper; use phpcommon\SqlHelper;
use models\User; use models\User;
@ -1163,10 +1164,11 @@ class UserController extends BaseAuthedController {
public function getUserVip(){ public function getUserVip(){
$details = \services\StakingVipService::getDetails(myself()->_getAddress());
$this->_rspData( $this->_rspData(
array( array(
'vip' => User::getVipLv(myself()->_getAddress()), 'vip' => $details['lv'],
'exp' => 0, 'exp' => $details['cur'],
) )
); );
} }

View File

@ -70,17 +70,7 @@ class User extends BaseModel {
); );
return $rows ? $rows : null; return $rows ? $rows : null;
} }
public static function getVipLv($address){
$row = SqlHelper::ormSelectOne(
myself()->_getMarketMysql(''),
't_staking_cec',
array(
'account_address' => $address
)
);
return $row ? $row['vip_lv'] : 0;
}
public static function show($row) public static function show($row)
{ {