|
@@ -111,10 +111,10 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
//更新报名人数,和报名金额
|
|
|
ExamOrganizationRelation examOrganizationRelation = examOrganizationRelationDao.getExamOrganizationRelation(examRegistration.getExaminationBasicId(), examRegistration.getOrganId());
|
|
|
- examOrganizationRelation.setTotalRegistrationStudentNum(examOrganizationRelation.getTotalRegistrationStudentNum()+1);
|
|
|
+ examOrganizationRelation.setTotalRegistrationStudentNum(examOrganizationRelation.getTotalRegistrationStudentNum() + 1);
|
|
|
BigDecimal amount = examOrganizationRelation.getTotalPaymentAmount().add(examRegistration.getLevelFee()).add(examRegistration.getTheoryLevelFee());
|
|
|
examOrganizationRelation.setTotalPaymentAmount(amount);
|
|
|
- if(examOrganizationRelationDao.update(examOrganizationRelation) <= 0){
|
|
|
+ if (examOrganizationRelationDao.update(examOrganizationRelation) <= 0) {
|
|
|
throw new BizException("报名人数报名金额更新失败");
|
|
|
}
|
|
|
return order;
|
|
@@ -217,7 +217,7 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
Map<String, Object> payment = Payment.queryPayment(order.getTransNo());
|
|
|
Map<String, String> rpMap = new HashMap<>();
|
|
|
rpMap.put("orderNo", order.getOrderNo());
|
|
|
- rpMap.put("transNo", (String) payment.get("id"));
|
|
|
+ rpMap.put("transNo", order.getTransNo());
|
|
|
rpMap.put("channelType", (String) payment.get("pay_channel"));
|
|
|
String status = (String) payment.get("status");
|
|
|
if (payment.containsKey("error_msg")) {
|
|
@@ -259,9 +259,12 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
List<ExamRegistrationPayment> ordersOverTime = examRegistrationPaymentDao.findOrdersOverTime(orderNoList, TransStatusEnum.ING, beforeDate);
|
|
|
for (ExamRegistrationPayment order : ordersOverTime) {
|
|
|
try {
|
|
|
- order.setTransStatus(TransStatusEnum.FAILED);
|
|
|
- order.setMemo("超时未支付关闭");
|
|
|
-
|
|
|
+ Map<String, String> rpMap = new HashMap<>();
|
|
|
+ rpMap.put("orderNo", order.getOrderNo());
|
|
|
+ rpMap.put("transNo", order.getTransNo());
|
|
|
+ rpMap.put("memo", "超时未支付关闭");
|
|
|
+ rpMap.put("transStatus", "FAILED");
|
|
|
+ updateOrder(rpMap); //更新订单
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
continue;
|