|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
<mapper namespace="au.com.royalpay.payment.manage.mappers.log.NotifyErrorLogMapper">
|
|
|
|
|
<!--
|
|
|
|
|
原来的SQL语句
|
|
|
|
|
<select id="listErrorLogs" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT l.* FROM log_notify_error l
|
|
|
|
|
<if test="client_moniker!=null">
|
|
|
|
@ -14,6 +16,36 @@
|
|
|
|
|
<if test="success!=null">and l.success=#{success}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<!-- 新增client_order_id字段,SQL语句修改如下 -->
|
|
|
|
|
<select id="listErrorLogs" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT lne.*, po.client_order_id
|
|
|
|
|
FROM log_notify_error lne
|
|
|
|
|
INNER JOIN pmt_orders po
|
|
|
|
|
ON lne.order_id = po.order_id
|
|
|
|
|
<if test = "client_moniker != null">
|
|
|
|
|
INNER JOIN sys_clients sc
|
|
|
|
|
ON sc.client_id = lne.client_id
|
|
|
|
|
AND sc.is_valid = 1
|
|
|
|
|
AND sc.client_moniker = #{client_moniker}
|
|
|
|
|
</if>
|
|
|
|
|
<where>
|
|
|
|
|
<if test = "order_id != null">
|
|
|
|
|
lne.order_id = #{order_id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test = "client_order_id != null">
|
|
|
|
|
AND po.client_order_id = #{client_order_id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test = "date != null">
|
|
|
|
|
AND DATE(lne.addtime) = DATE(#{date})
|
|
|
|
|
</if>
|
|
|
|
|
<if test = "success != null">
|
|
|
|
|
AND lne.success = #{success}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="listUnsentOrders" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT
|
|
|
|
|
order_id,
|
|
|
|
|