1
This commit is contained in:
parent
bb84a010ef
commit
021116eb81
@ -56,8 +56,8 @@ class OutAppPurchase {
|
||||
$id = getReqVal('id', '');
|
||||
$txhash = getReqVal('txhash', '');
|
||||
$sign = getReqVal('sign', '');
|
||||
|
||||
$orderId = getReqVal('order_id', '');
|
||||
|
||||
$orderDb = OutAppOrder::find($orderId);
|
||||
if (!$orderDb) {
|
||||
myself()->_rspErr(2, 'not found order');
|
||||
@ -101,23 +101,22 @@ class OutAppPurchase {
|
||||
|
||||
// 以下是看商品表中是否配置了充值额外奖励
|
||||
$goods = ShopGoods::get($id);
|
||||
error_log("buyGoodsDirect---" . json_encode($goods));
|
||||
$goods_num = $order['goods_num'];
|
||||
$bundle_size = $goods['bonus_num'] ? $goods['bonus_num'] : 0;
|
||||
$item_num = $goods_num * $bundle_size;
|
||||
$item_id = $goods['bonus'];
|
||||
$meta = Item::get($item_id);
|
||||
error_log("buyGoodsDirect---" . $item_id . "---" . $item_num . "---" . $bundle_size . "---" . $meta['name']);
|
||||
if ($meta && $item_num > 0) {
|
||||
// $address = $order['address'];
|
||||
$account_id = $this->getAccountId($address);
|
||||
|
||||
if ($item_id == V_ITEM_DIAMOND) {
|
||||
$event = [
|
||||
'name' => LogService::RECHARGE_CEBG_BONUS,
|
||||
'val' => $item_num
|
||||
];
|
||||
LogService::productDiamondCallback(['account_id' => $account_id], $event);
|
||||
LogService::productDiamondCallback(
|
||||
array(
|
||||
'account_id' => $orderDb['account_id']
|
||||
),
|
||||
$event);
|
||||
}
|
||||
|
||||
error_log("buyGoodsDirect---" . $address . "---" . $item_id . "---" . $item_num);
|
||||
|
Loading…
x
Reference in New Issue
Block a user