|
@@ -1,11 +1,23 @@
|
|
package com.ym.mec.biz.service.impl;
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.Calendar;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.LinkedHashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.huifu.adapay.model.payment.Payment;
|
|
import com.huifu.adapay.model.payment.Payment;
|
|
import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
|
|
import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
|
|
import com.ym.mec.biz.dal.entity.Goods;
|
|
import com.ym.mec.biz.dal.entity.Goods;
|
|
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
|
|
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
|
|
-import com.ym.mec.biz.dal.entity.VipGroup;
|
|
|
|
import com.ym.mec.biz.dal.enums.DealStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.DealStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.OrderTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.OrderTypeEnum;
|
|
@@ -20,11 +32,6 @@ import com.ym.mec.thirdparty.yqpay.Msg;
|
|
import com.ym.mec.thirdparty.yqpay.RsqMsg;
|
|
import com.ym.mec.thirdparty.yqpay.RsqMsg;
|
|
import com.ym.mec.thirdparty.yqpay.YqPayFeignService;
|
|
import com.ym.mec.thirdparty.yqpay.YqPayFeignService;
|
|
import com.ym.mec.thirdparty.yqpay.YqPayUtil;
|
|
import com.ym.mec.thirdparty.yqpay.YqPayUtil;
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
-
|
|
|
|
-import java.util.*;
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentOrder> implements StudentPaymentOrderService {
|
|
public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentOrder> implements StudentPaymentOrderService {
|
|
@@ -153,7 +160,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private void updateOrder(Map<String, String> rpMap) throws Exception {
|
|
private void updateOrder(Map<String, String> rpMap) throws Exception {
|
|
- DealStatusEnum status = rpMap.get("tradeState").equals("1") ? DealStatusEnum.SUCCESS : DealStatusEnum.FAilED;
|
|
|
|
|
|
+ DealStatusEnum status = rpMap.get("tradeState").equals("1") ? DealStatusEnum.SUCCESS : DealStatusEnum.FAILED;
|
|
StudentPaymentOrder order = findOrderByOrderNo(rpMap.get("merOrderNo"));
|
|
StudentPaymentOrder order = findOrderByOrderNo(rpMap.get("merOrderNo"));
|
|
if (order == null || !order.getStatus().equals(DealStatusEnum.ING)) {
|
|
if (order == null || !order.getStatus().equals(DealStatusEnum.ING)) {
|
|
return;
|
|
return;
|
|
@@ -188,7 +195,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
List<StudentPaymentOrder> ordersOverTime = findOrdersOverTime(orderNoList, DealStatusEnum.ING, beforeDate);
|
|
List<StudentPaymentOrder> ordersOverTime = findOrdersOverTime(orderNoList, DealStatusEnum.ING, beforeDate);
|
|
for (StudentPaymentOrder order : ordersOverTime) {
|
|
for (StudentPaymentOrder order : ordersOverTime) {
|
|
- order.setStatus(DealStatusEnum.FAilED);
|
|
|
|
|
|
+ order.setStatus(DealStatusEnum.FAILED);
|
|
order.setMemo("超时未支付关闭");
|
|
order.setMemo("超时未支付关闭");
|
|
if (order.getType().equals(OrderTypeEnum.APPLY)) { //报名订单
|
|
if (order.getType().equals(OrderTypeEnum.APPLY)) { //报名订单
|
|
studentRegistrationService.updateApplyOrder(order);
|
|
studentRegistrationService.updateApplyOrder(order);
|