From a6c23463ce85b94d8b62a36a1e63e9558b39bd42 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 1 Dec 2021 14:00:18 +0800 Subject: [PATCH] 1 --- webapp/models/ShopBuyRecord.php | 12 ++++++------ webapp/services/PropertyChgService.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/webapp/models/ShopBuyRecord.php b/webapp/models/ShopBuyRecord.php index d85d417..843a457 100644 --- a/webapp/models/ShopBuyRecord.php +++ b/webapp/models/ShopBuyRecord.php @@ -29,16 +29,16 @@ class ShopBuyRecord extends BaseModel { 'account_id' => myself()->_getAccountId(), ) ); - return array_map(function($val) { + return array_map(function($row) { $nowDaySeconds = myself()->_getNowDaySeconds(); if (!($row['last_buy_time'] >= $nowDaySeconds && $row['last_buy_time'] <= $nowDaySeconds)) { - $val['this_day_buy_times'] = 0; + $row['this_day_buy_times'] = 0; } $mondaySeconds = myself()->_getMondaySeconds(); if (!($row['last_buy_time'] >= $mondaySeconds && $row['last_buy_time'] <= $mondaySeconds)) { - $val['this_week_buy_times'] = 0; + $row['this_week_buy_times'] = 0; } - return $val; + return $row; }, $rows); } @@ -46,8 +46,8 @@ class ShopBuyRecord extends BaseModel { { $rows = self::all(); $buyRecordHash = array(); - array_walk($rows, function ($val) use(&$buyRecordHash) { - $buyRecordHash[$val['item_id']] = $val; + array_walk($rows, function ($row) use(&$buyRecordHash) { + $buyRecordHash[$row['item_id']] = $row; }); return $buyRecordHash; } diff --git a/webapp/services/PropertyChgService.php b/webapp/services/PropertyChgService.php index d737fcd..aaa0e03 100644 --- a/webapp/services/PropertyChgService.php +++ b/webapp/services/PropertyChgService.php @@ -46,7 +46,7 @@ class PropertyChgService extends BaseService { private function internalAddChg($name) { - foreach ($chgLlist as $item) { + foreach ($this->chgLlist as $item) { if ($item == $name) { return; }