| 
					
				 | 
			
			
				@ -342,6 +342,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String,Object> unifiedorder(Map<String,String> par,String appKey) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String xml = WeiXinPayUtils.getXmlBeforUnifiedorder(par, appKey); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String, Object> map = WeiXinPayUtils.unifiedorder(xml,true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("____wxPayResult"+map.get("wxPayResult")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //创建日志记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        createLog(par,xml,map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        map.remove("wxPayResult"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -469,10 +470,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("map:"+map.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String, Object> pay = unifiedorder(map, wxWechatDO.getAppKey()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String returnCode = pay.get("return_code").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String resultCode = pay.get("result_code").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("-----返回结果:"+resultCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("-----return_code:"+returnCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (returnCode.equalsIgnoreCase("SUCCESS")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String appid = pay.get("appid").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String mchId = pay.get("mch_id").toString(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -625,7 +625,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param orderRes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void createLog(Map<String,String> map,String orderPar,Map<String,Object> orderRes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("添加支付日志开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WxPayLogDO wxPayLogDO = new WxPayLogDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setSeqNo(map.get("out_trade_no")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setOpenId(map.get("openid")); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -634,6 +634,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setOrderParams(orderPar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setOrderResponse(orderRes.get("wxPayResult").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String return_code = orderRes.get("return_code").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("return_code"+return_code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if("SUCCESS".equalsIgnoreCase(return_code)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wxPayLogDO.setOrderStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -642,6 +643,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDO.setPayStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wxPayLogDao.save(wxPayLogDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println("添加支付日志结束"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |