|
@@ -49,27 +49,30 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
public class UserService {
|
|
public class UserService {
|
|
|
- private UserRepo userRepo;
|
|
|
|
|
- private WxMaService wxMaService;
|
|
|
|
|
- private WxMpService wxMpService;
|
|
|
|
|
- private SmsService smsService;
|
|
|
|
|
- private StorageService storageService;
|
|
|
|
|
- private JwtTokenUtil jwtTokenUtil;
|
|
|
|
|
- private CaptchaService captchaService;
|
|
|
|
|
- private FollowService followService;
|
|
|
|
|
- private FollowRepo followRepo;
|
|
|
|
|
- private IdentityAuthRepo identityAuthRepo;
|
|
|
|
|
- private SysConfigService sysConfigService;
|
|
|
|
|
|
|
+ private UserRepo userRepo;
|
|
|
|
|
+ private WxMaService wxMaService;
|
|
|
|
|
+ private WxMpService wxMpService;
|
|
|
|
|
+ private SmsService smsService;
|
|
|
|
|
+ private StorageService storageService;
|
|
|
|
|
+ private JwtTokenUtil jwtTokenUtil;
|
|
|
|
|
+ private CaptchaService captchaService;
|
|
|
|
|
+ private FollowService followService;
|
|
|
|
|
+ private FollowRepo followRepo;
|
|
|
|
|
+ private IdentityAuthRepo identityAuthRepo;
|
|
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
|
|
+ private CollectionService collectionService;
|
|
|
|
|
|
|
|
@CacheEvict(value = "user", key = "#user.username")
|
|
@CacheEvict(value = "user", key = "#user.username")
|
|
|
public User update(User user) {
|
|
public User update(User user) {
|
|
|
User orig = userRepo.findById(user.getId()).orElseThrow(new BusinessException("无记录"));
|
|
User orig = userRepo.findById(user.getId()).orElseThrow(new BusinessException("无记录"));
|
|
|
ObjUtils.merge(orig, user);
|
|
ObjUtils.merge(orig, user);
|
|
|
orig = userRepo.save(orig);
|
|
orig = userRepo.save(orig);
|
|
|
- userRepo.updateMinterForCollection(orig.getId());
|
|
|
|
|
- userRepo.updateOwnerForCollection(orig.getId());
|
|
|
|
|
- userRepo.updateMinterForOrder(orig.getId());
|
|
|
|
|
- userRepo.updateMinterForAsset(orig.getId());
|
|
|
|
|
|
|
+ userRepo.updateAssetMinter(orig.getId());
|
|
|
|
|
+ userRepo.updateAssetOwner(orig.getId());
|
|
|
|
|
+ userRepo.updateCollectionMinter(orig.getId());
|
|
|
|
|
+ userRepo.updateCollectionOwner(orig.getId());
|
|
|
|
|
+ userRepo.updateOrderMinter(orig.getId());
|
|
|
|
|
+ collectionService.clearCache();
|
|
|
return orig;
|
|
return orig;
|
|
|
}
|
|
}
|
|
|
|
|
|