呼撒呼撒的gravatar头像
呼撒呼撒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头像
别了不想说 LV47月3日

传入的参数为空

评论(2)最佳答案
顶部客服微信二维码底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友
  • 华媒:荷兰超市提倡减少使用一次性塑料制品 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
  • 甘肃省酒泉市:推行“一办四室一中心”工作模式 2018-07-09
  • 马克思主义通过指导无产阶级革命建立起部分社会财富公有制而改变了人类历史发展进程,离开部分社会财富公有制的建立来谈“改变人类历史发展进程”纯粹是无稽之谈。 2018-07-08
  • 面包屑-热门标签-华商生活 2018-07-07
  • 湖南省首届科技创新战略咨询专家委员会成立 2018-07-06
  • 【新媒体矩阵】长城新媒体微信 2018-07-05
  • 174| 837| 99| 599| 154| 739| 648| 318| 654| 985|