From 81b0cac76e6a69fa1505fab01060be4a27db9645 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Fri, 17 Sep 2021 17:16:44 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BC=98=E5=8C=96=E4=BA=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2SQL=202.=20=E6=8E=A7=E5=88=B6=E5=8F=B0=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenlion/buildingpictures/util/WeiXinBarCodeUtils.java | 5 +++-- .../PicturesTemplateAreaBuildingDTO.java | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java index 1d5ffb9..a2718c5 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java @@ -66,6 +66,7 @@ public class WeiXinBarCodeUtils { } } String param = buffer.toString(); + System.out.println(param.getBytes("utf-8").length); //POST请求 DataOutputStream out = new DataOutputStream(conn.getOutputStream()); JSONObject obj = new JSONObject(); @@ -85,7 +86,7 @@ public class WeiXinBarCodeUtils { InputStream inputStream = conn.getInputStream(); //获取自己数组 byte[] getData = readInputStream(inputStream); - System.out.println(new String(getData)); + // System.out.println(new String(getData)); BufferedImage image = ImageIO.read(new ByteArrayInputStream(getData)); // 如果没有设置颜色, 原图返回 // if(colorR == 0 && colorG == 0 && colorB == 0) { @@ -139,7 +140,7 @@ public class WeiXinBarCodeUtils { } } }*/ - //ImageIO.write(image, "jpg", new File("D:\\TEST1.jpg")); + ImageIO.write(image, "jpg", new File("D:\\TEST1.jpg")); //ImageIO.write(weiXinImage, "jpg", new File("D:\\TEST2.jpg")); return image; } diff --git a/pojo-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/pojo/dtos/picturestemplatearea/PicturesTemplateAreaBuildingDTO.java b/pojo-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/pojo/dtos/picturestemplatearea/PicturesTemplateAreaBuildingDTO.java index 714c4a5..a4b4ec3 100644 --- a/pojo-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/pojo/dtos/picturestemplatearea/PicturesTemplateAreaBuildingDTO.java +++ b/pojo-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/pojo/dtos/picturestemplatearea/PicturesTemplateAreaBuildingDTO.java @@ -3,6 +3,8 @@ package cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplatearea; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + /** * * @ClassName: PicturesTemplateAreaBuildingDTO @@ -12,7 +14,7 @@ import io.swagger.annotations.ApiModelProperty; * @Version: 1.0 **/ @ApiModel -public class PicturesTemplateAreaBuildingDTO { +public class PicturesTemplateAreaBuildingDTO implements Serializable { @ApiModelProperty(name = "picturesTemplateAreaId", value = "主键") private String picturesTemplateAreaId;