mirror of
https://gitee.com/wkeyuan/DWSurvey.git
synced 2024-12-02 03:58:23 +08:00
删除答卷同步更新回答人数#15
This commit is contained in:
parent
6339c5d472
commit
dad4258969
@ -103,6 +103,11 @@ public class MySurveyAnswerAction extends ActionSupport{
|
||||
SurveyDirectory survey=directoryManager.getSurveyByUser(answer.getSurveyId(), user.getId());
|
||||
if(survey!=null){
|
||||
surveyAnswerManager.delete(answer);
|
||||
Integer answerNum = survey.getAnswerNum();
|
||||
if(answerNum!=null && answerNum>=1){
|
||||
survey.setAnswerNum(answerNum-1);
|
||||
directoryManager.save(survey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user