Commit 642aefed by anxiaohe

修改二维码生成策略,避免重复的二维码

parent b6ae5746
......@@ -27,6 +27,10 @@ public class BuildQcUtil {
map.put("infoId", goodsInfo.getId());
TwoDimensionCode.encoderQRCode(JSON.toJSONString(map), qrImgPath, "png", 6);
File file = new File(qrImgPath);
File file2 = new File(imgPath);
if (file2.exists()) {
file2.delete();
}
try {
BufferedImage image = DrawQrcodeUtil.createAssetImageNew(file, qrCode);
DrawQrcodeUtil drawQrcodeUtil = new DrawQrcodeUtil();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment