1
This commit is contained in:
parent
4a29b72e75
commit
24d154faff
@ -40,17 +40,17 @@ class ShopService {
|
||||
array_push($goodsList, $goodsDto);
|
||||
switch ($goodsMeta['limit_type']) {
|
||||
case mt\Item::DAILY_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['id']);
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']);
|
||||
$goodsDto['bought_times'] = $buyRecord ? $buyRecord['this_day_buy_times'] : 0;
|
||||
}
|
||||
break;
|
||||
case mt\Item::WEEKLY_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['id']);
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']);
|
||||
$goodsDto['bought_times'] = $buyRecord ? $buyRecord['this_week_buy_times'] : 0;
|
||||
}
|
||||
break;
|
||||
case mt\Item::TOTAL_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['id']);
|
||||
$buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']);
|
||||
$goodsDto['bought_times'] = $buyRecord ? $buyRecord['total_buy_times'] : 0;
|
||||
}
|
||||
break;
|
||||
@ -77,7 +77,7 @@ class ShopService {
|
||||
|
||||
if (!empty($goods['free_type'])) {
|
||||
$count = self::getFreeBuyTimes($goodsMeta['free_type'],
|
||||
$goodsMeta['id'],
|
||||
$goodsMeta['goods_id'],
|
||||
$goodsMeta['goods_id']);
|
||||
$goodsDto['free_num'] = $goodsDto['free_num'] - $count;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user