修改推送签名

This commit is contained in:
zhaoqing
2026-06-09 17:44:03 +08:00
parent b3e2b3fc8c
commit 42c08ca6f9
5 changed files with 37 additions and 17 deletions
@@ -36,7 +36,7 @@ public class BusinessPartnerApplicationService {
@Value("${gw.push.url}")
private String pushUrl;
@Value("${gw.push.verify-key2}")
@Value("${gw.push.verify-key1}")
private String verifyKey;
@Resource
@@ -22,6 +22,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -31,9 +32,13 @@ import java.util.*;
@Service
@Slf4j
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 VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
@Value("${gw.push.url}")
private String pushUrl;
@Value("${gw.push.verify-key1}")
private String verifyKey;
@Resource
private ErpCountryMapper erpCountryMapper;
@@ -162,12 +167,12 @@ public class ErpCountryApplicationService{
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
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");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
httpPost.setHeader("apiName", API_NAME);
httpPost.setHeader("verify", VERIFY);
httpPost.setHeader("verify", verifyKey);
try {
CloseableHttpResponse response = httpClient.execute(httpPost);
@@ -23,6 +23,7 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -33,9 +34,13 @@ import java.util.*;
@Slf4j
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 VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
@Value("${gw.push.url}")
private String pushUrl;
@Value("${gw.push.verify-key1}")
private String verifyKey;
@Resource
private ErpEnterpriseUnitMapper erpEnterpriseUnitMapper;
@@ -146,12 +151,12 @@ public class ErpEnterpriseUnitApplicationService {
updatePushStatus(dto.getId(), 2, new Date(), pushBy,pushByName);
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");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
httpPost.setHeader("apiName", API_NAME);
httpPost.setHeader("verify", VERIFY);
httpPost.setHeader("verify", verifyKey);
try {
CloseableHttpResponse response = httpClient.execute(httpPost);
@@ -18,6 +18,7 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -29,9 +30,13 @@ import java.util.*;
@Slf4j
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 VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
@Value("${gw.push.url}")
private String pushUrl;
@Value("${gw.push.verify-key1}")
private String verifyKey;
@Resource
private WlhyServiceFeign wlhyServiceFeign;
@@ -123,12 +128,12 @@ public class ExchangeRateApplicationService {
updateExchangeRatePushStatus(dto.getId(), 2, new Date(), pushBy, pushByName);
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");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
httpPost.setHeader("apiName", API_NAME);
httpPost.setHeader("verify", VERIFY);
httpPost.setHeader("verify", verifyKey);
try {
CloseableHttpResponse response = httpClient.execute(httpPost);
@@ -19,6 +19,7 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -29,9 +30,13 @@ import java.util.*;
@Slf4j
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 VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
@Value("${gw.push.url}")
private String pushUrl;
@Value("${gw.push.verify-key1}")
private String verifyKey;
@Resource
private GwLogMapper gwLogMapper;
@@ -113,12 +118,12 @@ public class MaterialInfoApplicationService {
updatePushStatus(dto.getMaterialBaseInfoId(), 2, new Date(), pushBy,pushByName);
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");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
httpPost.setHeader("apiName", API_NAME);
httpPost.setHeader("verify", VERIFY);
httpPost.setHeader("verify", verifyKey);
try {
CloseableHttpResponse response = httpClient.execute(httpPost);