优化支付通知接口处理
This commit is contained in:
@@ -375,17 +375,16 @@ public class PaymentController extends BaseController {
|
|||||||
|
|
||||||
Order parentOrder = orderService.getById(order.getRentOrderId());
|
Order parentOrder = orderService.getById(order.getRentOrderId());
|
||||||
parentOrder.setCurrPeriods(parentOrder.getCurrPeriods() + 1);
|
parentOrder.setCurrPeriods(parentOrder.getCurrPeriods() + 1);
|
||||||
order.setCurrPeriods(parentOrder.getCurrPeriods());
|
|
||||||
order.setBatteryRent(parentOrder.getBatteryRent());
|
|
||||||
|
|
||||||
parentOrder.setPayStatus(PAY_STATUS_SUCCESS);
|
parentOrder.setPayStatus(PAY_STATUS_SUCCESS);
|
||||||
// 更新过期时间延长一个月
|
// 更新过期时间延长一个月
|
||||||
|
|
||||||
// 保存续费订单状态
|
// 保存续费订单状态
|
||||||
if (parentOrder.getCurrPeriods() >= parentOrder.getPeriods()) {
|
if (parentOrder.getCurrPeriods() >= parentOrder.getPeriods()) {
|
||||||
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
// SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
String format = sf.format(DateUtil.offset(new Date(), DateField.MONTH, 1200));
|
// String format = sf.format(DateUtil.offset(new Date(), DateField.MONTH, 1200));
|
||||||
Date parse = sf.parse(format);
|
// Date parse = sf.parse(format);
|
||||||
|
DateTime dt = DateUtil.offset(new Date(), DateField.MONTH, 1200);
|
||||||
|
Date parse = dt.toJdkDate();
|
||||||
|
|
||||||
parentOrder.setOrderStatus(ORDER_STATUS_OVER);
|
parentOrder.setOrderStatus(ORDER_STATUS_OVER);
|
||||||
parentOrder.setExpirationTime(parse);
|
parentOrder.setExpirationTime(parse);
|
||||||
@@ -398,6 +397,8 @@ public class PaymentController extends BaseController {
|
|||||||
parentOrder.setExpirationTime(order.getExpirationTime());
|
parentOrder.setExpirationTime(order.getExpirationTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
order.setCurrPeriods(parentOrder.getCurrPeriods());
|
||||||
|
order.setBatteryRent(parentOrder.getBatteryRent());
|
||||||
orderPayService.updateById(order);
|
orderPayService.updateById(order);
|
||||||
orderService.updateById(parentOrder);
|
orderService.updateById(parentOrder);
|
||||||
return "success";
|
return "success";
|
||||||
|
|||||||
Reference in New Issue
Block a user