|
@@ -136,7 +136,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
{
|
|
{
|
|
|
// 获取所有的订单待支付状态
|
|
// 获取所有的订单待支付状态
|
|
|
StringBuffer strSqlBook = new StringBuffer();
|
|
StringBuffer strSqlBook = new StringBuffer();
|
|
|
- strSqlBook.append(" and order_status = '").append(PayEnum.ONE.getNum()).append("' ");
|
|
|
|
|
|
|
+ strSqlBook.append(" and order_status = '").append(PayEnum.待支付.getNum()).append("' ");
|
|
|
List<Booking> bookingList = bookService.queryList(strSqlBook.toString());
|
|
List<Booking> bookingList = bookService.queryList(strSqlBook.toString());
|
|
|
if (bookingList == null || bookingList.size() <= 0){
|
|
if (bookingList == null || bookingList.size() <= 0){
|
|
|
return null;
|
|
return null;
|
|
@@ -155,7 +155,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
if (flag)
|
|
if (flag)
|
|
|
{
|
|
{
|
|
|
// 如果超时,则将订单状态修改为已超时
|
|
// 如果超时,则将订单状态修改为已超时
|
|
|
- booking.setOrderStatus(Func.parseStr(PayEnum.SIX.getNum()));
|
|
|
|
|
|
|
+ booking.setOrderStatus(Func.parseStr(PayEnum.支付超时.getNum()));
|
|
|
booking.setUpdateTime(TimeExchange.getDate());
|
|
booking.setUpdateTime(TimeExchange.getDate());
|
|
|
bookService.updateBooking(booking);
|
|
bookService.updateBooking(booking);
|
|
|
System.out.println("已将订单"+booking.getOrderNum()+"标识为支付超时");
|
|
System.out.println("已将订单"+booking.getOrderNum()+"标识为支付超时");
|
|
@@ -194,7 +194,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
if (flag)
|
|
if (flag)
|
|
|
{
|
|
{
|
|
|
// 如果超时,则将订单状态修改为已超时
|
|
// 如果超时,则将订单状态修改为已超时
|
|
|
- booking.setOrderStatus(Func.parseStr(PayEnum.SIX.getNum()));
|
|
|
|
|
|
|
+ booking.setOrderStatus(Func.parseStr(PayEnum.支付超时.getNum()));
|
|
|
booking.setUpdateTime(TimeExchange.getDate());
|
|
booking.setUpdateTime(TimeExchange.getDate());
|
|
|
bookService.updateBooking(booking);
|
|
bookService.updateBooking(booking);
|
|
|
System.out.println("已将订单"+booking.getOrderNum()+"标识为支付超时");
|
|
System.out.println("已将订单"+booking.getOrderNum()+"标识为支付超时");
|
|
@@ -260,42 +260,42 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 再次预订
|
|
|
|
|
- *
|
|
|
|
|
- * @return
|
|
|
|
|
- */
|
|
|
|
|
- public String reCreateOrder() {
|
|
|
|
|
- // 插入订单数据到表中
|
|
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
|
|
- if (Func.checkNull(houseId) || Func.checkNull(startTime) || Func.checkNull(endTime)
|
|
|
|
|
- || Func.checkNull(houseOrderNumber) || Func.checkNull(userName) || Func.checkNull(userPhone) || Func.checkNull(userId)) {
|
|
|
|
|
- jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
|
|
- jsonObject.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
|
|
|
- ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 将时间统一转化为 yyyy/MM/dd
|
|
|
|
|
- String startDate = DateUtil.parseDateToStr((Func.parseDate(startTime)), DateUtil.Time_Formatter_Day);
|
|
|
|
|
- String endDate = DateUtil.parseDateToStr((Func.parseDate(endTime)), DateUtil.Time_Formatter_Day);
|
|
|
|
|
-
|
|
|
|
|
- // 创建订单之前,先验证是否有房间
|
|
|
|
|
- String backMessage = appBookService.varificationHouse(houseId, startDate, endDate);
|
|
|
|
|
- if (Func.checkNull(backMessage)) {
|
|
|
|
|
- jsonObject.put(B.code, ResultStatusCode.CANNTBOOKING.getStatus());
|
|
|
|
|
- jsonObject.put(B.message, backMessage);
|
|
|
|
|
- ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- appBookService.reCreateOrder(houseId, startTime, endTime, houseOrderNumber, userName, userPhone, userId);
|
|
|
|
|
-
|
|
|
|
|
- jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
|
|
|
- jsonObject.put(B.message, ResultStatusCode.OK.getMsg());
|
|
|
|
|
- ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// /**
|
|
|
|
|
+// * 再次预订
|
|
|
|
|
+// *
|
|
|
|
|
+// * @return
|
|
|
|
|
+// */
|
|
|
|
|
+// public String reCreateOrder() {
|
|
|
|
|
+// // 插入订单数据到表中
|
|
|
|
|
+// JSONObject jsonObject = new JSONObject();
|
|
|
|
|
+// if (Func.checkNull(houseId) || Func.checkNull(startTime) || Func.checkNull(endTime)
|
|
|
|
|
+// || Func.checkNull(houseOrderNumber) || Func.checkNull(userName) || Func.checkNull(userPhone) || Func.checkNull(userId)) {
|
|
|
|
|
+// jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
|
|
+// jsonObject.put(B.message, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
|
|
|
+// ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
+// return null;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// // 将时间统一转化为 yyyy/MM/dd
|
|
|
|
|
+// String startDate = DateUtil.parseDateToStr((Func.parseDate(startTime)), DateUtil.Time_Formatter_Day);
|
|
|
|
|
+// String endDate = DateUtil.parseDateToStr((Func.parseDate(endTime)), DateUtil.Time_Formatter_Day);
|
|
|
|
|
+//
|
|
|
|
|
+// // 创建订单之前,先验证是否有房间
|
|
|
|
|
+// String backMessage = appBookService.varificationHouse(houseId, startDate, endDate);
|
|
|
|
|
+// if (Func.checkNull(backMessage)) {
|
|
|
|
|
+// jsonObject.put(B.code, ResultStatusCode.CANNTBOOKING.getStatus());
|
|
|
|
|
+// jsonObject.put(B.message, backMessage);
|
|
|
|
|
+// ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
+// return null;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// appBookService.reCreateOrder(houseId, startTime, endTime, houseOrderNumber, userName, userPhone, userId);
|
|
|
|
|
+//
|
|
|
|
|
+// jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
|
|
|
+// jsonObject.put(B.message, ResultStatusCode.OK.getMsg());
|
|
|
|
|
+// ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
|
|
|
|
|
+// return null;
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* bookingId 订单id
|
|
* bookingId 订单id
|
|
@@ -317,7 +317,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
|
if (status == 1)
|
|
if (status == 1)
|
|
|
{
|
|
{
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.SEVEN.getNum())); // 如果在1待支付情况,用户点击取消订单按钮,后台直接修改取消订单操作
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.已取消.getNum())); // 如果在1待支付情况,用户点击取消订单按钮,后台直接修改取消订单操作
|
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
bookService.updateBooking(book);
|
|
bookService.updateBooking(book);
|
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
@@ -326,12 +326,12 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
return null;
|
|
return null;
|
|
|
}else if (status == 2 || status == 3)
|
|
}else if (status == 2 || status == 3)
|
|
|
{
|
|
{
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.TEN.getNum())); // 如果在2已支付,3待入住 情况,商家点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
|
|
|
- book.setRemake(Func.parseStr(PayEnum.EIGHT.getNum()));
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.退款中.getNum())); // 如果在2已支付,3待入住 情况,商家点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
|
|
|
+ book.setRemake(Func.parseStr(PayEnum.已退单.getPayStatus()));
|
|
|
}else if(status == 4)
|
|
}else if(status == 4)
|
|
|
{
|
|
{
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.TEN.getNum())); // 如果在2已支付,3待入住 情况,商家点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
|
|
|
- book.setRemake(Func.parseStr(PayEnum.NINE.getNum()));
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.退款中.getNum())); // 如果在2已支付,3待入住 情况,商家点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
|
|
|
+ book.setRemake(Func.parseStr(PayEnum.已退款.getPayStatus()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (book.getPayAccount() > 0)
|
|
if (book.getPayAccount() > 0)
|
|
@@ -388,9 +388,9 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
|
if (status == 1)
|
|
if (status == 1)
|
|
|
{
|
|
{
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.SEVEN.getNum())); // 如果在1待支付情况,用户点击取消订单按钮,后台直接修改取消订单操作
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.已取消.getNum())); // 如果在1待支付情况,用户点击取消订单按钮,后台直接修改取消订单操作
|
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
- book.setRemake(Func.parseStr(PayEnum.SEVEN.getNum()));
|
|
|
|
|
|
|
+ book.setRemake(Func.parseStr(PayEnum.已取消.getPayStatus()));
|
|
|
bookService.updateBooking(book);
|
|
bookService.updateBooking(book);
|
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
jsonObject.put(B.code, ResultStatusCode.OK.getStatus());
|
|
|
jsonObject.put(B.message, "已取消订单");
|
|
jsonObject.put(B.message, "已取消订单");
|
|
@@ -400,9 +400,9 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
}else if (status == 2 || status == 3)
|
|
}else if (status == 2 || status == 3)
|
|
|
{
|
|
{
|
|
|
// 如果在2已支付,3待入住 情况,用户点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
// 如果在2已支付,3待入住 情况,用户点击取消订单按钮,后台先修改状态为退款中,然后走退款流程
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.TEN.getNum()));
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.退款中.getNum()));
|
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
book.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
- book.setRemake(Func.parseStr(PayEnum.SEVEN.getNum()));
|
|
|
|
|
|
|
+ book.setRemake(Func.parseStr(PayEnum.已取消.getPayStatus()));
|
|
|
if (book.getPayAccount() > 0)
|
|
if (book.getPayAccount() > 0)
|
|
|
{
|
|
{
|
|
|
// 注明如果支付金额大于0,则需要退款: (标识走退款操作)
|
|
// 注明如果支付金额大于0,则需要退款: (标识走退款操作)
|
|
@@ -442,7 +442,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 进行判断如果订单是退款中,并且标识字段微信退款,则进入退款流程
|
|
// 进行判断如果订单是退款中,并且标识字段微信退款,则进入退款流程
|
|
|
- if (Func.parseStr(PayEnum.TEN.getNum()).equals(book.getOrderStatus()) && OrderEnum.微信退款.toString().equals(book.getRefundWay())) {
|
|
|
|
|
|
|
+ if (Func.parseStr(PayEnum.退款中.getNum()).equals(book.getOrderStatus()) && OrderEnum.微信退款.toString().equals(book.getRefundWay())) {
|
|
|
String ip = WeiXinUtil.ip;
|
|
String ip = WeiXinUtil.ip;
|
|
|
double money = book.getPayAccount();
|
|
double money = book.getPayAccount();
|
|
|
int a = (int) (money * 100);
|
|
int a = (int) (money * 100);
|
|
@@ -495,7 +495,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 设置订单状态为退款中
|
|
// 设置订单状态为退款中
|
|
|
- book.setOrderStatus(Func.parseStr(PayEnum.TEN.getNum()));
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.退款中.getNum()));
|
|
|
book.setUpdateTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
book.setUpdateTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
|
|
|
bookService.updateBooking(book); // 退款中
|
|
bookService.updateBooking(book); // 退款中
|
|
|
|
|
|
|
@@ -600,7 +600,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
|
|
|
|
|
// 查询本地数据库中,正在退款中
|
|
// 查询本地数据库中,正在退款中
|
|
|
StringBuffer strSqlBook = new StringBuffer();
|
|
StringBuffer strSqlBook = new StringBuffer();
|
|
|
- strSqlBook.append(" and order_status = '").append(PayEnum.TEN.getNum()).append("' ");
|
|
|
|
|
|
|
+ strSqlBook.append(" and order_status = '").append(PayEnum.退款中.getNum()).append("' ");
|
|
|
List<Booking> booking = bookService.queryList(strSqlBook.toString());
|
|
List<Booking> booking = bookService.queryList(strSqlBook.toString());
|
|
|
if (booking==null){
|
|
if (booking==null){
|
|
|
return null;
|
|
return null;
|
|
@@ -635,23 +635,23 @@ 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(PayEnum.getValueBykey(Func.parseInt(book.getRemake()))); // 将走微信前的标识,写入回调函数
|
|
|
|
|
|
|
+ book.setOrderStatus(Func.parseStr(PayEnum.getKeyByValue(book.getRemake()))); // 将走微信前的标识,写入回调函数
|
|
|
bookService.updateBooking(book);
|
|
bookService.updateBooking(book);
|
|
|
|
|
|
|
|
// 发送成功消息给商家和用户
|
|
// 发送成功消息给商家和用户
|
|
|
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.getRemake();
|
|
|
// 推给用户(需求确定,用户点取消退款以后[标识订单状态已取消]只发商家,不发用户。 商家点拒单以后[标识订单状态已退单]只发用户不发商家)
|
|
// 推给用户(需求确定,用户点取消退款以后[标识订单状态已取消]只发商家,不发用户。 商家点拒单以后[标识订单状态已退单]只发用户不发商家)
|
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
int status = Func.parseInt(book.getOrderStatus());
|
|
|
- if (status == PayEnum.EIGHT.getNum()){
|
|
|
|
|
|
|
+ if (status == PayEnum.已退单.getNum()){
|
|
|
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 live_end = book.getOrderStartTime().substring(0,10) +"~"+ book.getOrderEndTime().substring(0,10);
|
|
|
String hotelName = Func.checkNull(book.getHotelName()) ? book.getHotelName() : book.getHouseName();
|
|
String hotelName = Func.checkNull(book.getHotelName()) ? book.getHotelName() : book.getHouseName();
|
|
|
- if (status == PayEnum.SEVEN.getNum()) {
|
|
|
|
|
|
|
+ if (status == PayEnum.已取消.getNum()) {
|
|
|
Message2.send(adminManager.getOpenid(), book.getOrderNum(), book.getHouseName(), live_end, book.getUserName(), hotelName, Func.parseStr(book.getId()));
|
|
Message2.send(adminManager.getOpenid(), book.getOrderNum(), book.getHouseName(), live_end, book.getUserName(), hotelName, Func.parseStr(book.getId()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -745,7 +745,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
|
|
|
|
|
Users users = userService.queryByOpenid(open_id); // 用户信息
|
|
Users users = userService.queryByOpenid(open_id); // 用户信息
|
|
|
Booking booking = bookService.getById(Func.parseInt(bookingId)); // 订单信息
|
|
Booking booking = bookService.getById(Func.parseInt(bookingId)); // 订单信息
|
|
|
- if (users == null || booking == null || booking.getOrderStatus().equals(Func.parseStr(PayEnum.SIX.getNum()))) {
|
|
|
|
|
|
|
+ if (users == null || booking == null || booking.getOrderStatus().equals(Func.parseStr(PayEnum.支付超时.getNum()))) {
|
|
|
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, ResultStatusCode.BAD_REQUEST.getMsg());
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultjson.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(), resultjson.toString());
|
|
@@ -814,7 +814,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
pay.setPaySign(PayWxUtil.getSign(requestMap, WeiXinUtil.key));
|
|
pay.setPaySign(PayWxUtil.getSign(requestMap, WeiXinUtil.key));
|
|
|
// 保存支付信息
|
|
// 保存支付信息
|
|
|
booking.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
booking.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
- booking.setOrderStatus(Func.parseStr(PayEnum.ONE.getNum()));
|
|
|
|
|
|
|
+ booking.setOrderStatus(Func.parseStr(PayEnum.待支付.getNum()));
|
|
|
booking.setPayTime(DateUtil.getFormatPaternDate(new Date()));
|
|
booking.setPayTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
booking.setPayAccount(totalPrice);
|
|
booking.setPayAccount(totalPrice);
|
|
|
booking.setPayWay(OrderEnum.微信支付.toString());
|
|
booking.setPayWay(OrderEnum.微信支付.toString());
|
|
@@ -857,17 +857,17 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
|
|
|
System.out.println("支付成功回调,订单号:"+order_num);
|
|
System.out.println("支付成功回调,订单号:"+order_num);
|
|
|
Booking booking = bookService.queryByOrder(order_num);
|
|
Booking booking = bookService.queryByOrder(order_num);
|
|
|
// 支付成功
|
|
// 支付成功
|
|
|
- if (result.getResult_code().equals("SUCCESS") && booking!=null && booking.getOrderStatus().equals("1")) {
|
|
|
|
|
|
|
+ if (result.getResult_code().equals("SUCCESS") && booking!=null && ("1").equals(booking.getOrderStatus())) {
|
|
|
// 保存支付信息
|
|
// 保存支付信息
|
|
|
booking.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
booking.setUpdateTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
- booking.setOrderStatus(Func.parseStr(PayEnum.TWO.getNum()));
|
|
|
|
|
|
|
+ booking.setOrderStatus(Func.parseStr(PayEnum.已支付.getNum()));
|
|
|
booking.setPayTime(DateUtil.getFormatPaternDate(new Date()));
|
|
booking.setPayTime(DateUtil.getFormatPaternDate(new Date()));
|
|
|
booking.setPayWay(OrderEnum.微信支付.toString());
|
|
booking.setPayWay(OrderEnum.微信支付.toString());
|
|
|
// 进行业务判断,如果是商家设定了自动接单,则支付状态直接变为待入住 接单设置(1自动接单 2手动接单)
|
|
// 进行业务判断,如果是商家设定了自动接单,则支付状态直接变为待入住 接单设置(1自动接单 2手动接单)
|
|
|
- if ("1".equals(booking.getHotelIsCanorder()))
|
|
|
|
|
|
|
+ if ("1".equals(booking.getHotelIsOrder()))
|
|
|
{
|
|
{
|
|
|
// 自动接单,订单状态修改为待入住
|
|
// 自动接单,订单状态修改为待入住
|
|
|
- booking.setOrderStatus(Func.parseStr(PayEnum.THREE.getNum()));
|
|
|
|
|
|
|
+ booking.setOrderStatus(Func.parseStr(PayEnum.待入住.getNum()));
|
|
|
String userId = booking.getCreateUserid();
|
|
String userId = booking.getCreateUserid();
|
|
|
Users users = userService.queryByUserId(userId);
|
|
Users users = userService.queryByUserId(userId);
|
|
|
String mess = "您已成功订房,订单号:"+order_num;
|
|
String mess = "您已成功订房,订单号:"+order_num;
|