| | |
| | | package com.moral.mapper.type; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.moral.common.json.BooleanValueFilter; |
| | | import org.apache.ibatis.type.BaseTypeHandler; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | import org.apache.ibatis.type.MappedJdbcTypes; |
| | | import org.apache.ibatis.type.MappedTypes; |
| | | |
| | | import java.sql.CallableStatement; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.type.BaseTypeHandler; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | import org.apache.ibatis.type.MappedJdbcTypes; |
| | | import org.apache.ibatis.type.MappedTypes; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | |
| | | /** |
| | | * @author fengxiang |
| | |
| | | |
| | | @Override |
| | | public Map getNullableResult(ResultSet resultSet, String s) throws SQLException { |
| | | return JSON.parseObject(resultSet.getString(s),new TypeReference<Map<String,Float>>(){}); |
| | | return JSON.parseObject(resultSet.getString(s),new TypeReference<Map<String,String>>(){}); |
| | | } |
| | | |
| | | @Override |
| | | public Map getNullableResult(ResultSet resultSet, int i) throws SQLException { |
| | | return JSON.parseObject(resultSet.getString(i),new TypeReference<Map<String,Float>>(){}); |
| | | return JSON.parseObject(resultSet.getString(i),new TypeReference<Map<String,String>>(){}); |
| | | } |
| | | |
| | | @Override |
| | | public Map getNullableResult(CallableStatement callableStatement, int i) throws SQLException { |
| | | return JSON.parseObject(callableStatement.getString(i),new TypeReference<Map<String,Float>>(){}); |
| | | return JSON.parseObject(callableStatement.getString(i),new TypeReference<Map<String,String>>(){}); |
| | | } |
| | | } |