|
@@ -47,6 +47,12 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
|
|
|
@Resource
|
|
@Resource
|
|
|
public HouseNumberService houseNumberService;
|
|
public HouseNumberService houseNumberService;
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ public HotelCoupomService hotelCoupomService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ public HotelCoupomStatusService hotelCoupomStatusService;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public int page; // 当前页
|
|
public int page; // 当前页
|
|
|
public int rows;// 每页显示的行数rows
|
|
public int rows;// 每页显示的行数rows
|
|
|
public Integer id;
|
|
public Integer id;
|
|
@@ -249,6 +255,30 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
|
|
|
book.setUpdateTime(UUIDUtil.getNewDate());
|
|
book.setUpdateTime(UUIDUtil.getNewDate());
|
|
|
book.setOrderStatus("5");
|
|
book.setOrderStatus("5");
|
|
|
msg = "退房";
|
|
msg = "退房";
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //通过订单id找到所属优惠券
|
|
|
|
|
+ List<HotelCouponStatus> hotelCouponStatusList = hotelCoupomStatusService.getBookingId(book.getId()+"");
|
|
|
|
|
+ if (hotelCouponStatusList != null && hotelCouponStatusList.size() > 0) {
|
|
|
|
|
+ System.out.println("进入核销优惠券");
|
|
|
|
|
+ for (HotelCouponStatus hotelCouponStatus : hotelCouponStatusList) {
|
|
|
|
|
+ String complaintId = hotelCouponStatus.getComplaintId();
|
|
|
|
|
+ System.out.println("核销优惠券id:"+complaintId);
|
|
|
|
|
+ HotelCoupon hotelCoupon = hotelCoupomService.getById(complaintId);
|
|
|
|
|
+ if (hotelCoupon!=null) {
|
|
|
|
|
+ Integer reversedNumber = hotelCoupon.getReversedNumber();
|
|
|
|
|
+ if (reversedNumber==null) {
|
|
|
|
|
+ reversedNumber=0;
|
|
|
|
|
+ }
|
|
|
|
|
+ hotelCoupon.setReversedNumber(reversedNumber+1);
|
|
|
|
|
+ hotelCoupon.setModifyDate(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
|
|
+ hotelCoupomService.updatReversedNumber(hotelCoupon);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
break;
|
|
break;
|
|
|
// case 4://退单
|
|
// case 4://退单
|
|
|
// if(!"2".equals(book.getOrderStatus())){
|
|
// if(!"2".equals(book.getOrderStatus())){
|