Merge branch 'star' of git.kingsome.cn:server/game2006api into star

This commit is contained in:
hujiabin 2023-07-03 11:30:44 +08:00
commit 74cc92853f

View File

@ -1038,9 +1038,7 @@ class ShopController extends BaseAuthedController
$this->internalAddItem($propertyChgService, $itemMeta, $goods_count, 1);
$this->_rspOk();
} else {
error_log("buy normal 1, need_price = " . $need_price . " goods_num = " . $goods_num);
$price = $this->normalizeWeb3Price($goods_num * $need_price);
error_log("buy normal 2, price = " . $price);
$item_id = $row['goods_id'];
$item_count = $goods_num;
@ -1051,8 +1049,6 @@ class ShopController extends BaseAuthedController
$item_count
);
error_log("buy normal 3, response = " . json_encode($response));
BcOrder::upsert($response['trans_id'], array(
'item_id' => $item_id,
'item_num' => $item_count,
@ -1066,6 +1062,9 @@ class ShopController extends BaseAuthedController
$response['item_id'] = $item_id;
$response['item_num'] = $item_count;
error_log("buy normal, item_id = " . $item_id . " item_count = " . $item_count . " need_price = " . $need_price . " price = " . $price . " response = " . json_encode($response));
$this->_rspData(
array(
"block_chain" => $response
@ -1375,7 +1374,13 @@ class ShopController extends BaseAuthedController
}
}
$free_num = $goods['free_num'] - $this->countFreeBuyTimes($address, $id, $goods_id);
if (!empty($goods['free_type'])) {
$count = $this->countFreeBuyTimes($goods['free_type'], $goods['id'], $goods['goods_id']);
$goods['free_num'] = $goods['free_num'] - $count;
error_log('free_num:' . $goods['free_num']);
}
$free_num = $goods['free_num'];
$pending = $this->checkPendingBuyGoodsNormal($address, $goods_id, $shop_id, $id);
error_log("getChestItems start " . json_encode(
array(