Commit 6733aa2e by 吕明尚

Merge branch 'dev' into test

parents 38b14468 4d116911
...@@ -146,11 +146,14 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC ...@@ -146,11 +146,14 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
if (CollectionUtil.isNotEmpty(consumerSecondaryCard)) { if (CollectionUtil.isNotEmpty(consumerSecondaryCard)) {
//过滤时长相等的 //过滤时长相等的
consumerSecondaryCard.stream().forEach(item -> { consumerSecondaryCard.stream().forEach(item -> {
if (Objects.equals(item.getSingleDuration(), Integer.valueOf(label.getDuration())) if (new BigDecimal(label.getDuration()).compareTo(BigDecimal.ONE) >= 0) {
&& item.getSingleAmount().compareTo(new BigDecimal(label.getDuration()).multiply(room.getPrice())) >= 0) { if (Objects.equals(item.getSingleDuration(), Integer.valueOf(label.getDuration()))
consumerSecondaryCardList.add(item.getId()); && item.getSingleAmount().compareTo(new BigDecimal(label.getDuration()).multiply(room.getPrice())) >= 0) {
map.put("consumerSecondaryCard", consumerSecondaryCardList); consumerSecondaryCardList.add(item.getId());
map.put("consumerSecondaryCard", consumerSecondaryCardList);
}
} }
}); });
} }
return map; return map;
...@@ -175,7 +178,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC ...@@ -175,7 +178,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
return map; return map;
//标签绑定了套餐,套餐没开启,小时 //标签绑定了套餐,套餐没开启,小时
} else { } else {
if (ObjectUtil.isNotEmpty(consumerMonthlyCard)) { if (ObjectUtil.isNotEmpty(consumerMonthlyCard) && new BigDecimal(label.getDuration()).compareTo(BigDecimal.ONE) >= 0) {
consumerMonthlyCardList.add(consumerMonthlyCard.getId()); consumerMonthlyCardList.add(consumerMonthlyCard.getId());
map.put("consumerMonthlyCard", consumerMonthlyCardList); map.put("consumerMonthlyCard", consumerMonthlyCardList);
} }
......
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