| | |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import jakarta.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) { |
| | | public void saveAsync(Long userId, String token, Integer type, Long tenantId, String memo, HttpServletRequest request) { |
| | | if (userId == null) { |
| | | return; |
| | | } |
| | |
| | | userLogin.setUserId(userId); |
| | | userLogin.setToken(token); |
| | | userLogin.setType(type); |
| | | userLogin.setTenantId(tenantId); |
| | | userLogin.setIp(IpTools.gainRealIp(request)); |
| | | userLogin.setMemo(memo); |
| | | baseMapper.insert(userLogin); |
| | | } |
| | | |
| | | } |
| | | |