|
|
|
@ -12,6 +12,7 @@ import com.mdp.mybatis.PageUtils; |
|
|
|
import com.mdp.qx.HasQx; |
|
|
|
import com.mdp.safe.client.entity.User; |
|
|
|
import com.mdp.safe.client.utils.LoginUtils; |
|
|
|
import com.mdp.sensitive.SensitiveWordService; |
|
|
|
import com.xm.core.entity.XmMenu; |
|
|
|
import com.xm.core.entity.XmQuestion; |
|
|
|
import com.xm.core.entity.XmQuestionHandle; |
|
|
|
@ -31,6 +32,8 @@ import springfox.documentation.annotations.ApiIgnore; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static com.mdp.core.utils.ResponseHelper.failed; |
|
|
|
|
|
|
|
/** |
|
|
|
* url编制采用rest风格,如对XM.xm_question xm_question的操作有增删改查,对应的url分别为:<br> |
|
|
|
* 新增: xm/xmQuestion/add <br> |
|
|
|
@ -61,6 +64,9 @@ public class XmQuestionController { |
|
|
|
@Autowired |
|
|
|
XmQuestionHandleService xmQuestionHandleService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
SensitiveWordService sensitiveWordService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
PushNotifyMsgService notifyMsgService; |
|
|
|
@ -194,6 +200,14 @@ public class XmQuestionController { |
|
|
|
xmQuestionVo.setHandlerUserid(user.getUserid()); |
|
|
|
xmQuestionVo.setHandlerUsername(user.getUsername()); |
|
|
|
} |
|
|
|
Set<String> words=sensitiveWordService.getSensitiveWord(xmQuestionVo.getName()); |
|
|
|
if(words!=null && words.size()>0){ |
|
|
|
return failed("name-sensitive-word","名字有敏感词"+words+",请修改后再提交"); |
|
|
|
} |
|
|
|
words=sensitiveWordService.getSensitiveWord(xmQuestionVo.getRemarks()); |
|
|
|
if(words!=null && words.size()>0){ |
|
|
|
return failed("remark-sensitive-word","备注中有敏感词"+words+",请修改后再提交"); |
|
|
|
} |
|
|
|
xmQuestionService.addQuestion(xmQuestionVo); |
|
|
|
if(!StringUtils.isEmpty(xmQuestionVo.getHandlerUserid())) { |
|
|
|
notifyMsgService.pushMsg(user,xmQuestionVo.getHandlerUserid(),xmQuestionVo.getHandlerUsername(),"5",xmQuestionVo.getProductId(),xmQuestionVo.getId(),"您有新的bug【"+xmQuestionVo.getName()+"】需要处理,请尽快修复!"); |
|
|
|
|