修改推送签名
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ public class BusinessPartnerApplicationService {
|
|||||||
@Value("${gw.push.url}")
|
@Value("${gw.push.url}")
|
||||||
private String pushUrl;
|
private String pushUrl;
|
||||||
|
|
||||||
@Value("${gw.push.verify-key2}")
|
@Value("${gw.push.verify-key1}")
|
||||||
private String verifyKey;
|
private String verifyKey;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|||||||
+9
-4
@@ -22,6 +22,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
|||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -31,9 +32,13 @@ import java.util.*;
|
|||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ErpCountryApplicationService{
|
public class ErpCountryApplicationService{
|
||||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
|
||||||
private static final String API_NAME = "saveCountry";
|
private static final String API_NAME = "saveCountry";
|
||||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
|
||||||
|
@Value("${gw.push.url}")
|
||||||
|
private String pushUrl;
|
||||||
|
|
||||||
|
@Value("${gw.push.verify-key1}")
|
||||||
|
private String verifyKey;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ErpCountryMapper erpCountryMapper;
|
private ErpCountryMapper erpCountryMapper;
|
||||||
@@ -162,12 +167,12 @@ public class ErpCountryApplicationService{
|
|||||||
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
|
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
HttpPost httpPost = new HttpPost(pushUrl);
|
||||||
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
||||||
httpPost.setEntity(postingString);
|
httpPost.setEntity(postingString);
|
||||||
httpPost.setHeader("Content-type", "application/json");
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
httpPost.setHeader("apiName", API_NAME);
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
httpPost.setHeader("verify", VERIFY);
|
httpPost.setHeader("verify", verifyKey);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||||
|
|||||||
+9
-4
@@ -23,6 +23,7 @@ import org.apache.http.entity.StringEntity;
|
|||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -33,9 +34,13 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ErpEnterpriseUnitApplicationService {
|
public class ErpEnterpriseUnitApplicationService {
|
||||||
|
|
||||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
|
||||||
private static final String API_NAME = "saveUnit";
|
private static final String API_NAME = "saveUnit";
|
||||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
|
||||||
|
@Value("${gw.push.url}")
|
||||||
|
private String pushUrl;
|
||||||
|
|
||||||
|
@Value("${gw.push.verify-key1}")
|
||||||
|
private String verifyKey;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ErpEnterpriseUnitMapper erpEnterpriseUnitMapper;
|
private ErpEnterpriseUnitMapper erpEnterpriseUnitMapper;
|
||||||
@@ -146,12 +151,12 @@ public class ErpEnterpriseUnitApplicationService {
|
|||||||
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
|
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
HttpPost httpPost = new HttpPost(pushUrl);
|
||||||
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
||||||
httpPost.setEntity(postingString);
|
httpPost.setEntity(postingString);
|
||||||
httpPost.setHeader("Content-type", "application/json");
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
httpPost.setHeader("apiName", API_NAME);
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
httpPost.setHeader("verify", VERIFY);
|
httpPost.setHeader("verify", verifyKey);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||||
|
|||||||
+9
-4
@@ -18,6 +18,7 @@ import org.apache.http.entity.StringEntity;
|
|||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -29,9 +30,13 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ExchangeRateApplicationService {
|
public class ExchangeRateApplicationService {
|
||||||
|
|
||||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
|
||||||
private static final String API_NAME = "saveCurr";
|
private static final String API_NAME = "saveCurr";
|
||||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
|
||||||
|
@Value("${gw.push.url}")
|
||||||
|
private String pushUrl;
|
||||||
|
|
||||||
|
@Value("${gw.push.verify-key1}")
|
||||||
|
private String verifyKey;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private WlhyServiceFeign wlhyServiceFeign;
|
private WlhyServiceFeign wlhyServiceFeign;
|
||||||
@@ -123,12 +128,12 @@ public class ExchangeRateApplicationService {
|
|||||||
updateExchangeRatePushStatus(dto.getId(), 2, new Date(), pushBy, pushByName);
|
updateExchangeRatePushStatus(dto.getId(), 2, new Date(), pushBy, pushByName);
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
HttpPost httpPost = new HttpPost(pushUrl);
|
||||||
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
||||||
httpPost.setEntity(postingString);
|
httpPost.setEntity(postingString);
|
||||||
httpPost.setHeader("Content-type", "application/json");
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
httpPost.setHeader("apiName", API_NAME);
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
httpPost.setHeader("verify", VERIFY);
|
httpPost.setHeader("verify", verifyKey);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||||
|
|||||||
+9
-4
@@ -19,6 +19,7 @@ import org.apache.http.entity.StringEntity;
|
|||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -29,9 +30,13 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class MaterialInfoApplicationService {
|
public class MaterialInfoApplicationService {
|
||||||
|
|
||||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
|
||||||
private static final String API_NAME = "saveOrgGoods";
|
private static final String API_NAME = "saveOrgGoods";
|
||||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
|
||||||
|
@Value("${gw.push.url}")
|
||||||
|
private String pushUrl;
|
||||||
|
|
||||||
|
@Value("${gw.push.verify-key1}")
|
||||||
|
private String verifyKey;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private GwLogMapper gwLogMapper;
|
private GwLogMapper gwLogMapper;
|
||||||
@@ -113,12 +118,12 @@ public class MaterialInfoApplicationService {
|
|||||||
updatePushStatus(dto.getMaterialBaseInfoId(), 2, new Date(), pushBy,pushByName);
|
updatePushStatus(dto.getMaterialBaseInfoId(), 2, new Date(), pushBy,pushByName);
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
HttpPost httpPost = new HttpPost(pushUrl);
|
||||||
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
||||||
httpPost.setEntity(postingString);
|
httpPost.setEntity(postingString);
|
||||||
httpPost.setHeader("Content-type", "application/json");
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
httpPost.setHeader("apiName", API_NAME);
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
httpPost.setHeader("verify", VERIFY);
|
httpPost.setHeader("verify", verifyKey);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||||
|
|||||||
Reference in New Issue
Block a user