From ee8ef29aeb4516da1419f0c34aad263356799f69 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 27 Mar 2020 17:39:59 +0800 Subject: [PATCH] 1 --- webapp/controller/RoleController.class.php | 2 +- webapp/controller/SignController.class.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 9aa611e..9f77b32 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -124,7 +124,7 @@ class RoleController{ ':user_name' => $user_name, ':avatar_url' => $avatar_url, ':create_time' => time(), - ':modify_time' => time(), + ':modify_time' => 0, ':daily_time' => 0 )); if (!$ret) { diff --git a/webapp/controller/SignController.class.php b/webapp/controller/SignController.class.php index 27480bc..4aa3ed6 100644 --- a/webapp/controller/SignController.class.php +++ b/webapp/controller/SignController.class.php @@ -129,11 +129,15 @@ class SignController{ $last_sign_id = $row['sign_id']; } } - if ($nowTime - phpcommon\getdayseconds($last_sign_time) > 0) { + $rowuser = $conn->execQueryOne('SELECT modify_time FROM user WHERE accountid=:accountid;', + array( + ':accountid' => $account_id + )); + if ($nowTime - phpcommon\getdayseconds($rowuser['modify_time']) > 0) { //每日刷新 $this->updateDaily($account_id); $this->updateSeasonStatus($account_id); - if (phpcommon\getMondayseconds(time()) - phpcommon\getMondayseconds($last_sign_time) > 0) { + if (phpcommon\getMondayseconds(time()) - phpcommon\getMondayseconds($rowuser['modify_time']) > 0) { $this->updateWeekReward($account_id); } $passed_days = floor(($nowTime - phpcommon\getdayseconds($last_sign_time)) / (3600 * 24));