1
This commit is contained in:
parent
a355e19fe0
commit
c8b400febc
@ -6,6 +6,7 @@ require_once('phpcommon/bchelper.php');
|
||||
|
||||
require_once('models/BcOrder.php');
|
||||
|
||||
require_once('ShopAddItemService.php');
|
||||
require_once ('services/callback/BuyPassCbService.php');
|
||||
require_once ('services/callback/BuyShopGoodsCbService.php');
|
||||
require_once ('services/callback/common/SignatureService.php');
|
||||
@ -46,6 +47,18 @@ class GameItemMallBuyOk {
|
||||
'status' => 1
|
||||
));
|
||||
if ($orderDb['order_type'] == BcOrder::SPEC_ORDER_TYPE) {
|
||||
$extData = json_decode($order['ext_data'], true);
|
||||
switch ($extData['mode']) {
|
||||
case BcOrder::SHOP_BUY_MODE_NORMAL:
|
||||
{
|
||||
$this->procShopBuyModeNormal($orderDb, $extData);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
// 小胡 回调的处理
|
||||
@ -63,4 +76,39 @@ class GameItemMallBuyOk {
|
||||
myself()->_rspOk();
|
||||
}
|
||||
|
||||
private function procShopBuyModeNormal($orderDb, $extData)
|
||||
{
|
||||
$accountId = $orderDb['account_id'];
|
||||
$itemService = new ShopAddItemService();
|
||||
myself()->_addLogEx($accountId, "shopBuyNormal", "begin", array(
|
||||
'param1' => $orderDb['order_id'],
|
||||
'param2' => json_encode(array(
|
||||
'item_id' => $orderDb['item_id'],
|
||||
'item_num' => $orderDb['item_num'],
|
||||
)
|
||||
),
|
||||
'param3' => json_encode($orderDb),
|
||||
));
|
||||
$itemId = $orderDb['item_id'];
|
||||
$itemNum = $orderDb['item_num'];
|
||||
if ($itemId == V_ITEM_DIAMOND) {
|
||||
$event = [
|
||||
'name' => LogService::CEBG_TO_DIAMOND,
|
||||
'val' => $item_num
|
||||
];
|
||||
LogService::productDiamondCallback(
|
||||
['account_id' => $accountId],
|
||||
$event);
|
||||
}
|
||||
$itemService->addItemByAccountId($accountId, $itemId, $itemNum);
|
||||
myself()->_addLogEx($accountId, "shopBuyNormal", "end", array(
|
||||
'param1' => $orderDb['order_id'],
|
||||
'param2' => json_encode(array(
|
||||
'item_id' => $orderDb['item_id'],
|
||||
'item_num' => $orderDb['item_num'],
|
||||
)),
|
||||
'param3' => json_encode($orderDb),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user