|
|
@@ -332,14 +332,14 @@ public class MintOrderService {
|
|
|
MintActivity mintActivity = mintActivityRepo.findByIdAndDelFalse(mintActivityId)
|
|
|
.orElseThrow(new BusinessException("无此铸造活动"));
|
|
|
|
|
|
- if (mintActivity.isScheduleSale()) {
|
|
|
- if (mintActivity.getStartTime().isAfter(LocalDateTime.now())) {
|
|
|
- throw new BusinessException("当前还未开售");
|
|
|
- }
|
|
|
- }
|
|
|
- if (!mintActivity.isOnShelf()) {
|
|
|
- throw new BusinessException("活动已下架");
|
|
|
- }
|
|
|
+// if (mintActivity.isScheduleSale()) {
|
|
|
+// if (mintActivity.getStartTime().isAfter(LocalDateTime.now())) {
|
|
|
+// throw new BusinessException("当前还未开售");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (!mintActivity.isOnShelf()) {
|
|
|
+// throw new BusinessException("活动已下架");
|
|
|
+// }
|
|
|
|
|
|
UserAddress userAddress = null;
|
|
|
if (addressId != null) {
|
|
|
@@ -489,7 +489,6 @@ public class MintOrderService {
|
|
|
|
|
|
airDropService.testCreate(AirDrop.builder()
|
|
|
.name("铸造活动[" + mintActivity.getName() + "]空投")
|
|
|
- .remark(mintOrder.getId().toString())
|
|
|
.type(AirDropType.asset)
|
|
|
.userIds(Collections.singletonList(mintOrder.getUserId()))
|
|
|
.collectionId(mintActivity.getAirDropCollectionId())
|
|
|
@@ -499,11 +498,15 @@ public class MintOrderService {
|
|
|
.build());
|
|
|
} catch (Exception e) {
|
|
|
ex = e;
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
mintActivityService.increaseStock(mintActivityId, 1);
|
|
|
if (ex == null) {
|
|
|
return "测试通过";
|
|
|
} else {
|
|
|
+ if (StringUtils.isEmpty(ex.getMessage())) {
|
|
|
+ return ex.toString();
|
|
|
+ }
|
|
|
return ex.getMessage();
|
|
|
}
|
|
|
}
|