This commit is contained in:
aozhiwei 2023-06-19 13:45:43 +08:00
parent a078726b54
commit 2e2898d2f3
3 changed files with 6 additions and 3 deletions

View File

@ -854,6 +854,7 @@ CREATE TABLE `t_transaction` (
`token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'token_type',
`item_uniid` bigint NOT NULL DEFAULT '0' COMMENT '道具uniid',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具num',
`status` int(11) NOT NULL DEFAULT '0' COMMENT 'status',
`result` int(11) NOT NULL DEFAULT '0' COMMENT 'result 0失败 1成功',
`client_confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'client_confirmed',

View File

@ -1,5 +1,7 @@
begin;
alter table t_transaction add column `item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具num';
CREATE TABLE `t_bc_order` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`order_id` varchar(255) COMMENT '订单号',

View File

@ -4,7 +4,7 @@ namespace services;
class BlockChainService {
public static function gameItemMallBuy($actionType, $price)
public static function gameItemMallBuy($actionType, $price, $itemId, $itemNum)
{
if (!($actionType > Transaction::BUY_BEGIN_ACTION_TYPE &&
$actionType < Transaction::BUY_END_ACTION_TYPE)) {
@ -43,10 +43,10 @@ class BlockChainService {
0, //$itemId,
1
);
myself()->_rspData(array(
return array(
'trans_id' => $transId,
'params' => $rspObj['params']
));
);
} else {
myself()->_rspErr(500, 'server internal error');
die();