|
@@ -147,6 +147,21 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
adaPayQuery();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean closeOrder(String orderNo) {
|
|
|
+ ExamRegistrationPayment order = examRegistrationPaymentDao.getByOrderNo(orderNo);
|
|
|
+ if (!order.getTransStatus().equals(TransStatusEnum.ING)) {
|
|
|
+ throw new BizException("订单不是待支付状态,请重新报名");
|
|
|
+ }
|
|
|
+ Date nowDate = new Date();
|
|
|
+ order.setTransStatus(TransStatusEnum.CLOSE);
|
|
|
+ order.setUpdateTime(nowDate);
|
|
|
+ if (examRegistrationPaymentDao.update(order) <= 0) {
|
|
|
+ throw new BizException("订单关闭失败,请重试");
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private void yqPayQuery() throws Exception {
|
|
|
List<ExamRegistrationPayment> orders = examRegistrationPaymentDao.getOrdersByStatus("ING", "YQPAY");
|