Commit 2644b447 authored by 技术部-任文超's avatar 技术部-任文超

this.method不会被spring处理,不会走缓存,舍弃this方式查询

parent 9b18b19e
......@@ -78,7 +78,7 @@ public class UserCenterServiceImpl implements UserCenterService {
* @return
*/
private synchronized UserAttached createUserAttached(Long userId, String avatar, String nick) {
UserAttached userAttached = this.searchUserAttachedByUserId(userId);
UserAttached userAttached = userAttachedRepository.findByUserId(userId);
// 更新实例
userAttached = Optional.ofNullable(userAttached).orElse(new UserAttached());
Timestamp now = new Timestamp(System.currentTimeMillis());
......
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