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