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 ...
随机推荐
- ado ole方式访问access的两种方式
OleDbConnection Connection = new OleDbConnection(); OleDbDataAdapter adapter = null; //ConnectiongSt ...
- 用B表更新A表
UPDATE dbo.POR_LOT SET POR_LOT.SHIPPED_FLAG =B.SHIPPED_FLAGFROM POR_LOT A INNER JOIN ( SELECT T5.LOT ...
- mac OS X中升级php5.5至php5.6 or php7
在做php项目中,提示“Warning. PHP 5.6 or newer is required. Please, upgrade your local PHP installation.” 通过p ...
- [note]What I’ve learnt from working on startups
What I've learnt from working on startups 从失败里学到了什么,六次创业失败. 企业家不是与生俱来的,也是靠学来的. 想的太多,做的太少.
- 【Unity】自定义编辑器窗口——拓展编辑器功能
最近学习了Unity自定义编辑器窗口,下面简单总结,方便用到时回顾. 新建一个脚本: using UnityEngine; using System.Collections; using UnityE ...
- Postgres数据库补丁脚本示例
SET client_encoding = 'UTF8';-- 新建序列和表DROP TABLE IF EXISTS cms_user_unit;DROP SEQUENCE IF EXISTS cms ...
- Jquery 延迟加载框架
http://www.appelsiini.net/projects/lazyload
- drupal 不错的网址
1.最重要的7个Drupal内核模板文件 http://mydrupal.org/%E6%9C%80%E9%87%8D%E8%A6%81%E7%9A%847%E4%B8%AAdrupal%E5%86% ...
- Map总结(HashMap, Hashtable, TreeMap, WeakHashMap等使用场景)
概要 学完了Map的全部内容,我们再回头开开Map的框架图. 本章内容包括:第1部分 Map概括第2部分 HashMap和Hashtable异同第3部分 HashMap和WeakHashMap异同 转 ...
- Materialize快速入门教程
https://materializecss.com/ https://github.com/Dogfalo/materialize http://www.materializecss.cn/ 1,下 ...