Commit 697eaeaa by 吕明尚

修改月卡的购买限制

parent 4b0677e6
......@@ -135,6 +135,10 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
throw new BaseException("请绑定手机号");
}
}
ConsumerMonthlyCard one = consumerMonthlyCardService.getOne(new LambdaQueryWrapper<ConsumerMonthlyCard>().eq(ConsumerMonthlyCard::getConsumerId, user.getId()));
if (ObjectUtil.isNotEmpty(one)) {
throw new BaseException("月卡一个月只能购买一次");
}
MonthlyCardOrder monthlyCardOrder = generatMonthlyCarddOrder(request, user);
monthlyCardOrder.setCreateTime(new Date());
save(monthlyCardOrder);
......
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 to comment