|
@@ -261,8 +261,8 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
/**
|
|
/**
|
|
|
* bookingId 订单id
|
|
* bookingId 订单id
|
|
|
* open_id
|
|
* open_id
|
|
|
- * 取消订单功能:
|
|
|
|
|
- * //1待支付,2已支付,3待入住,4已入住,5已消费,6支付超时,7已取消,8已退单,9已退款
|
|
|
|
|
|
|
+ * 取消订单功能: 用户点击
|
|
|
|
|
+ * //1待支付,2已支付,3待入住,4已入住,5已消费,6支付超时,7已取消,8已退单,9已退款,10退款中
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
@@ -273,7 +273,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
// 取消订单,修改订单的支付状态
|
|
// 取消订单,修改订单的支付状态
|
|
|
- String mess = bookService.cancelBooking(getBookingId());
|
|
|
|
|
|
|
+ String mess = bookService.cancelBooking(bookingId);
|
|
|
if (!Func.checkNull(mess)) {
|
|
if (!Func.checkNull(mess)) {
|
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
jsonObject.put(B.message, mess);
|
|
jsonObject.put(B.message, mess);
|
|
@@ -285,7 +285,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
if (booking == null )
|
|
if (booking == null )
|
|
|
{
|
|
{
|
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
- jsonObject.put(B.message, "未获取到订单信息");
|
|
|
|
|
|
|
+ jsonObject.put(B.message, "未获取到订单信息,请重新查询");
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -302,7 +302,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
if (Func.parseStr(PayEnum.TEN.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, "未传入open_id和bookingId");
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -310,7 +310,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
Users users = userService.queryByOpenid(open_id); // 用户信息
|
|
Users users = userService.queryByOpenid(open_id); // 用户信息
|
|
|
if (users == null || booking == null) {
|
|
if (users == null || booking == null) {
|
|
|
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, "未查询到当前用户数据users,请先授权");
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -393,7 +393,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
JSONObject resultJson = new JSONObject();
|
|
JSONObject resultJson = new JSONObject();
|
|
|
if (Func.checkNull(this.open_id) || Func.checkNull(this.bookingId)) {
|
|
if (Func.checkNull(this.open_id) || Func.checkNull(this.bookingId)) {
|
|
|
resultJson.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
resultJson.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
- resultJson.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
|
|
|
|
|
+ resultJson.put(B.message, "未传入open_id和bookingId");
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -402,7 +402,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
Booking booking = bookService.getById(Func.parseInt(bookingId)); // 订单信息
|
|
Booking booking = bookService.getById(Func.parseInt(bookingId)); // 订单信息
|
|
|
if (users == null || booking == null) {
|
|
if (users == null || booking == null) {
|
|
|
resultJson.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
resultJson.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
- resultJson.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
|
|
|
|
|
+ resultJson.put(B.message, "未查询到当前用户数据users,请先授权");
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -508,6 +508,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
book.setRefundTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
book.setRefundTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
|
book.setRefundAmount(book.getHouseTotalPrice());
|
|
book.setRefundAmount(book.getHouseTotalPrice());
|
|
|
book.setUpdateTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
book.setUpdateTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.NINE.getNum()));
|
|
|
bookService.updateBooking(book);
|
|
bookService.updateBooking(book);
|
|
|
|
|
|
|
|
|
|
|