From 066a7ea94f73da71ab0d7f7c9e506234707af23c Mon Sep 17 00:00:00 2001 From: wangwei01 Date: Thu, 18 Apr 2019 14:55:37 +0800 Subject: [PATCH] 1 --- webapp/controller/QuestController.class.php | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/webapp/controller/QuestController.class.php b/webapp/controller/QuestController.class.php index 09bd6b3..82257cb 100644 --- a/webapp/controller/QuestController.class.php +++ b/webapp/controller/QuestController.class.php @@ -77,10 +77,10 @@ class QuestController{ for ($i = 73001; $i < 73006; $i++) { $quest_id = $i; $row = $conn->execQueryOne('SELECT * FROM quest WHERE accountid=:accountid AND quest_id=:quest_id;', - array( - ':accountid' => $account_id, - ':quest_id' => $quest_id - )); + array( + ':accountid' => $account_id, + ':quest_id' => $quest_id + )); $t = $this->getTaskReward($quest_id); if ($row['quest_state'] != 0 || $active_num < $t['value']) { continue; @@ -145,11 +145,11 @@ class QuestController{ } $ret = $conn->execScript('DELETE FROM quest ' . ' WHERE accountid=:accountid AND quest_type=:quest_type AND quest_id<:quest_id;', - array( - ':accountid' => $account_id, - ':quest_type' => 0, - ':quest_id' => $quest_id - )); + array( + ':accountid' => $account_id, + ':quest_type' => 0, + ':quest_id' => $quest_id + )); } public function QuestInfo() @@ -166,9 +166,9 @@ class QuestController{ return; } $row = $conn->execQueryOne('SELECT active_sum, sum_time FROM active WHERE accountid=:accountid;', - array( - ':accountid' => $account_id, - )); + array( + ':accountid' => $account_id, + )); if ($row) { //每周更新活跃度 if (phpcommon\getMondayseconds(time()) - phpcommon\getMondayseconds($row['sum_time']) > 0) { @@ -178,9 +178,9 @@ class QuestController{ } } $row = $conn->execQueryOne('SELECT active_num, num_time FROM active WHERE accountid=:accountid;', - array( - ':accountid' => $account_id, - )); + array( + ':accountid' => $account_id, + )); if ($row) { //每日更新活跃度 if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['num_time']) > 0) { @@ -266,11 +266,11 @@ class QuestController{ return; } $row = $conn->execQueryOne('SELECT * FROM quest WHERE accountid=:accountid AND quest_id=:quest_id AND quest_type=:quest_type;', - array( - ':accountid' => $account_id, - ':quest_id' => $quest_id, - ':quest_type' => $quest_type - )); + array( + ':accountid' => $account_id, + ':quest_id' => $quest_id, + ':quest_type' => $quest_type + )); if (!$row) { phpcommon\sendError(ERR_USER_BASE + 2, '没有这个任务'); return; @@ -295,9 +295,9 @@ class QuestController{ if ($row['quest_type'] == 1) { $active = $conn->execQueryOne('SELECT active_num, active_sum FROM active WHERE accountid=:accountid;', - array( - ':accountid' => $account_id - )); + array( + ':accountid' => $account_id + )); //增加活跃度 if (!$active) { $this->insertActive($account_id);