XMTT 5 anos atrás
pai
commit
1a8751d617

+ 1 - 1
src/main/java/com/ekexiu/portal/team/TeamDao.java

56
56
57
    @UpdateWith
57
    @UpdateWith
58
    @From(Team.class)
58
    @From(Team.class)
59
    int updateChief(Connection con, @Set String chief, String id) throws SQLException;
59
    int updateChief(Connection con,@Nullable @Set String chief, String id) throws SQLException;
60
60
61
    @UpdateWith
61
    @UpdateWith
62
    @From(Team.class)
62
    @From(Team.class)

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

299
299
300
    @Post
300
    @Post
301
    @Path("/chief")
301
    @Path("/chief")
302
    public void changeChief(@JdbcConn(true)Connection con,String id,String newPro)throws SQLException {
303
        teamDao.updateChief(con, newPro, id);
302
    public void changeChief(@JdbcConn(true)Connection con,String id,@Nullable String newPro)throws SQLException {
304
        teamDao.updateCh(con, id);
303
        teamDao.updateCh(con, id);
305
        teamDao.updateCh(con, id, newPro);
304
        teamDao.updateChief(con, newPro, id);
305
        if (newPro != null) {
306
            teamDao.updateCh(con, id, newPro);
307
        }
306
    }
308
    }
307
309
308
    @Get
310
    @Get