Commit 726cc5c7 by 吕明尚

修改次卡,月卡的可使用查询

parent 4d116911
......@@ -185,10 +185,12 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
if (CollectionUtil.isNotEmpty(consumerSecondaryCard)) {
//过滤时长相等的
consumerSecondaryCard.stream().forEach(item -> {
if (Objects.equals(item.getSingleDuration(), Integer.valueOf(label.getDuration()))
&& item.getSingleAmount().compareTo(new BigDecimal(label.getDuration()).multiply(room.getPrice())) >= 0) {
consumerSecondaryCardList.add(item.getId());
map.put("consumerSecondaryCard", consumerSecondaryCardList);
if (new BigDecimal(label.getDuration()).compareTo(BigDecimal.ONE) >= 0) {
if (Objects.equals(item.getSingleDuration(), Integer.valueOf(label.getDuration()))
&& item.getSingleAmount().compareTo(new BigDecimal(label.getDuration()).multiply(room.getPrice())) >= 0) {
consumerSecondaryCardList.add(item.getId());
map.put("consumerSecondaryCard", consumerSecondaryCardList);
}
}
});
}
......
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