Commit f6333632 by chongli

app社员权益下单接口报500修复

parent c2b50146
......@@ -102,22 +102,22 @@ public class BuyVoucherOrderService extends AbstractOrderService<CommuneOrderBea
BuyVoucherActivity buyoucherActivity = buyVoucherActivityDao.findById(communeOrderBean.getActivityId());
if(buyoucherActivity==null){
throw new OrderException(-688, "没有对应的活动,请检查");
throw new OrderException(-10, "没有对应的活动,请检查");
}
if(buyoucherActivity.getActivityStart().getTime()>(new Date()).getTime()){
throw new OrderException(-688, "该活动尚未开始");
throw new OrderException(-10, "该活动尚未开始");
}
if(buyoucherActivity.getActivityEnd().getTime()<(new Date()).getTime()){
throw new OrderException(-689, "该活动已经结束");
throw new OrderException(-10, "该活动已经结束");
}
if(communeOrderBean.getPrePayAmount().compareTo(buyoucherActivity.getCommunePrice()) != 0&&communeOrderBean.getPrePayAmount().compareTo(buyoucherActivity.getGuestPrice()) != 0){
throw new OrderException(-41, "您提交的预付款金额有问题,请检查!");
throw new OrderException(-10, "您提交的预付款金额有问题,请检查!");
}
int count = this.getOrderDao().queryVoucherPayedOrder(communeOrderBean.getUid(),communeOrderBean.getActivityId());
if(count>=buyoucherActivity.getBuyLimitTimes()){
throw new OrderException(-666, "您已经超过该活动限制次数!");
throw new OrderException(-10, "您已经超过该活动限制次数!");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment