From 672637fa4a4914ec9667cb15f70b67482b8a0e5e Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 25 九月 2025 17:16:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/send_coupon' into user_action
---
framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java
index 73c3139..e5c2a71 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java
@@ -19,6 +19,8 @@
import org.springframework.beans.BeanUtils;
import org.springframework.util.Assert;
+import java.time.LocalDateTime;
+import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -42,7 +44,16 @@
@Override
public Result add(ActionRecordForm form) {
ActionRecord entity = ActionRecordForm.getEntityByForm(form, null);
- baseMapper.insert(entity);
+
+ AuthUser currentUser = UserContext.getCurrentUser();
+ if (currentUser == null) {
+ return Result.ok();
+ }else {
+ entity.setUserId(currentUser.getId());
+ entity.setStartTime(LocalDateTime.now());
+ baseMapper.insert(entity);
+
+ }
return Result.ok("娣诲姞鎴愬姛");
}
--
Gitblit v1.8.0