1
This commit is contained in:
parent
a078726b54
commit
2e2898d2f3
@ -854,6 +854,7 @@ CREATE TABLE `t_transaction` (
|
|||||||
`token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'token_type',
|
`token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'token_type',
|
||||||
`item_uniid` bigint NOT NULL DEFAULT '0' COMMENT '道具uniid',
|
`item_uniid` bigint NOT NULL DEFAULT '0' COMMENT '道具uniid',
|
||||||
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
|
`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',
|
`status` int(11) NOT NULL DEFAULT '0' COMMENT 'status',
|
||||||
`result` int(11) NOT NULL DEFAULT '0' COMMENT 'result 0:失败 1:成功',
|
`result` int(11) NOT NULL DEFAULT '0' COMMENT 'result 0:失败 1:成功',
|
||||||
`client_confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'client_confirmed',
|
`client_confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'client_confirmed',
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
begin;
|
begin;
|
||||||
|
|
||||||
|
alter table t_transaction add column `item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具num';
|
||||||
|
|
||||||
CREATE TABLE `t_bc_order` (
|
CREATE TABLE `t_bc_order` (
|
||||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
`order_id` varchar(255) COMMENT '订单号',
|
`order_id` varchar(255) COMMENT '订单号',
|
||||||
|
@ -4,7 +4,7 @@ namespace services;
|
|||||||
|
|
||||||
class BlockChainService {
|
class BlockChainService {
|
||||||
|
|
||||||
public static function gameItemMallBuy($actionType, $price)
|
public static function gameItemMallBuy($actionType, $price, $itemId, $itemNum)
|
||||||
{
|
{
|
||||||
if (!($actionType > Transaction::BUY_BEGIN_ACTION_TYPE &&
|
if (!($actionType > Transaction::BUY_BEGIN_ACTION_TYPE &&
|
||||||
$actionType < Transaction::BUY_END_ACTION_TYPE)) {
|
$actionType < Transaction::BUY_END_ACTION_TYPE)) {
|
||||||
@ -43,10 +43,10 @@ class BlockChainService {
|
|||||||
0, //$itemId,
|
0, //$itemId,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
myself()->_rspData(array(
|
return array(
|
||||||
'trans_id' => $transId,
|
'trans_id' => $transId,
|
||||||
'params' => $rspObj['params']
|
'params' => $rspObj['params']
|
||||||
));
|
);
|
||||||
} else {
|
} else {
|
||||||
myself()->_rspErr(500, 'server internal error');
|
myself()->_rspErr(500, 'server internal error');
|
||||||
die();
|
die();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user