| 
															
																@ -3,6 +3,7 @@ package com.yihu.jw.care.util; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
															
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.util.common.RSAUtils; 
															 | 
															
															 | 
															
																import com.yihu.jw.util.common.RSAUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.util.http.HttpClientUtil; 
															 | 
															
															 | 
															
																import com.yihu.jw.util.http.HttpClientUtil; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.apache.commons.collections.map.HashedMap; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.apache.http.NameValuePair; 
															 | 
															
															 | 
															
																import org.apache.http.NameValuePair; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.apache.http.message.BasicNameValuePair; 
															 | 
															
															 | 
															
																import org.apache.http.message.BasicNameValuePair; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.slf4j.Logger; 
															 | 
															
															 | 
															
																import org.slf4j.Logger; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -12,6 +13,7 @@ import org.springframework.stereotype.Component; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import java.util.ArrayList; 
															 | 
															
															 | 
															
																import java.util.ArrayList; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import java.util.List; 
															 | 
															
															 | 
															
																import java.util.List; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import java.util.Map; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																/** 
															 | 
															
															 | 
															
																/** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 * 拱墅区红领巾app对接 
															 | 
															
															 | 
															
																 * 拱墅区红领巾app对接 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -39,10 +41,12 @@ public class HongLingJinUtil { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            json.put("client_secret","a2o8W3nP"); 
															 | 
															
															 | 
															
																            json.put("client_secret","a2o8W3nP"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            json.put("username",username); 
															 | 
															
															 | 
															
																            json.put("username",username); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            Map<String,Object> httpPost = new HashedMap(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            httpPost.put("Content-Type", "application/x-www-form-urlencoded"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String code = RSAUtils.encrypt(json.toString(),publicKey); 
															 | 
															
															 | 
															
																            String code = RSAUtils.encrypt(json.toString(),publicKey); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<NameValuePair> params = new ArrayList<>(); 
															 | 
															
															 | 
															
																            List<NameValuePair> params = new ArrayList<>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            params.add(new BasicNameValuePair("code", code)); 
															 | 
															
															 | 
															
																            params.add(new BasicNameValuePair("code", code)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String response = httpClientUtil.post(url, params,"UTF-8"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String response = httpClientUtil.headerPost(url, params,"UTF-8",httpPost); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            logger.info("url:"+url); 
															 | 
															
															 | 
															
																            logger.info("url:"+url); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            logger.info("code:"+code); 
															 | 
															
															 | 
															
																            logger.info("code:"+code); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            logger.info("response:"+response); 
															 | 
															
															 | 
															
																            logger.info("response:"+response); 
															 |