adjust
This commit is contained in:
parent
4cbf851340
commit
7c8d785ecd
@ -690,7 +690,42 @@ class RechargeController
|
||||
}
|
||||
|
||||
if ($rechargerow['daily_purchase'] != null && $rechargerow['daily_purchase'] != '') {
|
||||
$dailypurchase = json_decode($rechargerow['daily_purchase']);
|
||||
$dailypurchase = json_decode($rechargerow['daily_purchase'], true);
|
||||
$packtime = 0;
|
||||
foreach($dailypurchase as $key => $val) {
|
||||
if ($val['id'] == 10 && $val['time'] > $daysecs) {
|
||||
$packtime = $val['time'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($packtime > 0) {
|
||||
$shopconf = metatable\getShopGoodsConf();
|
||||
foreach($shopconf as $itemconf) {
|
||||
if ($itemconf['type'] != 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($itemconf['shop_id'] == 10) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$found = false;
|
||||
foreach($dailypurchase as $key => $val) {
|
||||
if ($val['id'] == $itemconf['shop_id']) {
|
||||
$found = true;
|
||||
$dailypurchase[$key]['time'] = $packtime;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) {
|
||||
array_push($dailypurchase, array(
|
||||
'id' => $shopconf['shop_id'],
|
||||
'time' => $packtime,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user