| | |
| | | import com.stylefeng.guns.modular.system.model.SensitiveWords; |
| | | import com.stylefeng.guns.modular.system.service.IFeedbackService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private ISystemNoticeService systemNoticeService; |
| | | |
| | | @Autowired |
| | | private IUserInfoService userInfoService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil feedback(String content, Integer uid) throws Exception { |
| | | public ResultUtil feedback(String content, Integer uid, Integer language) throws Exception { |
| | | if(ToolUtil.isNotEmpty(content)){ |
| | | if(content.length() > 200){ |
| | | return ResultUtil.error("反馈内容过长"); |
| | | language = userInfoService.queryLanguage(uid, language); |
| | | return ResultUtil.error(language == 1 ? "反馈内容过长" : language == 2 ? "Feedback is too long" : "Les commentaires sont trop longs"); |
| | | } |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | |
| | | feedback.setUserId(uid); |
| | | this.insert(feedback); |
| | | |
| | | systemNoticeService.addSystemNotice(1, "您的反馈已提交成功,我们会尽快处理!", uid, 1); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的反馈已提交成功,我们会尽快处理!" : language == 2 ? "Your feedback has been submitted successfully, we will deal with it as soon as possible" |
| | | : "Vos commentaires ont été soumis avec succès, nous les traiterons dès que possible", uid, 1); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |