This commit is contained in:
hujiabin 2024-05-21 17:18:15 +08:00
parent df017cfb9d
commit 56c32f7a69
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,16 @@
begin;
CREATE TABLE `t_sub_user_bind` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`org_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '初始账号id',
`cur_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '最新账号id',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `org_account_id` (`org_account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
insert into version (version) values(2024050801);
commit;

View File

@ -337,6 +337,8 @@ class Hero extends BaseModel {
public static function mallInfo($row){
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
$heroMeta = \mt\Item::get($row['hero_id']);
$heroAtteMeta = \mt\EconomyAttribute::findByGrade($heroMeta['relationship'],$row['quality']);
return array(
'idx' => $row['idx'],
'token_id' => $row['token_id'],
@ -352,6 +354,8 @@ class Hero extends BaseModel {
'lucky' => self::getHeroLucky($row),
'wealth' => self::getHeroWealth($row),
'ability' => self::abilityInfo($row),
'valid_time' => max(0,
86400 * $heroAtteMeta['validTime']),
);
}