Commit 73a5fa24 authored by 王亮's avatar 王亮

fixed an issues.

parent 79c84199
...@@ -40,7 +40,7 @@ public class UserTagLoginEventListener implements ApplicationListener<UserLoginE ...@@ -40,7 +40,7 @@ public class UserTagLoginEventListener implements ApplicationListener<UserLoginE
*/ */
@Override @Override
public void onApplicationEvent(UserLoginEvent userLoginEvent) { public void onApplicationEvent(UserLoginEvent userLoginEvent) {
log.info("UserTagLoginEventListener接收监听事件:{}",JSONObject.toJSONString(userLoginEvent)); log.info("UserTagLoginEventListener接收监听事件:{}", JSONObject.toJSONString(userLoginEvent));
if (userLoginEvent.getUserTag() != null) { if (userLoginEvent.getUserTag() != null) {
UserTag userTag = userLoginEvent.getUserTag(); UserTag userTag = userLoginEvent.getUserTag();
UserTag preTag = userTagRepository.findByUserIdAndTenantIdAndRegisteredFrom(userTag.getUserId(), userTag.getTenantId(), userTag.getRegisteredFrom()); UserTag preTag = userTagRepository.findByUserIdAndTenantIdAndRegisteredFrom(userTag.getUserId(), userTag.getTenantId(), userTag.getRegisteredFrom());
...@@ -55,9 +55,13 @@ public class UserTagLoginEventListener implements ApplicationListener<UserLoginE ...@@ -55,9 +55,13 @@ public class UserTagLoginEventListener implements ApplicationListener<UserLoginE
} }
preTag.setUpdatedAt(userTag.getUpdatedAt() == null ? LocalDateTime.now() : userTag.getUpdatedAt()); preTag.setUpdatedAt(userTag.getUpdatedAt() == null ? LocalDateTime.now() : userTag.getUpdatedAt());
try {
userTagRepository.save(preTag);
} catch (Exception ex) {
return;
}
userTagRepository.save(preTag); User user = userService.findById(preTag.getUserId(), preTag.getTenantId());
User user = userService.findById(preTag.getUserId(),preTag.getTenantId());
//补签合同,如果需要补签 //补签合同,如果需要补签
String lockKey = "user:signcontrac:".concat(user.getId().toString()); String lockKey = "user:signcontrac:".concat(user.getId().toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment