|  | @@ -113,7 +113,7 @@ public class StudentOrderController extends BaseController {
 | 
											
												
													
														|  |          //支付中订单存在,更新状态
 |  |          //支付中订单存在,更新状态
 | 
											
												
													
														|  |          if (msg.getResponseType().equals("1") && notifyMap.size() > 0) {
 |  |          if (msg.getResponseType().equals("1") && notifyMap.size() > 0) {
 | 
											
												
													
														|  |              String tradeState = msg.getCode().equals("88") ? "1" : "0";
 |  |              String tradeState = msg.getCode().equals("88") ? "1" : "0";
 | 
											
												
													
														|  | -            String channelType = notifyMap.get("channelType").equals("1") ? "WXPay" : (notifyMap.get("channelType").equals("2")?"Alipay":"quickPay");
 |  | 
 | 
											
												
													
														|  | 
 |  | +            String channelType = notifyMap.get("channelType").equals("1") ? "WXPay" : (notifyMap.get("channelType").equals("2") ? "Alipay" : "quickPay");
 | 
											
												
													
														|  |              notifyMap.put("tradeState", tradeState);
 |  |              notifyMap.put("tradeState", tradeState);
 | 
											
												
													
														|  |              notifyMap.put("totalMoney", notifyMap.get("payAmount"));
 |  |              notifyMap.put("totalMoney", notifyMap.get("payAmount"));
 | 
											
												
													
														|  |              notifyMap.put("merOrderNo", notifyMap.get("merMerOrderNo"));
 |  |              notifyMap.put("merOrderNo", notifyMap.get("merMerOrderNo"));
 | 
											
										
											
												
													
														|  | @@ -215,8 +215,8 @@ public class StudentOrderController extends BaseController {
 | 
											
												
													
														|  |              List<Map<String, String>> responseList = JSON.parseObject(responseParameters, List.class);
 |  |              List<Map<String, String>> responseList = JSON.parseObject(responseParameters, List.class);
 | 
											
												
													
														|  |              for (Map<String, String> response : responseList) {
 |  |              for (Map<String, String> response : responseList) {
 | 
											
												
													
														|  |                  Map<String, String> rpMap = response;
 |  |                  Map<String, String> rpMap = response;
 | 
											
												
													
														|  | -                String channelType = rpMap.get("channelType").equals("1") ? "WXPay" : (rpMap.get("channelType").equals("2")?"Alipay":"quickPay");
 |  | 
 | 
											
												
													
														|  | -                rpMap.put("channelType",channelType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                String channelType = rpMap.get("channelType").equals("1") ? "WXPay" : (rpMap.get("channelType").equals("2") ? "Alipay" : "quickPay");
 | 
											
												
													
														|  | 
 |  | +                rpMap.put("channelType", channelType);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  if (Arrays.asList(statusArr).contains(rpMap.get("tradeState"))) {
 |  |                  if (Arrays.asList(statusArr).contains(rpMap.get("tradeState"))) {
 | 
											
												
													
														|  |                      updateOrder(rpMap); //更新订单
 |  |                      updateOrder(rpMap); //更新订单
 | 
											
										
											
												
													
														|  | @@ -330,7 +330,6 @@ public class StudentOrderController extends BaseController {
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      @GetMapping("/authorize")
 |  |      @GetMapping("/authorize")
 | 
											
												
													
														|  |      public String authorize(@RequestParam("returnUrl") String returnUrl) {
 |  |      public String authorize(@RequestParam("returnUrl") String returnUrl) {
 | 
											
												
													
														|  |          String appId = "wxcf8e8b33a9477845";
 |  |          String appId = "wxcf8e8b33a9477845";
 | 
											
										
											
												
													
														|  | @@ -362,4 +361,26 @@ public class StudentOrderController extends BaseController {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    @Scheduled(cron = "0/5 * * * * ?")
 | 
											
												
													
														|  | 
 |  | +    public void setSuccessStatus() throws Exception {
 | 
											
												
													
														|  | 
 |  | +        List<StudentPaymentOrder> payingOrders = studentPaymentOrderService.findOrdersByStatus(DealStatusEnum.ING, "YQPAY");
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        String[] statusArr = {"0", "1", "7"};
 | 
											
												
													
														|  | 
 |  | +        for (StudentPaymentOrder payingOrder : payingOrders) {
 | 
											
												
													
														|  | 
 |  | +            Map<String, String> rpMap = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("tradeState", "1");
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("remarks", "模拟支付成功");
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("merOrderNo", payingOrder.getOrderNo());
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("orderNo", payingOrder.getOrderNo());
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("channelType", "1");
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            String channelType = rpMap.get("channelType").equals("1") ? "WXPay" : (rpMap.get("channelType").equals("2") ? "Alipay" : "quickPay");
 | 
											
												
													
														|  | 
 |  | +            rpMap.put("channelType", channelType);
 | 
											
												
													
														|  | 
 |  | +            if (Arrays.asList(statusArr).contains(rpMap.get("tradeState"))) {
 | 
											
												
													
														|  | 
 |  | +                updateOrder(rpMap); //更新订单
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  }
 |  |  }
 |