Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[错误报告]: 描述实体类加上了autoResultMap = true, 字段上面加了@TableField(typeHandler = EncAndSensMobile.class) 现在插入更新都会走这个typeHandler, 但是在用lambdaQuery的时候去查询兵没有走这个typeHandler #6527

Open
3 tasks done
mengxiang-Fang opened this issue Oct 10, 2024 · 1 comment

Comments

@mengxiang-Fang
Copy link

确认

  • 我使用的版本是最新版, 并且使用插件确认过项目里无依赖版本冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.4.3

问题描述

在使用mybatis-plus3.4.3的时候,在实体类已经加上autoResultMap = true,相关字段phone上也加上了@TableField(typeHandler = EncAndSensMobile.class),但是再用lambdaQuery的时候没有走这个handler逻辑,这个handler是对phone手机号码做加密解密的

1728562350049
1728562384430
1728562417890

用mybatisplus的saveorupdate()方法更新或者插入没有问题,但是用lambdaQuery查询就不会走这个handler逻辑, 如果直接在XML文件里面用sql语句然后使用resultMap里面加上typehandler也没有问题, 我想问下是3.4.3版本就不支持lambdaQuery这种查询方式使用typeHandler吗?

详细堆栈日志

1
@rowstop
Copy link
Contributor

rowstop commented Oct 14, 2024

手动处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants