Commit 867a0850 authored by 技术部-任文超's avatar 技术部-任文超

小动作

parent 6ffd8c55
...@@ -54,9 +54,10 @@ public class UserCenterServiceImpl implements UserCenterService { ...@@ -54,9 +54,10 @@ public class UserCenterServiceImpl implements UserCenterService {
if(Objects.isNull(userAttached)){ if(Objects.isNull(userAttached)){
userAttached = createUserAttached(userId, null, nick); userAttached = createUserAttached(userId, null, nick);
} }
if(!Objects.equals(nick, userAttached.getNick())){
// 替换所有,UTF-8编码时4字节的Emoji表情字符 // 替换所有,UTF-8编码时4字节的Emoji表情字符
userAttached.setNick(EmojiUtil.filterUnicode4(nick)); nick = EmojiUtil.filterUnicode4(nick);
if(!Objects.equals(nick, userAttached.getNick())){
userAttached.setNick(nick);
userAttached.setUpdatedAt(new Timestamp(System.currentTimeMillis())); userAttached.setUpdatedAt(new Timestamp(System.currentTimeMillis()));
try { try {
userAttached = userAttachedRepository.save(userAttached); userAttached = userAttachedRepository.save(userAttached);
......
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