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

什么网站可以做软件有哪些东西湖南百度seo

什么网站可以做软件有哪些东西,湖南百度seo,wordpress页面修改插件,沈阳旅游团购网站建设文章目录 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 id="getLogList" resultType="com.main.server.api.model.SysLogModel" parameterType="com.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 test="userId != null">b.id = #{userId}</if>/*如果LogDto中的logMsg不为空,则添加过滤条件log_msg like concat('%',#{logMsg},'%')*//*使用concat函数和like操作符实现模糊查询*/<if test="logMsg != null and logMsg.trim() != ''">and log_msg like concat('%',#{logMsg},'%')</if></where>/*按照id降序排序排列查询结果*/order by id desc</select>

在这里插入图片描述

java.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='userId', mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. 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{property='userId', mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. 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{property='userId', mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. 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 more
Caused 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 id="getLogList" resultType="com.main.server.api.model.SysLogModel" parameterType="com.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><if test="userId != null">b.id = #{userId}</if><if test="logMsg != 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 id="getLogList" resultType="com.main.server.api.model.SysLogModel" parameterType="com.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 test="userId != null">b.id = #{userId}</if><!--如果LogDto中的logMsg不为空,则添加过滤条件log_msg like concat('%',#{logMsg},'%')--><!--使用concat函数和like操作符实现模糊查询--><if test="logMsg != null and logMsg.trim() != ''">and log_msg like concat('%',#{logMsg},'%')</if></where>/*按照id降序排序排列查询结果*/order by id desc</select>

3、总结

在xml中,注释尽量用下面这种的

<!-- -->
这种注释形式被称为 HTML 注释。它用于在 HTML 代码中添加注释,注释的内容不会在网页中显示,仅作为开发人员的备注或用于临时禁用部分 HTML 代码。
http://www.hrbkazy.com/news/13437.html

相关文章:

  • 亚马逊做品牌备案自有网站必应搜索引擎网址
  • 做棋牌网站建设多少钱口碑营销案例2021
  • 本地网站建设视频教程sem竞价是什么
  • 网站里的专题页面网络服务中心
  • 北京网站制作排名优化网站服务
  • 学校网站群建设方案北京seo培训
  • 用ssh做网站百度系app
  • 建一个网站做cpa联盟莆田百度快照优化
  • 网站开发应该怎么做自媒体引流推广
  • 哪里做网站比较好站外seo推广
  • 武汉大型互联网公司seo管理是什么
  • 微信小程序开发者济南优化网络营销
  • 专做logo网站叫什么地方潍坊疫情最新消息
  • 自己有网站怎么做点卡全球十大网站排名
  • 网站如何自己做优化世界杯数据分析
  • 手机把网站做成软件今日热榜
  • 想搞一个自己的网站怎么做拼多多seo 优化软件
  • 做试题的网站免费网站推广网站破解版
  • wordpress离线发布windows7优化大师
  • 自己做网站卖仿货网络销售培训学校
  • 广州网站改版商品营销推广的方法有哪些
  • 高州做网站旺道seo优化
  • 网站可以免费建设吗谷歌浏览器网址
  • 北京seo排名武汉seo网络营销推广
  • 什么是专门型的网站上海seo服务
  • 天宁网站建设制作只要做好关键词优化
  • 霞山网站建设公司广告点击一次多少钱
  • wordpress分菜单seo工具是什么意思
  • 代理域名网站的公司设计公司网站
  • 广东网站建设公司电话2024年重大政治时事汇总