|
@@ -2905,11 +2905,15 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
private void getPhoneByHttp(LiveOrder liveOrder) {
|
|
private void getPhoneByHttp(LiveOrder liveOrder) {
|
|
|
try {
|
|
try {
|
|
|
String encryptedStr = CrossServiceRsaUtil.encryptForRequest("phone");
|
|
String encryptedStr = CrossServiceRsaUtil.encryptForRequest("phone");
|
|
|
- String url = "http://42.194.245.189:8010/app/common/getEncryptedPhone?encryptedStr="
|
|
|
|
|
- + java.net.URLEncoder.encode(encryptedStr, "UTF-8")
|
|
|
|
|
- + "&addressId=" + liveOrder.getAddressId();
|
|
|
|
|
|
|
+ String url = "http://42.194.245.189:8010/app/common/getEncryptedPhone";
|
|
|
org.springframework.web.client.RestTemplate restTemplate = new org.springframework.web.client.RestTemplate();
|
|
org.springframework.web.client.RestTemplate restTemplate = new org.springframework.web.client.RestTemplate();
|
|
|
- String responseBody = restTemplate.getForObject(url, String.class);
|
|
|
|
|
|
|
+ java.util.Map<String, Object> paramMap = new java.util.HashMap<>();
|
|
|
|
|
+ paramMap.put("encryptedStr", encryptedStr);
|
|
|
|
|
+ paramMap.put("addressId", liveOrder.getAddressId());
|
|
|
|
|
+ org.springframework.http.HttpHeaders headers = new org.springframework.http.HttpHeaders();
|
|
|
|
|
+ headers.setContentType(org.springframework.http.MediaType.APPLICATION_JSON);
|
|
|
|
|
+ org.springframework.http.HttpEntity<java.util.Map<String, Object>> requestEntity = new org.springframework.http.HttpEntity<>(paramMap, headers);
|
|
|
|
|
+ String responseBody = restTemplate.postForObject(url, requestEntity, String.class);
|
|
|
if (StringUtils.isNotEmpty(responseBody)) {
|
|
if (StringUtils.isNotEmpty(responseBody)) {
|
|
|
com.alibaba.fastjson.JSONObject respObj = com.alibaba.fastjson.JSON.parseObject(responseBody);
|
|
com.alibaba.fastjson.JSONObject respObj = com.alibaba.fastjson.JSON.parseObject(responseBody);
|
|
|
if (respObj != null && "200".equals(respObj.getString("code"))) {
|
|
if (respObj != null && "200".equals(respObj.getString("code"))) {
|