|
@@ -127,15 +127,15 @@ public class CompetitionServiceImpl implements ICompetitionService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int publishCompetitionById(String id) {
|
|
|
- Competition competition = new Competition();
|
|
|
+ public int publishCompetitionById(Competition competition) {
|
|
|
+// Competition competition = new Competition();
|
|
|
competition.setPublishTime(new Date());
|
|
|
competition.setPublishBy(ShiroUtils.getSysUser().getUserId().toString());
|
|
|
competition.setPublishName(ShiroUtils.getSysUser().getUserName());
|
|
|
- competition.setId(Integer.valueOf(id));
|
|
|
competition.setCompetitionState(BAO_MING_ZHONG);
|
|
|
Timer timer = new Timer();
|
|
|
- timer.schedule(new CloseReg(competitionMapper, Integer.parseInt(id)), new Date(competition.getApplyStartTime().getTime() - (long) (competition.getApplyBeforeTime() * 60 * 1000)));
|
|
|
+ //new Date(competition.getApplyStartTime().getTime() - (long) (competition.getApplyBeforeTime() * 60 * 1000))
|
|
|
+ timer.schedule(new CloseReg(competitionMapper, competition.getId()), competition.getApplyStartTime());
|
|
|
return competitionMapper.publishCompetition(competition);
|
|
|
}
|
|
|
|