luo
2024-01-31 021640e69b32dbd9b88a538402671c47f280df9e
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TFeedbackController.java
@@ -184,7 +184,7 @@
                    Document document = Jsoup.parse(new File(path), "UTF-8");
                    document.getElementById("chinese").remove();
                    document.getElementById("french").remove();
                    document.getElementsByTag("title").get(0).text("Feedback Processing Results");
                    document.getElementsByTag("title").get(0).text("Solutions for feedback");
                    Element english_user = document.getElementById("english_user");
                    english_user.text("Hello " + userInfo.getNickName() + ",");
                    Element english_content = document.getElementById("english_content");
@@ -205,24 +205,13 @@
                    fileWriter.write(document.html());
                    fileWriter.flush();
                    fileWriter.close();
                    FileInputStream fileInputStream = new FileInputStream(file);
                    File file1 = new File("/usr/local/nginx/html/files/pdf/");
                    if(!file1.exists()){
                        file1.mkdirs();
                    }
                    file1 = new File("/usr/local/nginx/html/files/pdf/feedbackResult_" + randomString + ".pdf");
                    if(!file1.exists()){
                        file1.createNewFile();
                    }
                    FileOutputStream fileOutputStream = new FileOutputStream(file1);
                    HtmlToPdfUtils.convertToPdf(fileInputStream, "IGO", fileOutputStream);
                    String link ="http://182.160.16.251:81/files/html/feedbackResult_" + randomString + ".html";
                    TEmail tEmail = new TEmail();
                    tEmail.setLink(link);
                    tEmail.setUserId(userInfo.getId());
                    tEmail.setType(1);
                    tEmail.setName("Feedback Processing Results");
                    tEmail.setName("Solutions for feedback");
                    tEmail.setCreateTime(new Date());
                    int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1;
                    tEmail.setWeek(EmailUtil.getWeek(2,i));