Explorar o código

邀请的藏品

licailing %!s(int64=3) %!d(string=hai) anos
pai
achega
969fd3f237

+ 4 - 2
src/main/java/com/izouma/nineth/service/IdentityAuthService.java

@@ -65,8 +65,10 @@ public class IdentityAuthService {
             if (user.getInvitor() != null) {
             if (user.getInvitor() != null) {
                 userRepo.findByIdAndDelFalse(user.getInvitor()).ifPresent(user1 -> {
                 userRepo.findByIdAndDelFalse(user.getInvitor()).ifPresent(user1 -> {
                     user1.setInviteNum(user1.getInviteNum() + 1);
                     user1.setInviteNum(user1.getInviteNum() + 1);
-                    if (user1.getInviteNum() >= 10) {
-                        int inviteCollection = sysConfigService.getInt("inviteCollection");
+                    int inviteNum = sysConfigService.getInt("invite_num");
+
+                    if (user1.getInviteNum() >= inviteNum) {
+                        int inviteCollection = sysConfigService.getInt("invite_collection");
                         // 藏品数量
                         // 藏品数量
                         Collection collection = collectionRepo.findById(1187810L)
                         Collection collection = collectionRepo.findById(1187810L)
                                 .orElseThrow(new BusinessException("无藏品"));
                                 .orElseThrow(new BusinessException("无藏品"));