From 5541e4336da8a3d5c016255efbd8c89eabe6e0b5 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Fri, 5 Jul 2024 16:59:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/manager/UserBookManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserBookManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserBookManager.java index a5b52a4..a4424f4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserBookManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserBookManager.java @@ -9,6 +9,7 @@ import com.ruoyi.system.service.ElUserBookService; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.util.Date; import java.util.Objects; /** @@ -48,9 +49,11 @@ public class UserBookManager { book.setWrongCount(1); Integer maxSort = this.findMaxSort(examId, ShiroUtils.getUserId()); book.setSort(maxSort+1); + book.setCreateTime(new Date()); userBookService.save(book); } else { book.setWrongCount(book.getWrongCount()+1); + book.setUpdateTime(new Date()); userBookService.updateById(book); } }