为了账号安全,请及时绑定邮箱和手机立即绑定

mybatis,调用存储过程,“setselect”附近有语法错误。

mybatis,调用存储过程,“setselect”附近有语法错误。

江户川乱折腾 2019-03-01 11:11:38
mybatis,调用存储过程,“setselect”附近有语法错误。 <select id="getTrafficReportData" resultMap="BaseResultMap" parameterType="com.unisits.zngkpt.framework.highwayreport.pojo.ReportType" statementType="CALLABLE"> {call Get_TrafficData_Report ( #{reportTimeType,mode=IN,jdbcType=VARCHAR}, #{reportFunction,mode=IN,jdbcType=VARCHAR}, #{year,mode=IN,jdbcType=INTEGER}, #{month,mode=IN,jdbcType=INTEGER}, #{day,mode=IN,jdbcType=INTEGER}, #{tunnelId,mode=IN,jdbcType=INTEGER} )} </select> 把参数直接改成 'Day', 'JTLL', 2015, 06, 15, 0就没有问题。 完整log org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: ### Error querying database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: “setselect”附近有语法错误。 ### The error may exist in file [D:\zngkpt\code\zngkpt\out\artifacts\highway_war_exploded\WEB-INF\classes\mapper\sqlserver\TrafficReportStatic.xml] ### The error may involve com.unisits.zngkpt.framework.highwayreport.mapper.TrafficReportDao.getTrafficReportData-Inline ### The error occurred while setting parameters ### SQL: {call Get_TrafficData_Report ( ?, ?, ?, ?, ?, ? )} ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: “setselect”附近有语法错误。
查看完整描述

1 回答

?
守候你守候我

TA贡献1802条经验 获得超10个赞

存储过程报错,直接把报错的参数用来调试存储过程就知道什么问题了

查看完整回答
反对 回复 2019-03-01
  • 1 回答
  • 0 关注
  • 862 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号