Commit 3864547f by wangnb

包活干V1.9.0调用TSP接口修改--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27154 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 895749fa
......@@ -10,7 +10,6 @@ import com.glsx.ordercenter.dto.resp.TspRespData;
import com.glsx.ordercenter.mapper.insurance.SysInsurancePolicyMapper;
import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy;
import com.glsx.ordercenter.utils.TspSignUtil;
import org.apache.http.entity.ContentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -88,7 +87,7 @@ public class TspGetInsurancePdfTask implements Runnable{
int tryCount = TRY_COUNT;
while (tryCount-- > 0) {
try {
result = HttpUtil.postData(insuranceUrl, JSON.toJSONString(map), ContentType.APPLICATION_JSON);
result = HttpUtil.postFormData(insuranceUrl, map);
break;
} catch (Exception e) {
Thread.sleep(TRY_WAIT_TIME);
......
......@@ -16,7 +16,6 @@ import com.glsx.ordercenter.mapper.insurance.SysInsurancePolicyMapper;
import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy;
import com.glsx.ordercenter.utils.ObjectUtils;
import com.glsx.ordercenter.utils.TspSignUtil;
import org.apache.http.entity.ContentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -83,14 +82,13 @@ public class TspSaveInsuranceDataTask implements Runnable{
map.put("source", source);
String sign = TspSignUtil.sign(map, appSecret); //除了sign所有参数进行验签
map.put("sign", sign);
logger.info("投保发送数据为:{}", JSON.toJSONString(map));
//发送请求
String result = null;
int tryCount = TRY_COUNT;
while (tryCount-- > 0) {
try {
result = HttpUtil.postData(insuranceUrl, JSON.toJSONString(map), ContentType.APPLICATION_JSON);
result = HttpUtil.postFormData(insuranceUrl, map);
break;
} catch (Exception e) {
Thread.sleep(TRY_WAIT_TIME);
......
......@@ -13,7 +13,6 @@ import com.glsx.ordercenter.mapper.insurance.SysInsurancePolicyMapper;
import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy;
import com.glsx.ordercenter.utils.ObjectUtils;
import com.glsx.ordercenter.utils.TspSignUtil;
import org.apache.http.entity.ContentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -85,7 +84,7 @@ public class TspUpdateInsuranceDataTask implements Runnable{
int tryCount = TRY_COUNT;
while (tryCount-- > 0) {
try {
result = HttpUtil.postData(insuranceUrl, JSON.toJSONString(map), ContentType.APPLICATION_JSON);
result = HttpUtil.postFormData(insuranceUrl, map);
break;
} catch (Exception e) {
Thread.sleep(TRY_WAIT_TIME);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!