|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|