【7.1.1】【bugfix】【c】更新c端用户上次登录时间

pull/22/head
fengshuonan 2021-08-10 16:54:17 +08:00
parent fb4e17343e
commit 3b029cde30
1 changed files with 1 additions and 0 deletions

View File

@ -212,6 +212,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
// 更新用户ip和登录时间
String ip = HttpServletUtil.getRequestClientIp(HttpServletUtil.getRequest());
LambdaUpdateWrapper<Customer> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(Customer::getCustomerId, loginUser.getUserId());
updateWrapper.set(Customer::getLastLoginIp, ip);
updateWrapper.set(Customer::getLastLoginTime, new Date());
this.update(updateWrapper);