|
@@ -283,10 +283,15 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
|
|
|
|
|
Booking booking = bookService.getById(Func.parseInt(this.bookingId));
|
|
Booking booking = bookService.getById(Func.parseInt(this.bookingId));
|
|
|
if (booking == null || Func.checkNull(booking.getRefundWay()))
|
|
if (booking == null || Func.checkNull(booking.getRefundWay()))
|
|
|
|
|
+ {
|
|
|
|
|
+ jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
|
|
+ jsonObject.put(B.message, "未获取到订单信息");
|
|
|
|
|
+ ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 进行判断如果订单是已取消,并且标识字段微信退款,则进入退款流程
|
|
|
|
|
- if (Func.parseStr(PayEnum.SEVEN.getNum()).equals(booking.getOrderStatus()) && OrderEnum.微信退款.toString().equals(booking.getRefundWay())) {
|
|
|
|
|
|
|
+ // 进行判断如果订单是退款中,并且标识字段微信退款,则进入退款流程
|
|
|
|
|
+ if (Func.parseStr(PayEnum.TEN.getNum()).equals(booking.getOrderStatus()) && OrderEnum.微信退款.toString().equals(booking.getRefundWay())) {
|
|
|
if (Func.checkNull(this.open_id) || Func.checkNull(this.bookingId)) {
|
|
if (Func.checkNull(this.open_id) || Func.checkNull(this.bookingId)) {
|
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
jsonObject.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
jsonObject.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
@@ -365,7 +370,8 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
|
- jsonObject.put(B.message, ResultStatusCode.OK.getMsg());
|
|
|
|
|
|
|
+ jsonObject.put(B.message, "取消订单成功");
|
|
|
|
|
+ jsonObject.put(B.data, booking);
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -501,11 +507,19 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
AdminManager adminManager = adminManagerService.getById(Func.parseInt(book.getHotelManagerId()));
|
|
AdminManager adminManager = adminManagerService.getById(Func.parseInt(book.getHotelManagerId()));
|
|
|
Users users = userService.queryByUserId(book.getCreateUserid());
|
|
Users users = userService.queryByUserId(book.getCreateUserid());
|
|
|
String sendMsg = "订单:"+ book.getOrderNum() +"已退款成功,请注意查看";
|
|
String sendMsg = "订单:"+ book.getOrderNum() +"已退款成功,请注意查看";
|
|
|
- // 推给商家
|
|
|
|
|
- Message.send(adminManager.getOpenid(),book.getOrderNum(),book.getUserName(),sendMsg,book.getCreateTime());
|
|
|
|
|
// 推给用户
|
|
// 推给用户
|
|
|
Message.send(users.getOpenid(),book.getOrderNum(),book.getUserName(),sendMsg,book.getCreateTime());
|
|
Message.send(users.getOpenid(),book.getOrderNum(),book.getUserName(),sendMsg,book.getCreateTime());
|
|
|
|
|
|
|
|
|
|
+ // 推给商家
|
|
|
|
|
+ String live_end = book.getOrderStartTime().substring(0,10) +"~"+ book.getOrderEndTime().substring(0,10);
|
|
|
|
|
+ String hotelName = book.getHotelName();
|
|
|
|
|
+ if (Func.checkNull(book.getHotelName()))
|
|
|
|
|
+ {
|
|
|
|
|
+ hotelName = book.getHouseName();
|
|
|
|
|
+ }
|
|
|
|
|
+ Message2.send(adminManager.getOpenid(),book.getOrderNum(),book.getHouseName(),live_end,book.getUserName(),hotelName);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
String returnMsg = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
|
|
String returnMsg = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
|