From c8b2fdb57a6076cb4c2ef7e3895d1022237f55d6 Mon Sep 17 00:00:00 2001 From: wangwei01 Date: Tue, 23 Apr 2019 14:34:44 +0800 Subject: [PATCH] 1 --- webapp/controller/SignController.class.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/webapp/controller/SignController.class.php b/webapp/controller/SignController.class.php index c8c00ee..aa3b467 100644 --- a/webapp/controller/SignController.class.php +++ b/webapp/controller/SignController.class.php @@ -89,6 +89,27 @@ class SignController{ $quest = new classes\Quest(); $quest->triggerQuest(71001, 1, 1, $account_id); $quest->triggerQuest(72001, 2, 1, $account_id); + //刷新每日任务 + $rowCount = $conn->execQueryRowCount('SELECT * FROM quest WHERE accountid=:accountid;', + array( + ':accountid' => $account_id, + )); + if ($rowCount != 0) { + for ($i = 0; $i < $rowCount; $i++) { + $ret = $conn->execScript('UPDATE quest SET quest_state=:quest_state, quest_num=:quest_num ' . + ' WHERE accountid=:accountid AND quest_type=:quest_type;', + array( + ':accountid' => $account_id, + ':quest_num' => 0, + ':quest_type' => 1, + ':quest_state' => 0 + )); + } + if (!$ret) { + die(); + return; + } + } } else { $sign_days = $row['sign_days']; $signable = 1;