Mapper method 'com.autoyol.mapper.trans.AccountLogMapper.getTotalIncomByMemNoLastest attempted to return null from a method with a primitive return type (int).解决方法
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).解决方法的更多相关文章
- 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. ...
- 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 ...
- 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 ...
- delete attempted to return null from a method with a primitive return type (int)
今天被自己给蠢死了 今天在代码中遇到这个错误, 百度翻译一下:映射方法,从一org.system.mapper.child.chmorganizationexaminationmapper.delet ...
- 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 ...
- mybatis查询时使用基本数据类型接收报错-attempted to return null from a method with a primitive return type (int)
一.问题由来 自己在查看日志时发现日志中打印了一行错误信息为: 组装已经放养的宠物数据异常--->Mapper method 'applets.user.mapper.xxxMapper.xxx ...
- 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 ...
- SpringBoot使用MyBatis报错:Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvider.dynamicSQL)
© 版权声明:本文为博主原创文章,转载请注明出处 1. 错误描述 使用SpringBoot集成MyBatis框架,并且使用 mapper-spring-boot-starter 自动生成MyBati ...
- 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 ...
随机推荐
- C#使用BeginInvoke和EndInvoke异步下载和获取返回结果
场景:为了防止UI卡死,使用异步下载文件 问题:采用多线程下载,关闭窗口后下载线程不能停止,线程操作麻烦. 参考:C#客户端的异步操作: http://www.cnblogs.com/fish-li/ ...
- [RTC]系统和RTC的时间保持一致
hwclock输出的格式似乎是没有格式化的命令,所以只能修改date date "+%a %d %b %Y %I:%M:%S %p %Z"
- spring websocket + stomp 实现广播通信和一对一通信<转>
spring对于基于stomp协议的websocket通信,其官网上面有一个guide,但是根据guide你只能写出来广播方式的通信,不能实现一对一的通信,这篇文章在这里把广播和一对一一起整理一下给大 ...
- Android keytool 生成keystore与给APK签名
http://www.tttabc.com/android/keytool-keystore-jarsigner-apk.htm
- 机器学习--详解人脸对齐算法SDM-LBF
引自:http://blog.csdn.net/taily_duan/article/details/54584040 人脸对齐之SDM(Supervised Descent Method) 人脸对齐 ...
- PropertyChangeSupport
1 import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; /** * @author h ...
- ECS Linux服务器xfs磁盘扩容
ECS Linux服务器xfs磁盘扩 ECS Linux服务器xfs磁盘使用阿里云官方提供的磁盘扩容方法扩容会有报错: [root@iZ28u04wmy2Z ~]# e2fsck /dev/xvdb1 ...
- [hadoop读书笔记] 第十五章 sqoop1.4.6小实验 - 数据在mysq和hdfs之间的相互转换
P573 从mysql导入数据到hdfs 第一步:在mysql中创建待导入的数据 1.创建数据库并允许所有用户访问该数据库 mysql -h 192.168.200.250 -u root -p CR ...
- 树莓派3 U盘启动 配置 & 即 MSD启动 总结
树莓派3添加了一个新特性:允许USB启动.现在我们既可以从SD卡启动,也可以从USB启动.USB设备可以是U盘,带USB适配器的SSD硬盘,甚至是移动硬盘. 本文介绍怎么从U盘启动树莓派3. 1. ...
- USB学习笔记连载(十五):USB固件更新以及安装驱动
前几篇博客已经把如何更改固件程序和更改USB驱动名称,那么接下来就要把之前生成的 .iic 文件烧录到EEPROM里面去,实现USB的C2启动(笔者使用的是此类型,C2启动). 打开Cypress U ...