fix incremental rate

master
luoyang 5 years ago
parent bf4b32545b
commit 81f7c0d10c

@ -202,9 +202,6 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
} }
} }
for (JSONObject log : logs) {
log.put("rate_value",sysClientIncrementalMapper.findByChannelAndClientId(log.getString("client_id"),log.getString("source")));
}
JSONObject result = PageListUtils.buildPageListResult(logs); JSONObject result = PageListUtils.buildPageListResult(logs);
JSONObject analysis = orderMapper.analysisOrders(params); JSONObject analysis = orderMapper.analysisOrders(params);
result.put("analysis", analysis); result.put("analysis", analysis);

@ -539,6 +539,7 @@
<select id="listIncrementalOrdersByClients" resultType="com.alibaba.fastjson.JSONObject"> <select id="listIncrementalOrdersByClients" resultType="com.alibaba.fastjson.JSONObject">
<include refid="tradelog_list_keys"/> <include refid="tradelog_list_keys"/>
,i.incremental_rate as rate_value
FROM pmt_orders o FROM pmt_orders o
INNER JOIN sys_clients p ON p.client_id=o.client_id and p.is_valid=1 INNER JOIN sys_clients p ON p.client_id=o.client_id and p.is_valid=1
<if test="client_ids!=null"> <if test="client_ids!=null">
@ -551,6 +552,7 @@
and p.client_id=#{client_id} and p.client_id=#{client_id}
</if> </if>
LEFT JOIN pmt_transactions t on t.order_id=o.order_id and t.refund_id is null and t.transaction_type='Credit' LEFT JOIN pmt_transactions t on t.order_id=o.order_id and t.refund_id is null and t.transaction_type='Credit'
LEFT JOIN pmt_incremental_detail i on i.transaction_id = t.transaction_id
<where> <where>
<if test="from!=null">and o.create_time &gt;= #{from}</if> <if test="from!=null">and o.create_time &gt;= #{from}</if>
<if test="to!=null">and o.create_time &lt; #{to}</if> <if test="to!=null">and o.create_time &lt; #{to}</if>

Loading…
Cancel
Save