You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					
					
						
							43 lines
						
					
					
						
							1.9 KiB
						
					
					
				
			
		
		
	
	
							43 lines
						
					
					
						
							1.9 KiB
						
					
					
				package com.ynxbd.wx.servlet.test;
 | 
						|
 | 
						|
import com.ynxbd.common.bean.pay.Recipe;
 | 
						|
import com.ynxbd.common.config.db.DataBase;
 | 
						|
 | 
						|
import java.util.ArrayList;
 | 
						|
import java.util.List;
 | 
						|
 | 
						|
public class WxOrderTest {
 | 
						|
    public static void main(String[] args) {
 | 
						|
        String orders = "";
 | 
						|
 | 
						|
        String states = "";
 | 
						|
 | 
						|
        String[] outTradeNoList = orders.split("\n");
 | 
						|
 | 
						|
        String[] stateList = states.split("\n");
 | 
						|
 | 
						|
        System.out.println("订单数量=" + outTradeNoList.length + ", 状态数量=" + stateList.length);
 | 
						|
        List<String> errList = new ArrayList<>();
 | 
						|
        List<Recipe> select;
 | 
						|
        for (int i = 0; i < outTradeNoList.length; i++) {
 | 
						|
            String outTradeNo = outTradeNoList[i].substring(1);
 | 
						|
            System.out.println("【" + i + "】" + outTradeNo);
 | 
						|
            select = DataBase.select("select * from pay where outTradeNo = ?", Recipe.class, ps -> {
 | 
						|
                ps.setString(1, outTradeNo);
 | 
						|
            });
 | 
						|
 | 
						|
            String state = stateList[i];
 | 
						|
            for (Recipe recipe : select) {
 | 
						|
                if (recipe.getHisStatus() == -1 && !"OK".equals(recipe.getRefundResult()) && state.equals("买家已支付")) {
 | 
						|
                    System.out.println("outTradeNo=" + outTradeNo + ",状态=" + state + ",payMoney=" + recipe.getPayMoney() + ",tradeNo=" + recipe.getTradeNo() + ",RefundResult=" + recipe.getRefundResult() + ",患者id=" + recipe.getPatientId() + ",门诊号=" + recipe.getTreatNum());
 | 
						|
                    errList.add("outTradeNo=" + outTradeNo + ",状态=" + state + ",payMoney=" + recipe.getPayMoney() + ",tradeNo=" + recipe.getTradeNo() + ",RefundResult=" + recipe.getRefundResult() + ",患者id=" + recipe.getPatientId() + ",门诊号=" + recipe.getTreatNum());
 | 
						|
                }
 | 
						|
            }
 | 
						|
        }
 | 
						|
 | 
						|
        for (String str : errList) {
 | 
						|
            System.out.println(str);
 | 
						|
        }
 | 
						|
//        System.out.println(refundList);
 | 
						|
    }
 | 
						|
}
 | 
						|
 |