132_捷克的gravatar头像
132_捷克2018-07-03 09:45:43

北京快三结果彩票控:mybatis抛出异常JDBC requires that the JdbcType must be specified for all nullable parameters.

上海快三今日开奖走势国结果 www.6r52v.cn 问题描述

在查询某个部门信息的时候报错。错在sql某个值null时需配jdbcType,查了些资料出现这种问题都是插入,但是查询还是报这个问题,而后我在字段里面加了写ifnull 还是报一样的错误。求解。。

运行环境

jdk7+tomcat6

项目技术(必填)

mybatis

项目截图(必填)

mybatis抛出异常JDBC requires that the JdbcType must be specified for all nullable parameters.

运行截图(必填)

mybatis抛出异常JDBC requires that the JdbcType must be specified for all nullable parameters.

相关代码片段

/*执行sql*/

<select id="assessmentList" resultType="com.orhon.pa.modules.opa.entity.OpaLeadershipAssessment">

SELECT

a.id AS "id",

a.office_id AS "office.id",

a.item_parent_id AS "itemParentId",

a.code AS "code",

a.name AS "name",

a.create_by AS "createBy.id",

a.create_date AS "createDate",

a.update_by AS "updateBy.id",

a.update_date AS "updateDate",

a.remarks AS "remarks",

a.del_flag AS "delFlag",

a.democratic_assessment AS "democraticAssessment",

a.social_assessment AS "socialAssessment",

a.germany_assessment AS "germanyAssessment",

a.conversation_assessment AS "conversationAssessment",

a.department_assessment AS "departmentAssessment",

a.normal_assessment AS "normalAssessment",

a.status AS "status",

ifnull(SUM(

a.DEMOCRATIC_ASSESSMENT + 

    a.SOCIAL_ASSESSMENT +

    a.GERMANY_ASSESSMENT +

    a.CONVERSATION_ASSESSMENT + 

    a.NORMAL_ASSESSMENT + 

    a.DEPARTMENT_ASSESSMENT

),"")AS allscore,

IFNULL(a.user_id,"") AS userId

FROM opa_leadership_assessment a

<where>

a.del_flag = #{DEL_FLAG_NORMAL} 

and a.user_id=#{id}

<if test="name != null and name != ''">

AND a.name LIKE 

<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>

<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>

<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>

</if>

</where>

<choose>

<when test="page !=null and page.orderBy != null and page.orderBy != ''">

ORDER BY ${page.orderBy}

</when>

<otherwise>

<!-- ORDER BY a.update_date DESC -->

group by name

                order by allscore 

</otherwise>

</choose>

</select>

注意事项

所有回答列表(1)
别了不想说的gravatar头像
别了不想说 LV42018年7月3日

传入的参数为空

评论(2)最佳答案
顶部客服微信二维码底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友
  • 农业农村部2017年返乡下乡双创人员达740万人 2019-04-24
  • A站受黑客攻击:近千万条用户数据外泄 涉ID及密码等 2019-03-29
  • 语文水平太差,直通通的转不弯来,又怎么表现逻辑大师的水平,忽悠成为自我暴露 2019-03-25
  • 亚冠-曾诚神扑救主 中超德比权健主场0-0恒大 2019-03-25
  • 看好啦!是时候表演真正的技术了 2019-03-16
  • 楼市下半年或持续降温 房地产长效机制加速推进 2019-03-16
  • “世界杯时间”,以独特方式展现中国元素 2019-01-11
  • 香港迪士尼推“无现金”体验便利游客 2019-01-11
  • 华媒:荷兰超市提倡减少使用一次性塑料制品 2018-07-13
  • 抓住党的建设着力点,焕发全党蓬勃活力  2018-07-12
  • 湖州市从细从实依法治路 2018-07-12
  • 【新时代 新作为 新篇章】“煤老大”渐行渐远 新动能清风徐来 2018-07-11
  • 西部网(陕西新闻网)www.cnwest.com 2018-07-11
  • 平凡人生闪耀璀璨的生命光华——“中国网事·感动2017”颁奖典礼侧记 2018-07-10
  • 为什么截留信马克的帖子?这还有摆事实讲道理存在吗? 2018-07-10
  • 27| 640| 16| 778| 643| 423| 417| 291| 715| 921|