|
@@ -19,8 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
-import java.net.URLDecoder;
|
|
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -52,20 +50,14 @@ public class ERPServiceImpl implements ERPService {
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
- String decode = URLDecoder.decode(data, StandardCharsets.UTF_8.toString());
|
|
|
|
|
- String jsonString = X5StringUtils.decodeBase64(decode);
|
|
|
|
|
- logger.info("前2:"+data);
|
|
|
|
|
- logger.info("前3:"+jsonString);
|
|
|
|
|
|
|
+ // String decode = URLDecoder.decode(data, StandardCharsets.UTF_8.toString());
|
|
|
|
|
+ String jsonString = X5StringUtils.decodeBase64(data);
|
|
|
Map<String, Object> map = objectMapper.readValue(jsonString, Map.class);
|
|
Map<String, Object> map = objectMapper.readValue(jsonString, Map.class);
|
|
|
- logger.info("前4:"+jsonString);
|
|
|
|
|
if(map.size()>0 && map.get("header")!=null ){
|
|
if(map.size()>0 && map.get("header")!=null ){
|
|
|
- logger.info("前5:"+jsonString);
|
|
|
|
|
Map<String, Object> header_map = (Map<String, Object>) map.get("header");
|
|
Map<String, Object> header_map = (Map<String, Object>) map.get("header");
|
|
|
- logger.info("前6:"+jsonString);
|
|
|
|
|
sign = header_map.get("sign") == null ? "" : header_map.get("sign").toString();
|
|
sign = header_map.get("sign") == null ? "" : header_map.get("sign").toString();
|
|
|
}
|
|
}
|
|
|
boolean checkSign = X5StringUtils.checkSign(sign, "test", jsonString, "218A05A252469F5A62B0B3204F669E1D");
|
|
boolean checkSign = X5StringUtils.checkSign(sign, "test", jsonString, "218A05A252469F5A62B0B3204F669E1D");
|
|
|
- logger.info("前1:"+jsonString);
|
|
|
|
|
if(checkSign || true){
|
|
if(checkSign || true){
|
|
|
try {
|
|
try {
|
|
|
if(map.get("body")!=null){
|
|
if(map.get("body")!=null){
|