|
|
@@ -708,7 +708,7 @@ public class MintOrderService {
|
|
|
mintOrder.setStatus(MintOrderStatus.AIR_DROP);
|
|
|
MintActivity mintActivity = mintActivityRepo.findById(mintOrder.getMintActivityId()).orElse(null);
|
|
|
if (ObjectUtils.isNotEmpty(mintActivity) && mintActivity.isAutoDrop()) {
|
|
|
-// if (!mintActivity.isDelay()) {
|
|
|
+ if (!mintActivity.isDelay()) {
|
|
|
User user = userRepo.findById(mintOrder.getUserId()).orElseThrow(new BusinessException("无用户"));
|
|
|
airDropService.create(AirDrop.builder()
|
|
|
.name("铸造活动[" + mintActivity.getName() + "]空投")
|
|
|
@@ -725,11 +725,11 @@ public class MintOrderService {
|
|
|
.build());
|
|
|
mintOrder.setStatus(MintOrderStatus.FINISH);
|
|
|
mintOrderRepo.save(mintOrder);
|
|
|
-// } else {
|
|
|
-// mintOrder.setDelay(true);
|
|
|
-// mintOrder.setAirDropTime(LocalDateTime.now().plusMinutes(mintActivity.getDelayHours()));
|
|
|
-// mintOrderRepo.save(mintOrder);
|
|
|
-// }
|
|
|
+ } else {
|
|
|
+ mintOrder.setDelay(true);
|
|
|
+ mintOrder.setAirDropTime(LocalDateTime.now().plusMinutes(mintActivity.getDelayHours()));
|
|
|
+ mintOrderRepo.save(mintOrder);
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
mintOrder.setStatus(MintOrderStatus.DELIVERY);
|
|
|
@@ -869,7 +869,7 @@ public class MintOrderService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
+ @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
public void airDropDelayedOrder() {
|
|
|
if (generalProperties.isNotifyServer()) {
|
|
|
throw new BusinessException("订单服务器不执行");
|