<select id="selectList" resultType="com.yxy.vo.PersonVO"
parameterType="com.yxy.dto.PersonListDto">
SELECT
t1.*,
t2.name as tenantName
FROM
person t1, tenant_extend t2
WHERE
t1.status = 0
and t1.tenant_id = t2.id
<if test="search != null and search != ''">
and t1.name like concat('%',#{search},'%')
</if>
and t1.tenant_id in
<foreach item="item" index="index" collection="scopedTenantIds"
open="(" separator=" , " close=")">
'${item}'
</foreach>
</select>
以上是一个自定义的select查询,返回结果是一个自定义的 PersonVO类,PersonVO类定义如下:
继承自model类Person,定义如下:
大家可以看到, 手机号和身份证号字段 使用了typeHandler做特殊处理,即保存时加密,查询时解密, 目前发现调用tkmybatis自带的selectAll()方法可以查询出解密后的手机号和身份证号,但是使用 自定义的selectList方法却只查询到加密的手机号,并没有自动解密, 我该怎么办?麻烦提点下,谢谢