XMTT 5 years ago
parent
commit
44ac97f65f

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

@ -157,5 +157,5 @@ public interface TeamDao {
157 157
    @Where("STATUS='3'")
158 158
    @OrderBy(cols = { @LimitColumn(value = "createTime", asc = false),
159 159
            @LimitColumn(value = "id", asc = false) }, value = "")
160
    List<Team> indexSearch(Connection con, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = {"name like ?", "org_name like ?", "subject like ?", "industry like ?"},isAnd = false) String key, String createTime, String id, int rows) throws SQLException;
160
    List<Team> indexSearch(Connection con, @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, String createTime, String id, int rows) throws SQLException;
161 161
}

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

@ -253,12 +253,12 @@ public class TeamService {
253 253
254 254
    @Get
255 255
    @Path("/index/search")
256
    public List<Team> indexSeach(@JdbcConn Connection con, @Nullable String key,
256
    public List<Team> indexSeach(@JdbcConn Connection con, @Nullable String key,@Nullable String subject,@Nullable String industry,@Nullable String city,
257 257
                                 @DefaultValue("\"9\"") String time, @DefaultValue("\"G\"") String id, int rows) throws SQLException {
258 258
        if (key != null) {
259 259
            key = "%" + key + "%";
260 260
        }
261
        return teamDao.indexSearch(con, key, time, id, rows);
261
        return teamDao.indexSearch(con, key == null ? null : "%" + key + "%", subject == null ? null : "%" + subject + "%", industry == null ? null : "%" + industry + "%", city == null ? null : "%" + city + "%", time, id, rows);
262 262
    }
263 263
264 264