| | |
| | | import com.stylefeng.guns.modular.system.model.SensitiveWords; |
| | | import com.stylefeng.guns.modular.system.service.IComplaintService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Autowired |
| | | private ISystemNoticeService systemNoticeService; |
| | | |
| | | @Autowired |
| | | private IUserInfoService userInfoService; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void saveData(Integer driverId, String reason, String description, Integer uid) throws Exception { |
| | | public void saveData(Integer driverId, String reason, String description, Integer uid, Integer language) throws Exception { |
| | | if(ToolUtil.isNotEmpty(description)){ |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | | description = description.replaceAll(s.getContent(), "***"); |
| | | } |
| | | } |
| | | language = userInfoService.queryLanguage(uid, language); |
| | | Complaint complaint = new Complaint(); |
| | | complaint.setInsertTime(new Date()); |
| | | complaint.setDriverId(driverId); |
| | |
| | | complaint.setIsHandle(0); |
| | | this.insert(complaint); |
| | | |
| | | systemNoticeService.addSystemNotice(1, "您的投诉已提交成功,我们会尽快处理!", uid, 1); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的投诉已提交成功,我们会尽快处理!" : language == 2 ? "Your complaint has been submitted successfully and we will deal with it as soon as possible" : "Votre plainte a été soumise avec succès et nous la traiterons dès que possible", uid, 1); |
| | | } |
| | | } |