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