Commit 1ee24ead by 吕明尚

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

parent 1002f040
...@@ -146,8 +146,8 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC ...@@ -146,8 +146,8 @@ 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(roomLabel.getPromotionDuration())) if (Objects.equals(item.getSingleDuration(), Integer.valueOf(label.getDuration()))
&& item.getSingleAmount().compareTo(new BigDecimal(roomLabel.getPromotionDuration()).multiply(room.getPrice())) >= 0) { && item.getSingleAmount().compareTo(new BigDecimal(label.getDuration()).multiply(room.getPrice())) >= 0) {
consumerSecondaryCardList.add(item.getId()); consumerSecondaryCardList.add(item.getId());
map.put("consumerSecondaryCard", consumerSecondaryCardList); map.put("consumerSecondaryCard", consumerSecondaryCardList);
} }
...@@ -179,6 +179,16 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC ...@@ -179,6 +179,16 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
consumerMonthlyCardList.add(consumerMonthlyCard.getId()); consumerMonthlyCardList.add(consumerMonthlyCard.getId());
map.put("consumerMonthlyCard", consumerMonthlyCardList); map.put("consumerMonthlyCard", consumerMonthlyCardList);
} }
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);
}
});
}
return map; return map;
} }
} }
......
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