From 3778e2dd638f53db1ff2b61cbc2ce8a9f9a93f28 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 23 三月 2026 16:11:28 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java b/src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java
index 72813c6..bbdfa74 100644
--- a/src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java
+++ b/src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java
@@ -7,6 +7,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.Date;
+
@Service("userLoginService")
public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin> implements UserLoginService {
@@ -17,4 +19,12 @@
public int selectCountByCurrentWeek() {
return userLoginMapper.selectCountByCurrentWeek();
}
+
+ @Override
+ public boolean save(UserLogin entity) {
+ if (entity != null && entity.getId() == null && entity.getCreateTime() == null) {
+ entity.setCreateTime(new Date());
+ }
+ return super.save(entity);
+ }
}
--
Gitblit v1.9.1