From edfa49f201d3fc8fc6b51b700e91f80246660855 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 13 二月 2024 20:29:14 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/service/impl/UserLoginServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/service/impl/UserLoginServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/service/impl/UserLoginServiceImpl.java index 1342f48..24b1a0a 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/service/impl/UserLoginServiceImpl.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/service/impl/UserLoginServiceImpl.java @@ -4,9 +4,27 @@ import com.zy.asrs.wcs.sys.entity.UserLogin; import com.zy.asrs.wcs.sys.service.UserLoginService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; @Service("userLoginService") public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin> implements UserLoginService { + @Async + @Override + public void saveAsync(Long userId, Integer type, String comments, Long hostId, HttpServletRequest request) { + if (userId == null) { + return; + } + UserLogin userLogin = new UserLogin(); + userLogin.setUserId(userId); + userLogin.setType(type); + userLogin.setMemo(comments); + userLogin.setHostId(hostId); + userLogin.setIp(request.getRequestURI()); + baseMapper.insert(userLogin); + } + } -- Gitblit v1.9.1