XMTT 5 anos atrás
pai
commit
ed66cef669

+ 7 - 5
src/main/java/com/ekexiu/portal/team/TeamService.java

328
    @Path("/quit")
328
    @Path("/quit")
329
    public void quit(@JdbcConn(true) Connection con,String id,String professor)throws SQLException,JfwBaseException{
329
    public void quit(@JdbcConn(true) Connection con,String id,String professor)throws SQLException,JfwBaseException{
330
        Team team = teamDao.query(con, id);
330
        Team team = teamDao.query(con, id);
331
        if (professor == team.getSecretary()) {
331
        if (professor.equals(team.getSecretary())) {
332
            throw new JfwBaseException(801, "团队秘书不能退出团队");
332
            throw new JfwBaseException(801, "团队秘书不能退出团队");
333
        }else {
334
            teamDao.deletePro(con, id, professor);
335
            if (team.getChief().equals(professor)) {
336
                team.setChief(null);
337
            }
333
        }
338
        }
334
        teamDao.deletePro(con, id, professor);
335
        if (team.getChief().equals(professor)) {
336
            team.setChief(null);
337
        }
339
338
    }
340
    }
339
341
340
342