...
This commit is contained in:
parent
9696773329
commit
1b3ee8765a
@ -1151,6 +1151,7 @@ CREATE TABLE `t_shop_buy_order` (
|
|||||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单id',
|
`idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单id',
|
||||||
`address` varchar(60) NOT NULL COMMENT '账户id',
|
`address` varchar(60) NOT NULL COMMENT '账户id',
|
||||||
`createtime` int(11) NOT NULL COMMENT '订单开始时间',
|
`createtime` int(11) NOT NULL COMMENT '订单开始时间',
|
||||||
|
`id` int(11) NOT NULL COMMENT '商店货物id',
|
||||||
`item_id` int(11) NOT NULL COMMENT '道具id',
|
`item_id` int(11) NOT NULL COMMENT '道具id',
|
||||||
`goods_num` int(11) NOT NULL COMMENT '购买个数',
|
`goods_num` int(11) NOT NULL COMMENT '购买个数',
|
||||||
`status` int(11) NOT NULL COMMENT '订单状态 0-客户端申请了订单 1-订单完成 2-订单失败',
|
`status` int(11) NOT NULL COMMENT '订单状态 0-客户端申请了订单 1-订单完成 2-订单失败',
|
||||||
|
5
sql/gamedb2006_migrate_230710_01.sql
Normal file
5
sql/gamedb2006_migrate_230710_01.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
begin;
|
||||||
|
|
||||||
|
alter table t_bc_order add column `id` int(11) NOT NULL COMMENT '商店货物id',
|
||||||
|
|
||||||
|
commit;
|
@ -111,7 +111,11 @@ class ShopController extends BaseAuthedController
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (getReqVal('a', '') != 'buyGoodsDirect') {
|
$a = getReqVal('a', '');
|
||||||
|
if (
|
||||||
|
$a != 'buyGoodsDirect' &&
|
||||||
|
$a != 'purchaseDiamonds'
|
||||||
|
) {
|
||||||
parent::_handlePre();
|
parent::_handlePre();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,6 +193,8 @@ class ShopController extends BaseAuthedController
|
|||||||
$token_type = getReqVal('token_type', '');
|
$token_type = getReqVal('token_type', '');
|
||||||
$goods_num = getReqVal('goods_num', 0);
|
$goods_num = getReqVal('goods_num', 0);
|
||||||
|
|
||||||
|
$goods = mt\ShopGoods::get($id);
|
||||||
|
|
||||||
$conn = myself()->_getMysql('');
|
$conn = myself()->_getMysql('');
|
||||||
|
|
||||||
$address = myself()->_getAddress();
|
$address = myself()->_getAddress();
|
||||||
@ -196,14 +202,14 @@ class ShopController extends BaseAuthedController
|
|||||||
$this->_rspErr(1, 'address is empty');
|
$this->_rspErr(1, 'address is empty');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$chk = SqlHelper::insert(
|
$chk = SqlHelper::insert(
|
||||||
$conn,
|
$conn,
|
||||||
't_shop_buy_order',
|
't_shop_buy_order',
|
||||||
array(
|
array(
|
||||||
'address' => $address,
|
'address' => $address,
|
||||||
'createtime' => myself()->_getNowTime(),
|
'createtime' => myself()->_getNowTime(),
|
||||||
'item_id' => $id,
|
'id' => $id,
|
||||||
|
'item_id' => $goods['goods_id'],
|
||||||
'goods_num' => $goods_num,
|
'goods_num' => $goods_num,
|
||||||
'status' => 0, // 0-客户端申请了订单 1-订单完成 2-订单失败
|
'status' => 0, // 0-客户端申请了订单 1-订单完成 2-订单失败
|
||||||
)
|
)
|
||||||
@ -229,7 +235,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$row = SqlHelper::selectOne(
|
$row = SqlHelper::selectOne(
|
||||||
$conn,
|
$conn,
|
||||||
't_shop_buy_order',
|
't_shop_buy_order',
|
||||||
array('status'),
|
array('status', 'id'),
|
||||||
array(
|
array(
|
||||||
'idx' => $order_id,
|
'idx' => $order_id,
|
||||||
)
|
)
|
||||||
@ -238,6 +244,8 @@ class ShopController extends BaseAuthedController
|
|||||||
$this->_rspData(
|
$this->_rspData(
|
||||||
array(
|
array(
|
||||||
'status' => $row['status'],
|
'status' => $row['status'],
|
||||||
|
'item_id' => $row['item_id'],
|
||||||
|
'item_num' => $row['goods_num'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -350,6 +358,17 @@ class ShopController extends BaseAuthedController
|
|||||||
$this->_rspOk();
|
$this->_rspOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function purchaseDiamonds()
|
||||||
|
{
|
||||||
|
|
||||||
|
// 有三种情况:
|
||||||
|
// 1. 从商城购买钻石,有订单号
|
||||||
|
// 2. 站外充值钻石,没有订单号
|
||||||
|
// 3. appstore 退款,没有订单号
|
||||||
|
|
||||||
|
$this->_rspOk();
|
||||||
|
}
|
||||||
|
|
||||||
public function getPayMethods()
|
public function getPayMethods()
|
||||||
{
|
{
|
||||||
$token_type = getReqVal('token_type', 99);
|
$token_type = getReqVal('token_type', 99);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user