Althars123 3 年之前
父節點
當前提交
7d98a4befe

+ 1 - 1
zzjs-admin/src/main/java/com/miaxis/app/controller/film/FilmController.java

@@ -152,7 +152,7 @@ public class FilmController extends BaseController {
         rootNode.putObject("payer")
                 .put("openid", student.getOpenid());
         objectMapper.writeValue(bos, rootNode);
-        httpPost.setEntity(new StringEntity(bos.toString("UTF-8")));
+        httpPost.setEntity(new StringEntity(rootNode.toString(), "utf-8"));
         HttpResponse response = httpClient.execute(httpPost);
         String bodyAsString = EntityUtils.toString(response.getEntity());
         System.out.println(bodyAsString);

+ 1 - 1
zzjs-service/src/main/java/com/miaxis/film/service/impl/RefundRecordServiceImpl.java

@@ -72,7 +72,7 @@ public class RefundRecordServiceImpl extends ServiceImpl<RefundRecordMapper, Ref
         System.out.println(rootNode.toString());
 //        ByteArrayOutputStream bos = new ByteArrayOutputStream();
 //        objectMapper.writeValue(bos, rootNode);
-        httpPost.setEntity(new StringEntity(rootNode.toString()));
+        httpPost.setEntity(new StringEntity(rootNode.toString(), "utf-8"));
         HttpResponse response = httpClient.execute(httpPost);
         // 返回数据:
         String bodyAsString = EntityUtils.toString(response.getEntity());