当前使用版本(必填,否则不予处理)

3.4.1

该问题是如何引起的?(确定最新版也有问题再提!!!)

重现步骤(如果有就写完整)

MyBatis-Plus 数据库为varchar存储手机号,group by phone,使用selectPage方法把phone转换成int类型导致越界。

报错信息

2021-03-18 17:03:36.832 ERROR [] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/courseop].[dispatcherServlet]:175 Servlet.service() for servlet [dispatcherServlet] in context with path [/courseop] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'phone' from result set. Cause: java.sql.SQLDataException: Value '13261132362' is outside of valid range for type java.lang.Integer ; Value '13261132362' is outside of valid range for type java.lang.Integer; nested exception is java.sql.SQLDataException: Value '13261132362' is outside of valid range for type java.lang.Integer] with root cause com.mysql.cj.exceptions.NumberOutOfRange: Value '13261132362' is outside of valid range for type java.lang.Integer at com.mysql.cj.result.IntegerValueFactory.createFromLong(IntegerValueFactory.java:62) at com.mysql.cj.result.IntegerValueFactory.createFromLong(IntegerValueFactory.java:44) at com.mysql.cj.result.AbstractNumericValueFactory.createFromBytes(AbstractNumericValueFactory.java:62) at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeByteArray(MysqlTextValueDecoder.java:134) at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:133) at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:241) at com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91)

Comment From: miemieYaho

entity给无参构造