XMTT 5 anos atrás
pai
commit
4dcda6163b

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

73
73
74
    @PageSelect
74
    @PageSelect
75
    @OrderBy("ORDER BY CREATE_TIME DESC")
75
    @OrderBy("ORDER BY CREATE_TIME DESC")
76
    PageQueryResult<Team> pageQuery(Connection con, String status, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = {"name like ?", "org_name like ?", "subject like ?", "industry like ?"},isAnd = false) String key, @Nullable @Like String subject, @Nullable @Like String industry, @Nullable String city, int pageSize, int pageNo) throws SQLException;
76
    PageQueryResult<Team> pageQuery(Connection con,@Nullable @In String[] status, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = {"name like ?", "org_name like ?", "subject like ?", "industry like ?"},isAnd = false) String key, @Nullable @Like String subject, @Nullable @Like String industry, @Nullable String city, int pageSize, int pageNo) throws SQLException;
77
77
78
    @PageQuery
78
    @PageQuery
79
    @OrderBy("ORDER BY SECRETARY DESC NULLS LAST, CREATE_TIME DESC")
79
    @OrderBy("ORDER BY SECRETARY DESC NULLS LAST, CREATE_TIME DESC")
80
    PageQueryResult<Team> pageQuery(Connection con, String status, @SqlColumn(handlerClass = StringHandler.class, value = "id in (select id from team_pro where professor = ?)") String professor, int pageSize, int pageNo) throws SQLException;
80
    PageQueryResult<Team> pageQuery(Connection con,@Nullable @In String[] status, @SqlColumn(handlerClass = StringHandler.class, value = "id in (select id from team_pro where professor = ?)") String professor, int pageSize, int pageNo) throws SQLException;
81
81
82
    @Insert
82
    @Insert
83
    int insert(Connection con, TeamPro teamPro) throws SQLException;
83
    int insert(Connection con, TeamPro teamPro) throws SQLException;

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

247
247
248
    @Get
248
    @Get
249
    @Path("/pq")
249
    @Path("/pq")
250
    public PageQueryResult<Team> pageQuery(@JdbcConn Connection con, String status, @Nullable String key,  @Nullable String subject, @Nullable String industry,@Nullable String city, int pageSize, int pageNo) throws SQLException {
250
    public PageQueryResult<Team> pageQuery(@JdbcConn Connection con,@Nullable String[] status, @Nullable String key,  @Nullable String subject, @Nullable String industry,@Nullable String city, int pageSize, int pageNo) throws SQLException {
251
        return teamDao.pageQuery(con, status, key == null ? null : "%" + key + "%", subject == null ? null : "%" + subject + "%", industry == null ? null : "%" + industry + "%", city == null ? null : "%" + city + "%", pageSize, pageNo);
251
        return teamDao.pageQuery(con, status, key == null ? null : "%" + key + "%", subject == null ? null : "%" + subject + "%", industry == null ? null : "%" + industry + "%", city == null ? null : "%" + city + "%", pageSize, pageNo);
252
    }
252
    }
253
253
254
    @Get
254
    @Get
255
    @Path("/myTeam")
255
    @Path("/myTeam")
256
    public PageQueryResult<Team> pageQuery(@JdbcConn Connection con, String status, String professor, int pageSize, int pageNo) throws SQLException {
256
    public PageQueryResult<Team> pageQuery(@JdbcConn Connection con,@Nullable String[] status, String professor, int pageSize, int pageNo) throws SQLException {
257
        return teamDao.pageQuery(con, status, professor, pageSize, pageNo);
257
        return teamDao.pageQuery(con, status, professor, pageSize, pageNo);
258
    }
258
    }
259
259