吉安感知网项目-后端
linwei
2026-04-09 100b15efb7e655add8de26d71b80b882db05cabc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.sxkj.common.handler;
 
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
 
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
 
public class LongListTypeHandler extends FastjsonTypeHandler {
    public LongListTypeHandler(Class<?> type) {
        super(type);
    }
 
    @Override
    public List<List<Long>> getResult(ResultSet rs, String columnName) throws SQLException {
        String json = rs.getString(columnName);
        return JSON.parseObject(json,
            new TypeReference<List<List<Long>>>() {});
    }
}