Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhuyifan
2025-02-25 11:26:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
12635a70ec0ac9ed4171a80a4aa5a2b87e63fa63
12635a70
1 parent
5a01a59e
fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
src/main/java/com/infoloop/tianting/service/client/PayServiceClient.java
src/main/java/com/infoloop/tianting/service/client/PayServiceClient.java
View file @
12635a7
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
)
{
...
...
Please
register
or
login
to post a comment