wangqifan 2 éve
szülő
commit
f144452bed

+ 4 - 3
src/main/java/com/izouma/nineth/service/UserService.java

@@ -280,6 +280,7 @@ public class UserService {
         if (StringUtils.isBlank(name)) {
             name = "0x" + RandomStringUtils.randomAlphabetic(8);
         }
+        Long airDropCollectionId = collectionId;
         Invite invite = null;
         if (StringUtils.isNotBlank(inviteCode)) {
             invite = inviteRepo.findFirstByCode(inviteCode).orElse(null);
@@ -347,15 +348,15 @@ public class UserService {
             showroomRepo.addHeatAndRegister(showroomId, weight, 1);
         }
         //如果collectionId是设定的且invitor为空
-        if (collectionId != null) {
+        if (airDropCollectionId != null) {
             long MMC_collection_id = sysConfigService.getInt("MMC_collection_id");
-            if (collectionId == MMC_collection_id) {
+            if (airDropCollectionId == MMC_collection_id) {
                 airDropService.create(AirDrop.builder()
                                              .name("MMC注册空投奖励空投")
                                              .remark(user.getId().toString())
                                              .type(AirDropType.asset)
                                              .userIds(Collections.singletonList(user.getId()))
-                                             .collectionId(collectionId)
+                                             .collectionId(airDropCollectionId)
                                              .targets(Collections
                                                      .singletonList(new DropTarget(user.getId(), user
                                                              .getPhone(), user.getNickname(), 1)))