|  | @@ -9,6 +9,7 @@ import com.ym.mec.biz.service.PayService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentPaymentOrderService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.SysAccountService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.SysPaymentConfigService;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.adapay.Payment;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.union.UnionPay;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.union.UnionPayFeignService;
 | 
	
	
		
			
				|  | @@ -238,40 +239,28 @@ public class PayServiceImpl implements PayService {
 | 
	
		
			
				|  |  |       * @return
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      private List<SysAccount> getRoutingAccount(Map<String, BigDecimal> routingFee, String company, Integer organId) {
 | 
	
		
			
				|  |  | -        String channel = "";
 | 
	
		
			
				|  |  |          String type = "";
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          if (routingFee.get("COM").compareTo(BigDecimal.ZERO) > 0 && routingFee.get("PER").compareTo(BigDecimal.ZERO) > 0) {
 | 
	
		
			
				|  |  | -            channel = "YQPAY";
 | 
	
		
			
				|  |  |              type = "COM,PER";
 | 
	
		
			
				|  |  |          } else if (routingFee.get("COM").compareTo(BigDecimal.ZERO) > 0 && routingFee.get("PER").compareTo(BigDecimal.ZERO) == 0) {
 | 
	
		
			
				|  |  | -            channel = sysConfigDao.findConfigValue("com_account_channel");
 | 
	
		
			
				|  |  |              type = "COM";
 | 
	
		
			
				|  |  |          } else if (routingFee.get("COM").compareTo(BigDecimal.ZERO) == 0 && routingFee.get("PER").compareTo(BigDecimal.ZERO) > 0) {
 | 
	
		
			
				|  |  | -            channel = sysConfigDao.findConfigValue("per_account_channel");
 | 
	
		
			
				|  |  |              type = "PER";
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        List<SysAccount> accounts = sysAccountService.getAccount(company, channel, type, null);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        List<SysAccount> accounts = new ArrayList<>();
 | 
	
		
			
				|  |  |          if (sysConfigDao.findConfigValue("payment_channel").equals("ADAPAY")) {
 | 
	
		
			
				|  |  |              BigDecimal amount = routingFee.get("COM").add(routingFee.get("PER"));
 | 
	
		
			
				|  |  |              routingFee.put("COM", amount);
 | 
	
		
			
				|  |  |              routingFee.put("PER", BigDecimal.ZERO);
 | 
	
		
			
				|  |  |              accounts = sysAccountService.getAdaAccount(organId, "ADAPAY", amount);
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            accounts = sysAccountService.getAccount(company, "YQPAY", type, null);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          for (SysAccount account : accounts) {
 | 
	
		
			
				|  |  |              if (account.getType().equals("COM")) {
 | 
	
		
			
				|  |  |                  account.setRoutingFee(routingFee.get("COM"));
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  | -                //私有账户根据金额切换账户
 | 
	
		
			
				|  |  | -//                SysAccount perAccount = sysAccountService.getPerAccount(channel, account);
 | 
	
		
			
				|  |  | -//                if (perAccount != null) {
 | 
	
		
			
				|  |  | -//                    account.setRoutingMerNo(perAccount.getRoutingMerNo());
 | 
	
		
			
				|  |  | -//                    if (!account.getCompany().equals("daya")) {
 | 
	
		
			
				|  |  | -//                        account.setMerNo(perAccount.getRoutingMerNo());
 | 
	
		
			
				|  |  | -//                    }
 | 
	
		
			
				|  |  | -//                }
 | 
	
		
			
				|  |  |                  account.setRoutingFee(routingFee.get("PER"));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |