标签:
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>
标签:
原文地址:http://www.cnblogs.com/simpledev/p/5466635.html