提示错误如下==> Preparing: select count(0) from (select a.NAME, a.Y_ID, a.QR_ID, a.PHONE, a.SHEQU, a.ADDIN, a.USE_FLAG, a.IC_ID, a.BAG_NUM1, a.BAGN_UM2, a.BAGN_UM3, a.BAG_NUM_SET, a.EMAIL, a.JIFEN, a.HUANBAOFENG, a.TIME, a.TYPE, a.YEZHU_ID from TB_YEZHU a where 1=1 and SHEQU = ? order by TIME desc,JIFEN desc) tmp_count 2016-10-25 10:18:45 -29964 [http-8080-2] DEBUG - {conn-10001, pstmt-20001} enter cache 2016-10-25 10:18:45 -29965 [http-8080-2] ERROR - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: JDBC requires that the JdbcType must be specified for all nullable parameters.
总是提示上面的错误,我贴出出现错误的sql语句:
<!-- 列表 -->
select
a.NAME,
a.Y_ID,
a.QR_ID,
a.PHONE,
a.SHEQU,
a.ADDIN,
a.USE_FLAG,
a.IC_ID,
a.BAG_NUM1,
a.BAGN_UM2,
a.BAGN_UM3,
a.BAG_NUM_SET,
a.EMAIL,
a.JIFEN,
a.HUANBAOFENG,
a.TIME,
a.TYPE,
a.YEZHU_ID
from
TB_YEZHU a
where
1=1
<if test="pd.SHEQU != 'admin'">
and SHEQU = #{pd.SHEQU}
</if>
<if test="pd.SEARCHKEY != null and pd.SEARCHKEY != ''"><!-- 关键词检索 -->
and
(
a.EMAIL LIKE CONCAT(CONCAT('%', #{pd.SEARCHKEY}),'%')
or
a.Y_ID LIKE CONCAT(CONCAT('%', #{pd.SEARCHKEY}),'%')
or
a.PHONE LIKE CONCAT(CONCAT('%', #{pd.SEARCHKEY}),'%')
or
a.ADDIN LIKE CONCAT(CONCAT('%', #{pd.SEARCHKEY}),'%')
or
a.NAME LIKE CONCAT(CONCAT('%', #{pd.SEARCHKEY}),'%')
)
</if>
order by TIME desc,JIFEN desc
你的模糊查询为什么使用两个concat