1.打开日志输出,降低日志级别。

  1. <AppenderRef ref="console" level="trace"></AppenderRef> 否则看不到报错。。

2.调整mysql语句,不能使用order by limit之类的

  1. <!-- SELECT IFNULL(amt,1) FROM account_log WHERE mem_no=#{value} AND income_type != 4 ORDER BY id DESC LIMIT 1 -->
  2. <select id="getTotalIncomByMemNoLastest" parameterType="int" resultType="Integer">
  3.  
  4. SELECT IFNULL(MAX(amt),1) FROM account_log WHERE id = (SELECT MAX(id) FROM account_log WHERE mem_no=#{value} AND income_type != 4)
  5. </select>
  6.  
  7. <!--
  8. 处理非空的情况,同时处理MAX(order_no)订单号的情况。
  9. SELECT order_no AS orderNo FROM trans WHERE invite_group = #{groupOrderNo} AND is_group=1 AND order_no != #{orderNo} AND STATUS = 21 ORDER BY id ASC LIMIT 1
  10. -->
  11. <select id="getTransGroupOrderRestToIsGroup" resultType="java.lang.Long">
  12. SELECT IFNULL(MAX(order_no),0) AS orderNo FROM trans WHERE id = (
  13. SELECT IFNULL(MIN(id),0) AS orderNo FROM trans WHERE invite_group=#{groupOrderNo} AND is_group=1 AND order_no != #{orderNo} AND STATUS = 21
  14. )
  15. </select>

Mapper method 'com.autoyol.mapper.trans.AccountLogMapper.getTotalIncomByMemNoLastest attempted to return null from a method with a primitive return type (int).解决方法的更多相关文章

  1. rg.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao.getOnlineDayRation attempted to return null from a method with a primitive return type (float)

    本文为博主原创,未经允许不得转载: 异常展示如下: org.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao. ...

  2. org.apache.ibatis.binding.BindingException: Mapper method 'attempted to return null from a method with a primitive return type (long).

    一.问题描述 今天发现测试环境报出来一个数据库相关的错误 org.apache.ibatis.binding.BindingException: Mapper method 'attempted to ...

  3. Mapper method 'com.xxxx.other.dao.MyDao.getNo attempted to return null from a method with a primitive return type (int)

    使用myBatis调用存储过程的返回值,提示错误信息: org.apache.ibatis.binding.BindingException: Mapper method 'com.xxxx.othe ...

  4. delete attempted to return null from a method with a primitive return type (int)

    今天被自己给蠢死了 今天在代码中遇到这个错误, 百度翻译一下:映射方法,从一org.system.mapper.child.chmorganizationexaminationmapper.delet ...

  5. attempted to return null from a method with a primitive return type (int).

    java接口文件 package com.cyb.ms.mapper; import org.apache.ibatis.annotations.Param; public interface Acc ...

  6. mybatis查询时使用基本数据类型接收报错-attempted to return null from a method with a primitive return type (int)

    一.问题由来 自己在查看日志时发现日志中打印了一行错误信息为: 组装已经放养的宠物数据异常--->Mapper method 'applets.user.mapper.xxxMapper.xxx ...

  7. mysql查询null异常:attempted to return null from a method with a primitive return type

    select sum(deposit_amount)from tb_commission_ib_day mysql查询时报异常: attempted to return null from a met ...

  8. SpringBoot使用MyBatis报错:Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvider.dynamicSQL)

    © 版权声明:本文为博主原创文章,转载请注明出处  1. 错误描述 使用SpringBoot集成MyBatis框架,并且使用 mapper-spring-boot-starter 自动生成MyBati ...

  9. tk.mybatis 报错:tk.mybatis.mapper.MapperException: tk.mybatis.mapper.MapperException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiLogMapper ...

随机推荐

  1. 【Unity】角色受伤后的闪烁(blink/flash)效果

    玩家受伤后,一段时间内快速闪烁.这里想要的闪烁效果是玩家快速的显隐切换效果,而不是玩家变白的情况. 快速切换玩家的显隐效果不能用SetActive修改角色物体本身的激活状态,因为玩家角色身上的其他脚本 ...

  2. Chrome 调用vue.js 记录

    一.今晚遇到一个问题,就是不能直接在 html 直接调用 js 代码的问题 二.会出现如下错误: Refused to execute inline script because it violate ...

  3. [uart]linux串口的阻塞非阻塞切换

    比如写的时候设置为阻塞,读的时候设置为非阻塞,就需要下面的切换方式 1.获取文件的flags,即open函数的第二个参数: flags = fcntl(fd,F_GETFL,0); 2.设置文件的fl ...

  4. libevent简述

    libevent是一个轻量级的基于事件驱动的高性能的开源网络库,并且支持多个平台,对多个平台的I/O复用技术进行了封装,当我们编译库的代码时,编译的脚本将会根据OS支持的处理事件机制,来编译相应的代码 ...

  5. WIN7下重建图标缓存(解决MFC.exe桌面图标显示异常问题)

    WIN7下重建图标缓存 使用WIN7时,MFC工程生成的应用程序图标,如果更改为自定义的ICON图标之后可能在桌面上显示的依旧是上一次的图标,改个名或换个路径都能恢复正常,说明在WIN7系统下图标的缓 ...

  6. SpringMVC接受JSON参数详解及常见错误总结

    SpringMVC接受JSON参数详解及常见错误总结 SpringMVC接受JSON参数详解及常见错误总结 最近一段时间不想使用Session了,想感受一下Token这样比较安全,稳健的方式,顺便写一 ...

  7. combobox的值从主页面传递到子页面

    1.主页面传递参数 url: '@Url.Action("WaterLoad")' + '?year=' + year + '&fanwei=' + fanwei, 2.控 ...

  8. Qt添加驱动——Qt数据库之添加MySQL驱动插件

    Qt数据库之添加MySQL驱动插件(1) 现在可用的数据库驱动只有3种,在Qt中,我们需要自己编译其他数据库驱动的代码,让它们以插件的形式来使用.下面我们就以现在比较流行的MySQL数据库为例,说明一 ...

  9. 10、QT分析之WebKit

    该文章整理自 网易博客 http://blog.163.com/net_worm/blog/static/12770241920101831312381/ 转载请注明出处 WebKit是QT4新整合的 ...

  10. 如何利用pyCharm编写和运行python文件

    在安装python环境后,通常可以利用IDE pyCharm来编译我们的python文件.创建一个python文件夹,用pyCharm打开文件夹,在文件夹中新建一个python文件demo.py 也许 ...