mirror of
https://gitee.com/wkeyuan/DWSurvey.git
synced 2024-12-04 04:59:13 +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());
|
SurveyDirectory survey=directoryManager.getSurveyByUser(answer.getSurveyId(), user.getId());
|
||||||
if(survey!=null){
|
if(survey!=null){
|
||||||
surveyAnswerManager.delete(answer);
|
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