old mode 100644
new mode 100755
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.*; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.HttpStatusCodeException; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.SortedMap; |
| | | import java.util.TreeMap; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | |
| | | @Service("goodsToNotifySMOImpl") |
| | | public class GoodsToNotifySMOImpl implements IGoodsToNotifySMO { |
| | |
| | | //查询用户ID |
| | | JSONObject paramIn = new JSONObject(); |
| | | paramIn.put("orderId", outTradeNo); |
| | | String url = ServiceConstant.SERVICE_API_URL + "/app/storeOrder/updateStoreOrder"; |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/storeOrder/updateStoreOrder"; |
| | | responseEntity = this.callCenterService(restTemplate, useId, paramIn.toJSONString(), url, HttpMethod.POST); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | header.add(CommonConstant.HTTP_TRANSACTION_ID.toLowerCase(), UUID.randomUUID().toString()); |
| | | header.add(CommonConstant.HTTP_REQ_TIME.toLowerCase(), DateUtil.getDefaultFormateTimeString(new Date())); |
| | | header.add(CommonConstant.HTTP_SIGN.toLowerCase(), ""); |
| | | header.add("content-type", "application/json"); |
| | | HttpEntity<String> httpEntity = new HttpEntity<String>(param, header); |
| | | //logger.debug("请求中心服务信息,{}", httpEntity); |
| | | try { |
| | |
| | | responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); |
| | | } finally { |
| | | logger.debug("请求地址为,{} 请求中心服务信息,{},中心服务返回信息,{}", url, httpEntity, responseEntity); |
| | | return responseEntity; |
| | | } |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | |