//处理接口调用 中文不显示问题
Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -62,6 +62,7 @@ import org.springframework.transaction.annotation.Propagation; | ... | @@ -62,6 +62,7 @@ import org.springframework.transaction.annotation.Propagation; |
62 | import org.springframework.transaction.annotation.Transactional; | 62 | import org.springframework.transaction.annotation.Transactional; |
63 | import org.springframework.util.CollectionUtils; | 63 | import org.springframework.util.CollectionUtils; |
64 | 64 | ||
65 | import java.nio.charset.StandardCharsets; | ||
65 | import java.time.LocalDateTime; | 66 | import java.time.LocalDateTime; |
66 | import java.util.*; | 67 | import java.util.*; |
67 | import java.util.concurrent.TimeUnit; | 68 | import java.util.concurrent.TimeUnit; |
... | @@ -1147,7 +1148,9 @@ public class UserOperationServiceImpl implements UserOperationService { | ... | @@ -1147,7 +1148,9 @@ public class UserOperationServiceImpl implements UserOperationService { |
1147 | @Override | 1148 | @Override |
1148 | public boolean addCollection(String content) { | 1149 | public boolean addCollection(String content) { |
1149 | try { | 1150 | try { |
1150 | log.info("receive UserCollection add message, content {}", content); | 1151 | //处理接口调用 中文不显示问题 |
1152 | content = new String(Base64.getDecoder().decode(content.getBytes(StandardCharsets.UTF_8))); | ||
1153 | log.info("receive UserCollection add message, content {}" , content); | ||
1151 | JSONObject jsonObject = JSONObject.parseObject(content); | 1154 | JSONObject jsonObject = JSONObject.parseObject(content); |
1152 | String platformAccount = jsonObject.getString("platformAccount"); | 1155 | String platformAccount = jsonObject.getString("platformAccount"); |
1153 | String data = jsonObject.getString("data"); | 1156 | String data = jsonObject.getString("data"); | ... | ... |
-
Please register or sign in to post a comment