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. RabbitMQ文档翻译——Hello World!(下)

    Receiving That's it for our sender. Our receiver is pushed messages from RabbitMQ, so unlike the sen ...

  2. Fiddler设置抓取FireFox火狐的包

    参考 http://blog.csdn.net/zhoutaohenan/article/details/8477993 亲测有效 Fiddler使用教程 http://blog.csdn.net/o ...

  3. C语言 · 分分钟的碎碎念

    算法提高 分分钟的碎碎念   时间限制:1.0s   内存限制:256.0MB      问题描述 以前有个孩子,他分分钟都在碎碎念.不过,他的念头之间是有因果关系的.他会在本子里记录每一个念头,并用 ...

  4. keras系列︱迁移学习:利用InceptionV3进行fine-tuning及预测、完美案例(五)

    引自:http://blog.csdn.net/sinat_26917383/article/details/72982230 之前在博客<keras系列︱图像多分类训练与利用bottlenec ...

  5. 通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点

    标题很长:通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点 不过目前从oozie调度测试的例子来看,oozie本身的retry好像并没有参数可以控制跳过失败的节 ...

  6. c# 反射取其他项目的资源文件

    反射获取其他项目里面的资源文件. dll或exe里面 try { System.Reflection.Assembly dll = System.Reflection.Assembly.LoadFil ...

  7. Android开发,在Fragment中,隐藏或关闭软键盘(虚拟键盘)的方法

    网上可以搜到各种方法,实际测试中,我的开发用机中,仅仅下面这个方法有效,记录一下. //隐藏虚拟键盘      public static void HideKeyboard(View v)      ...

  8. 用图片做div背景的列表布局 CSS代码

    思路: 1.因为是竖型列表,所以外层用 相对定位,这样 在不会重叠在一起 relative 2.里面用绝对位置 absolute,覆盖在图片上面 3.这里有个小技巧,我里面有个特效,文字竖立,并向右旋 ...

  9. PCL点云特征描述与提取(4)

    如何从一个深度图像(range image)中提取NARF特征 代码解析narf_feature_extraction.cpp #include <iostream> #include & ...

  10. oracle中merge into用法解析

    merge into的形式: MERGE INTO [target-table] A USING [source-table sql] B ON([conditional expression] an ...