1
This commit is contained in:
parent
3f2daadade
commit
2250412e03
@ -606,7 +606,7 @@ CREATE TABLE `t_nft_active` (
|
|||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
PRIMARY KEY (`idx`),
|
PRIMARY KEY (`idx`),
|
||||||
UNIQUE KEY `token_id_daytime` (`token_id`, `daytime`,`token_type`),
|
UNIQUE KEY `uniid_daytime_type` (`uniid`, `daytime`,`token_type`),
|
||||||
KEY `account_id_token_type` (`account_id`,`token_type`)
|
KEY `account_id_token_type` (`account_id`,`token_type`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
@ -23,15 +23,38 @@ class BattleHistory extends BaseModel
|
|||||||
|
|
||||||
public static function getMyBattleHistoryByMode($mode)
|
public static function getMyBattleHistoryByMode($mode)
|
||||||
{
|
{
|
||||||
$row = SqlHelper::ormSelect(
|
if ($mode == 1) {
|
||||||
myself()->_getSelfMysql(),
|
$row1 = SqlHelper::ormSelect(
|
||||||
't_battle_history',
|
myself()->_getSelfMysql(),
|
||||||
array(
|
't_battle_history',
|
||||||
'account_id' => myself()->_getAccountId(),
|
array(
|
||||||
'match_mode' => $mode,
|
'account_id' => myself()->_getAccountId(),
|
||||||
)
|
'match_mode' => 0,
|
||||||
);
|
)
|
||||||
return $row;
|
);
|
||||||
|
$row2 = SqlHelper::ormSelect(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
't_battle_history',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'match_mode' => 1,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$row = array_merge($row1,$row2);
|
||||||
|
return $row;
|
||||||
|
}elseif($mode == 2){
|
||||||
|
$row = SqlHelper::ormSelect(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
't_battle_history',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'match_mode' => 2,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return $row;
|
||||||
|
}else{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function toDto($row){
|
public static function toDto($row){
|
||||||
|
@ -178,7 +178,7 @@ class LogService extends BaseService
|
|||||||
$info = array(
|
$info = array(
|
||||||
'nft_unique_id' => $nft['idx'], //NFT idx
|
'nft_unique_id' => $nft['idx'], //NFT idx
|
||||||
'nft_token_id' => $nft['token_id']?$nft['token_id']:null, //NFT token ID
|
'nft_token_id' => $nft['token_id']?$nft['token_id']:null, //NFT token ID
|
||||||
'nft_item_id' => $nft['item_id'], //NFT item ID
|
'nft_item_id' => $nft['item_id']?$nft['item_id']:null, //NFT item ID
|
||||||
'nft_info' => json_encode($nft),
|
'nft_info' => json_encode($nft),
|
||||||
);
|
);
|
||||||
return $info;
|
return $info;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user