|
|
@@ -5,7 +5,6 @@ import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
|
|
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
|
|
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
|
|
import com.izouma.nineth.TokenHistory;
|
|
|
-import com.izouma.nineth.config.AdapayProperties;
|
|
|
import com.izouma.nineth.config.Constants;
|
|
|
import com.izouma.nineth.domain.Collection;
|
|
|
import com.izouma.nineth.domain.*;
|
|
|
@@ -34,7 +33,6 @@ import org.apache.commons.lang3.RandomStringUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
-import org.springframework.context.ApplicationContext;
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageImpl;
|
|
|
@@ -62,22 +60,19 @@ public class UserService {
|
|
|
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 AdapayService adapayService;
|
|
|
private UserBankCardRepo userBankCardRepo;
|
|
|
private InviteRepo inviteRepo;
|
|
|
private NFTService nftService;
|
|
|
private CacheService cacheService;
|
|
|
- private ApplicationContext context;
|
|
|
private TokenHistoryRepo tokenHistoryRepo;
|
|
|
private CollectionRepo collectionRepo;
|
|
|
- private AdapayProperties adapayProperties;
|
|
|
private AdapayMerchantService adapayMerchantService;
|
|
|
private PointRecordRepo pointRecordRepo;
|
|
|
+ private CollectionService collectionService;
|
|
|
|
|
|
public User update(User user) {
|
|
|
User orig = userRepo.findById(user.getId()).orElseThrow(new BusinessException("无记录"));
|
|
|
@@ -214,7 +209,7 @@ public class UserService {
|
|
|
.point(1)
|
|
|
.build());
|
|
|
// 扣除藏品额度
|
|
|
- collectionRepo.updateVipQuota(collectionId, -1);
|
|
|
+ collectionService.decreaseQuota(collectionId, 1);
|
|
|
}
|
|
|
}
|
|
|
}
|