当前位置: 首页 > news >正文

做试管的网站app软件制作器

做试管的网站,app软件制作器,网站建设公司汉狮网络,自适应网站开发语言文章目录 1、SysLogMapper.xml添加注释导致的2、解决方法3、总结 1、SysLogMapper.xml添加注释导致的 !--定义一个查询方法#xff0c;用于获取日志列表--!--方法ID为getLogList#xff0c;返回类型com.main.server.api.model.SysLogModel,参数类型为com.main.se… 文章目录 1、SysLogMapper.xml添加注释导致的2、解决方法3、总结 1、SysLogMapper.xml添加注释导致的 !--定义一个查询方法用于获取日志列表--!--方法ID为getLogList返回类型com.main.server.api.model.SysLogModel,参数类型为com.main.server.api.dto.LogDto--select idgetLogList resultTypecom.main.server.api.model.SysLogModel parameterTypecom.main.server.api.dto.LogDto/*查询语句通过join操作查询sys_log和sys_user表的数据*//*根据log_user_id和id关联sys_log和sys_user表获取用户名*/select a.*,b.real_name as user_name from sys_log a join sys_user b on a.log_user_id b.id/*使用where子句过滤查询条件*/where/*如果LogDto中的userId不为空则添加过滤条件b.id #{userId}*/if testuserId ! nullb.id #{userId}/if/*如果LogDto中的logMsg不为空则添加过滤条件log_msg like concat(%,#{logMsg},%)*//*使用concat函数和like操作符实现模糊查询*/if testlogMsg ! null and logMsg.trim() ! and log_msg like concat(%,#{logMsg},%)/if/where/*按照id降序排序排列查询结果*/order by id desc/selectjava.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{propertyuserId, modeIN, javaTypeclass java.lang.Integer, jdbcTypenull, numericScalenull, resultMapIdnull, jdbcTypeNamenull, expressionnull}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (2 number of parameters, which is 1). org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{propertyuserId, modeIN, javaTypeclass java.lang.Integer, jdbcTypenull, numericScalenull, resultMapIdnull, jdbcTypeNamenull, expressionnull}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (2 number of parameters, which is 1).at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{propertyuserId, modeIN, javaTypeclass java.lang.Integer, jdbcTypenull, numericScalenull, resultMapIdnull, jdbcTypeNamenull, expressionnull}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (2 number of parameters, which is 1).at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:89)at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:93)Caused by: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (2 number of parameters, which is 1).at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:55)at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87)... 59 moreCaused by: java.sql.SQLException: Parameter index out of range (2 number of parameters, which is 1).at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)2、解决方法 把注释去掉 !--定义一个查询方法用于获取日志列表--!--方法ID为getLogList返回类型com.main.server.api.model.SysLogModel,参数类型为com.main.server.api.dto.LogDto--select idgetLogList resultTypecom.main.server.api.model.SysLogModel parameterTypecom.main.server.api.dto.LogDto/*查询语句通过join操作查询sys_log和sys_user表的数据*//*根据log_user_id和id关联sys_log和sys_user表获取用户名*/select a.*,b.real_name as user_name from sys_log a join sys_user b on a.log_user_id b.id/*使用where子句过滤查询条件*/whereif testuserId ! nullb.id #{userId}/ifif testlogMsg ! null and logMsg.trim() ! and log_msg like concat(%,#{logMsg},%)/if/where/*按照id降序排序排列查询结果*/order by id desc/select想加注释也可以可以用下面这种方式 !--定义一个查询方法用于获取日志列表--!--方法ID为getLogList返回类型com.main.server.api.model.SysLogModel,参数类型为com.main.server.api.dto.LogDto--select idgetLogList resultTypecom.main.server.api.model.SysLogModel parameterTypecom.main.server.api.dto.LogDto/*查询语句通过join操作查询sys_log和sys_user表的数据*//*根据log_user_id和id关联sys_log和sys_user表获取用户名*/select a.*,b.real_name as user_name from sys_log a join sys_user b on a.log_user_id b.id/*使用where子句过滤查询条件*/where!--如果LogDto中的userId不为空则添加过滤条件b.id #{userId}--if testuserId ! nullb.id #{userId}/if!--如果LogDto中的logMsg不为空则添加过滤条件log_msg like concat(%,#{logMsg},%)--!--使用concat函数和like操作符实现模糊查询--if testlogMsg ! null and logMsg.trim() ! and log_msg like concat(%,#{logMsg},%)/if/where/*按照id降序排序排列查询结果*/order by id desc/select3、总结 在xml中注释尽量用下面这种的 !-- --这种注释形式被称为 HTML 注释。它用于在 HTML 代码中添加注释注释的内容不会在网页中显示仅作为开发人员的备注或用于临时禁用部分 HTML 代码。
http://www.hkea.cn/news/14474927/

相关文章:

  • 工信部网站备案流程大学网站建设策划书
  • 网站制作行业越来越难做微信怎么弄自己的商城
  • 阿里云网站建设的实训报告运维难还是开发难
  • 楚雄建网站贵阳网站建设公司排名
  • 网站有什么模块太原市建站外包公司
  • 做一个公司网站一般多少钱自己做网站还有出路吗
  • 小说网站做编辑微信公众号如何发布wordpress
  • 网站怎么做子页吉利汽车网站开发环境分析
  • 厦门景观绿环建设行业协会网站长沙大的建网站公司
  • 烟台高新区网站网上智慧团建系统入口
  • 江西正东建设工程有限公司网站a wordpress
  • 重庆知名做网站的公司景点网站应该怎么做
  • 凡科建站是不是免费的可信的专业网站建设
  • 网站开发 技术问题wordpress导航图标
  • 网站建设怎么更换图片网页设计技术学什么
  • 个人空间网站模板统一管理网站系统
  • 建个企业网站一年多少钱国外超酷网站
  • 能看任何网站的浏览器网站栏目模版
  • 推荐一些做电子的网站毕业设计网站做啥
  • 用asp做宠物网站页面网络设计方案包括哪些方面
  • 专业做京东网站吗网站维护中 html
  • 成都企业建网站网站seo优化分析
  • 土木特网站建设网页制作软件哪里有
  • 江西省城乡建设厅网站网站免费空间
  • 建设银行如何网站设置密码西陆网
  • 做推广可以上那些网站微信最火的公众号排行
  • 中国铁路建设监理协会官方网站网站怎么做qq登录
  • 网站开发后台需要自己写吗简单免费模板
  • 淄博培训网站建设织梦网站一级目录
  • ps做电商网站尺寸是多少教育类型网站