吉安感知网项目-后端
xiebin
2026-01-06 d207a86cdf1ab52ef8cb7cd83bad8fceab8038cf
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>>>() {});
    }
}