Merge branch 'star' of git.kingsome.cn:server/game2006api into star
This commit is contained in:
commit
3b8c44c52e
@ -578,10 +578,10 @@ CREATE TABLE `t_log` (
|
||||
DROP TABLE IF EXISTS `t_market_store`;
|
||||
CREATE TABLE `t_market_store` (
|
||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`o_link` varchar(64) NOT NULL COMMENT '关联的链上上架单号',
|
||||
`o_link` varchar(64) DEFAULT NULL COMMENT '关联的链上上架单号',
|
||||
`status` int(11) NOT NULL COMMENT '订单状态 0:出售中 1:已下架 2:已售出',
|
||||
`owner_address` varchar(60) NOT NULL COMMENT '当前拥有者',
|
||||
`token_id` varchar(80) NOT NULL COMMENT 'token_id',
|
||||
`token_id` varchar(80) DEFAULT NULL COMMENT 'token_id',
|
||||
`nft_token` varchar(64) DEFAULT NULL COMMENT 'nftToken',
|
||||
`token_type` int(11) NOT NULL COMMENT 'nft类型 1:英雄 2:枪支 3:芯片',
|
||||
`item_id` int(11) DEFAULT NULL COMMENT '特殊字段,用于标记中心化道具,用于交易金币',
|
||||
@ -597,10 +597,9 @@ CREATE TABLE `t_market_store` (
|
||||
`c_quality` int(11) NOT NULL COMMENT '缓存-品阶',
|
||||
`c_durability` float NOT NULL COMMENT '缓存-能量',
|
||||
`c_id` int(11) NOT NULL COMMENT '缓存-id',
|
||||
PRIMARY KEY (`idx`,`o_link`) USING BTREE,
|
||||
UNIQUE KEY `o_link` (`o_link`) USING HASH COMMENT '链上合约上架订单号',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
UNIQUE KEY `idx` (`idx`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=350 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `t_market_transaction_record`;
|
||||
CREATE TABLE `t_market_transaction_record` (
|
||||
@ -616,4 +615,4 @@ CREATE TABLE `t_market_transaction_record` (
|
||||
`name` varchar(64) NOT NULL COMMENT '商品名称',
|
||||
`type` int(11) NOT NULL COMMENT '商品类型',
|
||||
PRIMARY KEY (`idx`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
|
||||
|
39
sql/marketdb_migrate_230705_01.sql
Normal file
39
sql/marketdb_migrate_230705_01.sql
Normal file
@ -0,0 +1,39 @@
|
||||
CREATE TABLE `t_market_store` (
|
||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`o_link` varchar(64) DEFAULT NULL COMMENT '关联的链上上架单号',
|
||||
`status` int(11) NOT NULL COMMENT '订单状态 0:出售中 1:已下架 2:已售出',
|
||||
`owner_address` varchar(60) NOT NULL COMMENT '当前拥有者',
|
||||
`token_id` varchar(80) DEFAULT NULL COMMENT 'token_id',
|
||||
`nft_token` varchar(64) DEFAULT NULL COMMENT 'nftToken',
|
||||
`token_type` int(11) NOT NULL COMMENT 'nft类型 1:英雄 2:枪支 3:芯片',
|
||||
`item_id` int(11) DEFAULT NULL COMMENT '特殊字段,用于标记中心化道具,用于交易金币',
|
||||
`amount` int(11) NOT NULL DEFAULT '1' COMMENT '堆叠数量',
|
||||
`createtime` int(11) NOT NULL COMMENT '创建时间(上架时间)',
|
||||
`modifytime` int(11) NOT NULL COMMENT '修改时间(更新价格等)',
|
||||
`s_currency` varchar(255) NOT NULL COMMENT '出售时选择的币种地址',
|
||||
`s_price` varchar(64) NOT NULL COMMENT '出售价格',
|
||||
`c_name` varchar(32) NOT NULL COMMENT '缓存-名称',
|
||||
`c_job` int(11) NOT NULL COMMENT '缓存-职业',
|
||||
`c_type` int(11) NOT NULL COMMENT '缓存-碎片类型',
|
||||
`c_lv` int(11) NOT NULL COMMENT '缓存-级别',
|
||||
`c_quality` int(11) NOT NULL COMMENT '缓存-品阶',
|
||||
`c_durability` float NOT NULL COMMENT '缓存-能量',
|
||||
`c_id` int(11) NOT NULL COMMENT '缓存-id',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
UNIQUE KEY `idx` (`idx`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `t_market_transaction_record` (
|
||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`createtime` int(11) NOT NULL COMMENT '交易成功时间',
|
||||
`orderid` bigint(20) NOT NULL COMMENT 'market 订单id',
|
||||
`o_link` varchar(64) NOT NULL COMMENT '合约订单id',
|
||||
`seller` varchar(64) NOT NULL COMMENT '卖家',
|
||||
`buyer` varchar(64) NOT NULL COMMENT '买家',
|
||||
`tokenid` int(64) NOT NULL COMMENT 'tokenid',
|
||||
`item_id` int(11) DEFAULT NULL COMMENT '如果有,说明是中心化道具交易',
|
||||
`amount` int(11) NOT NULL COMMENT '堆叠数量',
|
||||
`name` varchar(64) NOT NULL COMMENT '商品名称',
|
||||
`type` int(11) NOT NULL COMMENT '商品类型',
|
||||
PRIMARY KEY (`idx`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
|
@ -1877,7 +1877,10 @@ class MarketController extends BaseAuthedController
|
||||
'status' => 0,
|
||||
)
|
||||
);
|
||||
if ($row['item_id'] == null) {
|
||||
if (!$row) {
|
||||
return null;
|
||||
}
|
||||
if (!$row['item_id']) {
|
||||
return null;
|
||||
}
|
||||
return $row;
|
||||
|
Loading…
x
Reference in New Issue
Block a user