Type handler was null on parameter mapping for property ‘height[0]‘. It was either not specified and

报错信息:

Type handler was null on parameter mapping for property 'height[0]'. It was either not specified and/or could not be found for the javaType ([Ljava.lang.Double;) : jdbcType (null) combination.

报错场景:

   <select id="selectPageV2"
            parameterType="cn.iocoder.yudao.module.matchmaker.controller.admin.infrainfo.vo.InfrainfoPageReqVO"
            resultType="cn.iocoder.yudao.module.matchmaker.controller.admin.infrainfo.vo.InfrainfoRespVO">
        SELECT
            b.id,
            b.realname,
            b.mobile,
            b.user_id,
            b.wxno,
            b.birthday,
            b.sex,
            b.nation,
            b.height,
            b.weight,
            b.marriage_history,
            b.educational,
            b.current_residence,
            b.birthplace,
            b.last_time,
            b.auth,
            b.create_time

        FROM
            matchmaker_collection a LEFT JOIN matchmaker_infrainfo b ON a.collection_id = b.id
        <where>
            <if test="userId !=null"> and a.user_id = #{userId}</if>
            <if test="sex !=null"> and b.sex = #{sex}</if>
            <if test="currentResidence !=null"> and b.current_residence = #{currentResidence}</if>
            <if test="birthday !=null"> and b.birthday between #{birthday[0]} and #{birthday[1]}</if>
            <if test="height !=null and height.length==2" > and b.height between #{height[0]} and #{height[1]}</if>
            <if test="educational !=null "> and b.educational = #{educational}</if>
            <if test="marriageHistory !=null"> and b.marriage_history = #{marriageHistory}</if>
            and b.deleted = 0
        </where>

在<if test="birthday !=null"> and b.birthday between #{birthday[0]} and #{birthday[1]}</if>中没有指定javaType的类型。

解决报错:

            <if test="birthday !=null"> and b.birthday between #{birthday[0],javaType=java.time.LocalDate} and #{birthday[1],javaType=java.time.LocalDate}</if>
            <if test="height !=null and height.length==2" > and b.height between #{height[0],javaType=Double} and #{height[1],javaType=Double}</if>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值