|
@@ -111,19 +111,18 @@ public class TenantPaymentOrderServiceImpl extends BaseServiceImpl<Long, TenantP
|
|
|
List<TenantPaymentOrder> orderList = tenantPaymentOrderDao.queryByUserId(userId);
|
|
|
if (orderList != null && orderList.size() > 0) {
|
|
|
for (TenantPaymentOrder po : orderList) {
|
|
|
- if (po.getStatus() == DealStatusEnum.ING || po.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
- ++purchaseTimes;
|
|
|
+ // 是否满足条件
|
|
|
+ if (tenantEntryActivities.getSuitableUser() == SuitableUser.NEW) {
|
|
|
+ if (po.getStatus() == DealStatusEnum.ING) {
|
|
|
+ throw new BizException("您存在'处理中' 的订单,请稍后重试(最多需等待30分钟)");
|
|
|
+ }
|
|
|
+ if (po.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
+ throw new BizException("您已参与过当前活动,每人只能参与一次");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 是否满足条件
|
|
|
- if (tenantEntryActivities.getSuitableUser() == SuitableUser.NEW) {
|
|
|
- if (purchaseTimes > 0) {
|
|
|
- throw new BizException("您已参与过当前活动,每人只能参与一次");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
TenantPaymentOrder tenantPaymentOrder = new TenantPaymentOrder();
|
|
|
tenantPaymentOrder.setUserId(userId);
|
|
|
tenantPaymentOrder.setTransMinutes(tenantEntryActivities.getPurchaseMinutes());
|