日期:2014-05-19 浏览次数:20718 次
public String deleteAthleteSignup1() throws Exception { try { // 删除athlete里面的countNumber athleteSignup = this.athleteSignupService.findById(id); // athlete = athleteService.findById(aid); athlete = athleteSignup.getAthlete(); athlete.setCountNumber(athlete.getCountNumber() - 1); // 删除team里面的countNumber team = athleteSignup.getEvent().getTeam(); team.setCountNumber(team.getCountNumber() - 1); this.athleteSignupService.updateAthleteSignup(athleteSignup); this.athleteSignupService.deleteAthleteSignup(id); listAthleteSignup = this.athleteSignupService.findByAthleteId(aid); } catch (Exception e) { e.printStackTrace(); return INPUT; } return SUCCESS; }
<action name="athleteSignupDeleteBy" class="athleteSignupAction" method="deleteAthleteSignup1"> <result name="success">/web/athleteSignup/findByAthleteId.jsp </result> <result name="input">/web/athleteSignup/deleteError.jsp</result> </action>
<action name="saveEventBatch" class="com.yaxing.action.EventAction" method="saveEventBatch"> <result name="success" type="redirectAction"> <param name="actionName">event/findByTeam.action</param> <param name="id">${session.userId}</param> <param name="fullName">${fullName}</param> </result> <result name="input">/web/event/error.jsp</result> </action>