Pu Zhibing
2024-09-24 a736a3d09dd52bb81fa922861fc8938c8eb26550
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/WorldCupController.java
@@ -272,11 +272,13 @@
            response.setContentType("APPLICATION/OCTET-STREAM");
            response.setHeader("Content-Disposition","attachment; filename=" + URLEncoder.encode("二维码", "UTF-8") + ".zip");
            ZipOutputStream out = new ZipOutputStream(response.getOutputStream());
            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
            for(Map<String, Object> map : list){
                String id = map.get("id").toString();
                String isStudent = map.get("isStudent").toString();
                String name = map.get("name").toString();
                QRCodeUtils.encode("{\"id\":" + id + ",\"isStudent\":" + isStudent + "}", name, "/usr/playpai/qrcode", false);
                String name = map.get("name").toString() + sdf.format(new Date());
                String content = "{\"id\":" + id + ",\"isStudent\":" + isStudent + "}";
                QRCodeUtils.encode(content, name, "/usr/playpai/qrcode", false);
                File file = new File("/usr/playpai/qrcode/" + name + ".jpg");
                FileInputStream fileInputStream = new FileInputStream(file);