|
|
@@ -1848,13 +1848,20 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
livingLayoutDayPriceService.remove(Wrappers.<BusLivingLayoutDayPrice>query()
|
|
|
.ge("day_time", DateUtils.formatDate(new Date()))
|
|
|
.eq("living_order_id",info.getLivingOrderId()));
|
|
|
- info.getDayPrices().forEach(s-> {
|
|
|
- if(new Date().getTime() < s.getDayTime().getTime()) return;
|
|
|
- if(s.getId() == null || s.getId().isEmpty()){
|
|
|
- livingLayoutDayPriceService.save(s);
|
|
|
- } else {
|
|
|
- livingLayoutDayPriceService.updateById(s);
|
|
|
+
|
|
|
+ info.getDayPrices().stream().forEach(s-> {
|
|
|
+ long stamp1 = 0;
|
|
|
+ long stamp2 = 0;
|
|
|
+ try{
|
|
|
+ stamp1 = DateUtils.parseDate(DateUtils.formatDate(s.getDayTime()) ,"yyyy-MM-dd").getTime();
|
|
|
+ stamp2 = DateUtils.parseDate(DateUtils.formatDate(new Date()) ,"yyyy-MM-dd").getTime();
|
|
|
+
|
|
|
+ } catch(Exception error) {
|
|
|
+ error.printStackTrace();
|
|
|
}
|
|
|
+ if(stamp1 == 0 || stamp2 == 0 || stamp1 < stamp2) return;
|
|
|
+ s.setId(null);
|
|
|
+ livingLayoutDayPriceService.save(s);
|
|
|
if(DateUtils.formatDate(new Date()).equals(DateUtils.formatDate(s.getDayTime()))){
|
|
|
// 修改当日房价 产生的当日房费账单也要改
|
|
|
BusOrderFee fee = feeService.getOne(Wrappers.<BusOrderFee>query()
|