zhuyifan

fix

package com.infoloop.tianting.service.client;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
......@@ -35,8 +37,6 @@ public class PayServiceClient {
private final BusinessConfig businessConfig;
private final ObjectMapper objectMapper;
@Value("${payment.client-id:Order0001}")
private String clientId;
......@@ -48,6 +48,9 @@ public class PayServiceClient {
ThirdPartyPayInformRequestDto jsonData = buildRequestData(payRequestDto, requestDate);
String jsonDataString;
try {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE);
jsonDataString = objectMapper.writeValueAsString(jsonData);
} catch (JsonProcessingException e) {
......