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

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

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

<!-- SELECT IFNULL(amt,1) FROM account_log WHERE mem_no=#{value} AND income_type != 4 ORDER BY id DESC LIMIT 1 -->
<select id="getTotalIncomByMemNoLastest" parameterType="int" resultType="Integer"> SELECT IFNULL(MAX(amt),1) FROM account_log WHERE id = (SELECT MAX(id) FROM account_log WHERE mem_no=#{value} AND income_type != 4)
</select> <!--
处理非空的情况,同时处理MAX(order_no)订单号的情况。
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
-->
<select id="getTransGroupOrderRestToIsGroup" resultType="java.lang.Long">
SELECT IFNULL(MAX(order_no),0) AS orderNo FROM trans WHERE id = (
SELECT IFNULL(MIN(id),0) AS orderNo FROM trans WHERE invite_group=#{groupOrderNo} AND is_group=1 AND order_no != #{orderNo} AND STATUS = 21
)
</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. linux 使用 lockf命令防止脚本重复运行

    之前服务器的脚本,迁移至一台新的机器上,运行脚本,提示报错信息: -bash: /usr/bin/lockf: 没有那个文件或目录  或 -bash: /usr/bin/lockf:  no such ...

  2. Python的自增运算符

    今天在写一个合并两个有血list的时候,使用了while循环,不自觉的使用了i++,自测的时候发现有语法错误,还检查了好几遍,觉得应该没啥错误啊,后来google了一把,恍然大悟,原来Python早就 ...

  3. 初试 spring web mvc

    作为一名code需要了解更多的知识,编程方面的东西太多了,是个逐渐积累的过程.最近学习一下spring web mvc,写下我个人的一些经验. 1.准备jar包.spring mvc 已经到了版本4, ...

  4. asp.net无刷新上传(带预览)

    1.有个图片 <img id="Image1" title="用于广告栏及图文框缩略图" width="150" height=&qu ...

  5. genymotion 前端调试

    1. genymotion的安装见这里 注: a. 要先装VirtualBox, 再装genymotion b. VirtualBox不能太高,我装的是VirtualBox-4.1.40-101594 ...

  6. 反射setAccessible()方法

    java代码中,常常将一个类的成员变量置为private 在类的外面获取此类的私有成员变量的value时,需要注意: 测试类: public class AccessibleTest { privat ...

  7. 关于HttpWebRequest上传文件

    我们web 操作离不开 http请求响应 HttpWebRequest上传文件也是一样的道理 下面码一些代码: private void UploadFile(string strRequestUri ...

  8. 解决jar包乱码 in 创新实训 智能自然语言交流系统

    今天用eclipse的fat jar插件,打成jar包.之后再命令行运行...程序的功能是切分大的文件...结果是切分的很正确,但是里面的中文都变成了乱码. 最开始以为是在Eclipse中的编码设置有 ...

  9. 使用VMware将Linux装在物理硬盘上,开机即可进入Linux

    我的笔记本上是双系统Windows和Linux .经常需要在两个系统间切换,很麻烦.于是我想到如果能用VMWare虚拟机加载物理硬盘中的系统,可以在需要时,直接启动另外一个系统.     注意:我的双 ...

  10. 文本编辑工具(sublime text 2)

    学习地址: http://www.iplaysoft.com/sublimetext.html 下载地址:http://www.sublimetext.com