...
This commit is contained in:
parent
ab4bcf3ad2
commit
0b5a86dd32
@ -997,7 +997,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);
|
||||
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'];
|
||||
@ -1098,7 +1098,8 @@ class ShopController extends BaseAuthedController
|
||||
$price = $this->normalizeWeb3Price($goods['price'] * $count);
|
||||
$item_id = $goods['goods_id'];
|
||||
$item_count = $goods['goods_num'] * $count;
|
||||
error_log("buyGoodsDS start " . json_encode(array(
|
||||
error_log("buyGoodsDS start " . json_encode(
|
||||
array(
|
||||
'idx' => $idx,
|
||||
'grid' => $grid,
|
||||
'count' => $count,
|
||||
@ -1127,7 +1128,8 @@ class ShopController extends BaseAuthedController
|
||||
)),
|
||||
));
|
||||
|
||||
error_log("buyGoodsDS start " . json_encode(array(
|
||||
error_log("buyGoodsDS start " . json_encode(
|
||||
array(
|
||||
'idx' => $idx,
|
||||
'grid' => $grid,
|
||||
'count' => $count,
|
||||
@ -1168,7 +1170,7 @@ class ShopController extends BaseAuthedController
|
||||
$itemStore = mt\ShopChest::getRandomItemListByChestType($recommend);
|
||||
|
||||
$result = array();
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$record = array();
|
||||
foreach ($itemStore as $key => $value) {
|
||||
$item = $this->weighted_random($value);
|
||||
@ -1181,13 +1183,13 @@ class ShopController extends BaseAuthedController
|
||||
$this->internalAddItem($propertyChgService, $itemMeta, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
$record[$key] = array( "item_id" => $item['item_id'], "item_num" => $item['num'] );
|
||||
$record[$key] = array("item_id" => $item['item_id'], "item_num" => $item['num']);
|
||||
array_push($result, $record[$key]);
|
||||
}
|
||||
array_push($result, $record);
|
||||
}
|
||||
|
||||
error_log("buyBlindBox start " . json_encode(array(
|
||||
error_log("buyBlindBox start " . json_encode(
|
||||
array(
|
||||
'account' => $account,
|
||||
'itemListStore' => $result,
|
||||
)
|
||||
@ -1544,7 +1546,7 @@ class ShopController extends BaseAuthedController
|
||||
$this->_addVirtualItem($itemMeta['id'], $count, null, $propertyChgService);
|
||||
$propertyChgService->addUserChg();
|
||||
// 充值就尝试开启首充活动
|
||||
if ($sysAdd!=1) {
|
||||
if ($sysAdd != 1) {
|
||||
if ($itemMeta['id'] == 10001) {
|
||||
$this->beginFirstTupop();
|
||||
}
|
||||
@ -1645,14 +1647,13 @@ class ShopController extends BaseAuthedController
|
||||
return phpcommon\bnToStr($ret_price);
|
||||
}
|
||||
|
||||
private function countFreeBuyTimes($goods) {
|
||||
private function countFreeBuyTimes($goods)
|
||||
{
|
||||
$conn = myself()->_getMysql('');
|
||||
$account = myself()->_getAccountId();
|
||||
|
||||
switch($goods['free_type'])
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
switch ($goods['free_type']) {
|
||||
case 1: {
|
||||
$dayTime = myself()->_getNowDaySeconds();
|
||||
$sql = 'SELECT COUNT(*) as cnt FROM t_shop_free_record WHERE account_id = ? AND `id` = ? AND goods_id = ? AND createtime >= ?';
|
||||
$row = $conn->execQueryOne($sql, array($account, $goods['id'], $goods['goods_id'], $dayTime));
|
||||
@ -1664,14 +1665,13 @@ class ShopController extends BaseAuthedController
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function addFreeBuyRecord($goods) {
|
||||
private function addFreeBuyRecord($goods)
|
||||
{
|
||||
$conn = myself()->_getMysql('');
|
||||
$account = myself()->_getAccountId();
|
||||
|
||||
switch($goods['free_type'])
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
switch ($goods['free_type']) {
|
||||
case 1: {
|
||||
$dayTime = myself()->_getNowTime();
|
||||
SqlHelper::insert(
|
||||
$conn,
|
||||
|
Loading…
x
Reference in New Issue
Block a user