[fix]notify log页面添加查询条件及显示字段

master
hellolujian 6 years ago
parent eac17d2434
commit 053d85d61e

@ -15,6 +15,10 @@ public class NotifyQueryBean {
private int page = 1;
private int limit = 20;
private String moniker;
// 新增orderId查询字段
private String orderId;
private String clientOrderId;
private String date;
private Boolean success;
@ -24,6 +28,11 @@ public class NotifyQueryBean {
if (StringUtils.isNotEmpty(moniker)) {
param.put("client_moniker", moniker);
}
if (StringUtils.isNotEmpty(orderId)) {
param.put("order_id", orderId);
}
if (StringUtils.isNotEmpty(clientOrderId)) {
param.put("client_order_id", clientOrderId);
}
@ -88,4 +97,12 @@ public class NotifyQueryBean {
public void setSuccess(Boolean success) {
this.success = success;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
}

@ -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,

@ -24,6 +24,21 @@
is-open="dtCtrl.open" ng-click="dtCtrl.open=true">
</div>
</div>
<!-- 新增orderId查询条件 -->
<div class="form-group">
<label class="control-label col-sm-3"
for="orderIdInput">
Order ID
</label>
<div class="col-sm-7">
<input class="form-control"
type="text"
ng-model="params.orderId"
id="orderIdInput">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="clientOrderIdInput">Client Order ID</label>
<div class="col-sm-7">
@ -61,6 +76,7 @@
<tr>
<th>Time</th>
<th>Order ID</th>
<th>Client Order ID</th>
<th>Notify Url</th>
<th>Success</th>
<th>Http Code</th>
@ -71,7 +87,8 @@
<tr ng-repeat="log in notifyLogs">
<td ng-bind="log.addtime|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="log.order_id"></td>
<td ng-bind="log.notify_url|limitTo:50" title="{{log.notify_url}}"></td>
<td ng-bind="log.client_order_id"></td>
<td ng-bind="log.notify_url" title="{{log.notify_url}}"></td>
<td ng-bind="log.success?'Yes':'No'" ng-class="{'text-success':log.success,'text-danger':!log.success}"></td>
<td ng-bind="log.http_code"></td>
<td ng-bind="log.err_msg|limitTo:10" title="{{log.err_msg}}"></td>

Loading…
Cancel
Save