Pu Zhibing
9 天以前 4c99ee7028c3fe58a2cd4b8273b22c75c45574fc
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java
@@ -26,9 +26,8 @@
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
@Service
@@ -60,17 +59,20 @@
     * @throws Exception
     */
    @Override
    public void saveData(Integer driverId, String reason, String description, Integer uid, Integer language) throws Exception {
    public void saveData(Integer orderId, Integer orderType, Integer driverId, String reason, String description, Integer uid, Integer language) throws Exception {
        if(ToolUtil.isNotEmpty(description)){
            description = description.toLowerCase();
            List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null);
            for(SensitiveWords s : sensitiveWords){
                description = description.replaceAll(s.getContent(), "***");
            for(SensitiveWords s : sensitiveWords) {
                description = description.replaceAll(s.getContent().toLowerCase(), "***");
            }
        }
        Complaint complaint = new Complaint();
        complaint.setInsertTime(new Date());
        complaint.setDriverId(driverId);
        complaint.setReason(reason);
        complaint.setOrderId(orderId);
        complaint.setOrderType(orderType);
        complaint.setDescription(description);
        complaint.setUserId(uid);
        complaint.setIsHandle(0);
@@ -103,12 +105,12 @@
            }
            EmailUtil.send(userInfo.getEmail(), language == 1 ? "投诉司机" : language == 2 ? "Complain against driver" : "Porter plainte contre le chauffeur",  document.html());
            //开始生成pdf收据和html收据
            File file = new File("/usr/local/nginx/html/files/html/");
            File file = new File("/home/igotechgh/nginx/html/files/html/");
            if(!file.exists()){
                file.mkdirs();
            }
            String randomString = ToolUtil.getRandomString(10);
            file = new File("/usr/local/nginx/html/files/html/complain_" + randomString + ".html");
            file = new File("/home/igotechgh/nginx/html/files/html/complain_" + randomString + ".html");
            if(!file.exists()){
                file.createNewFile();
            }
@@ -117,7 +119,7 @@
            fileWriter.flush();
            fileWriter.close();
            String link ="http://182.160.16.251:81/files/html/complain_" + randomString + ".html";
            String link ="https://igo.i-go.group/files/html/complain_" + randomString + ".html";
            TEmail tEmail = new TEmail();
            tEmail.setLink(link);
            tEmail.setUserId(uid);