From c6c9b7d3baa822765768c110304d27623f946286 Mon Sep 17 00:00:00 2001
From: pjb <123456>
Date: 星期二, 15 七月 2025 14:29:09 +0800
Subject: [PATCH] `1`
---
zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/service/impl/UserLoginServiceImpl.java | 69 +++++++++++++++++++---------------
1 files changed, 38 insertions(+), 31 deletions(-)
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/service/impl/UserLoginServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/service/impl/UserLoginServiceImpl.java
index 005d73e..b91cfd4 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/service/impl/UserLoginServiceImpl.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/service/impl/UserLoginServiceImpl.java
@@ -1,31 +1,38 @@
-package com.zy.asrs.wms.system.service.impl;
-
-import com.zy.asrs.common.utils.IpTools;
-import com.zy.asrs.wms.system.mapper.UserLoginMapper;
-import com.zy.asrs.wms.system.entity.UserLogin;
-import com.zy.asrs.wms.system.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, String token, Integer type, Long hostId, String memo, HttpServletRequest request) {
- if (userId == null) {
- return;
- }
- UserLogin userLogin = new UserLogin();
- userLogin.setUserId(userId);
- userLogin.setToken(token);
- userLogin.setType(type);
- userLogin.setIp(IpTools.gainRealIp(request));
- userLogin.setMemo(memo);
- baseMapper.insert(userLogin);
- }
-
-}
+package com.zy.asrs.wms.system.service.impl;
+
+import com.zy.asrs.common.domain.enums.LoginSystemType;
+import com.zy.asrs.common.utils.IpTools;
+import com.zy.asrs.wms.system.mapper.UserLoginMapper;
+import com.zy.asrs.wms.system.entity.UserLogin;
+import com.zy.asrs.wms.system.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, String token, Integer type, Long hostId, String memo, HttpServletRequest request) {
+ if (userId == null) {
+ return;
+ }
+ UserLogin userLogin = new UserLogin();
+ userLogin.setUserId(userId);
+ userLogin.setToken(token);
+ userLogin.setType(type);
+ userLogin.setIp(IpTools.gainRealIp(request));
+ userLogin.setMemo(memo);
+ userLogin.setSystemCode(String.valueOf(LoginSystemType.WMS));
+ userLogin.setHostId(hostId);
+ baseMapper.insert(userLogin);
+ }
+
+ @Override
+ public UserLogin superFindByUserId(Long userId, String system) {
+ return this.baseMapper.superFindByUserId(userId, system);
+ }
+}
--
Gitblit v1.9.1