add 增值服务交易流水

master
luoyang 5 years ago
parent 65e5378d1c
commit e32ff20b40

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.4.30</version> <version>1.4.31</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -851,10 +851,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
} }
List<JSONObject> transactions = transactionMapper.listTransactionsOfClearingOrder(clearClient.getIntValue("clear_detail_id"), List<JSONObject> transactions = transactionMapper.listTransactionsOfClearingOrder(clearClient.getIntValue("clear_detail_id"),
new PageBounds(Order.formString("order_id.asc"))); new PageBounds(Order.formString("order_id.asc")));
for (JSONObject transaction : transactions) {
transaction.put("rate_value", StringUtils.defaultString(clientIncrementalMapper.findByChannelAndClientId(transaction.getIntValue("client_id"), transaction.getString("source")), "0"));
}
String timezone_client = client.getString("timezone"); String timezone_client = client.getString("timezone");
if (timezone_client != null) { if (timezone_client != null) {
transactions.parallelStream().forEach(p -> { transactions.parallelStream().forEach(p -> {

@ -48,9 +48,6 @@ public interface ClientIncrementalMapper {
@AutoSql(type = SqlType.UPDATE) @AutoSql(type = SqlType.UPDATE)
void update(JSONObject saveIncrementalService); void update(JSONObject saveIncrementalService);
@AutoSql(type = SqlType.SELECT)
String findByChannelAndClientId(@Param("client_id") int clientId,@Param("channel") String channel);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> find(@Param("client_id") int clientId); List<JSONObject> find(@Param("client_id") int clientId);
} }

@ -270,9 +270,6 @@ public class TradeLogServiceImpl implements TradeLogService {
}}); }});
} }
PageList<JSONObject> logs = orderMapper.listIncrementalOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc"))); PageList<JSONObject> logs = orderMapper.listIncrementalOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
for (JSONObject log : logs) {
log.put("rate_value", clientIncrementalMapper.findByChannelAndClientId(log.getIntValue("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);

@ -292,6 +292,7 @@
<if test="!gateway"> <if test="!gateway">
<include refid="tradelog_list_keys"/> <include refid="tradelog_list_keys"/>
</if> </if>
,ifnull(sci.incremental_rate_value,0) as rate_value
FROM ( FROM (
select oo.order_id,oo.client_id,oo.total_amount,oo.display_amount, select oo.order_id,oo.client_id,oo.total_amount,oo.display_amount,
oo.customer_payment_amount,oo.coupon_payment_amount,oo.currency, oo.customer_payment_amount,oo.coupon_payment_amount,oo.currency,
@ -366,6 +367,7 @@
ON t.order_id = o.order_id ON t.order_id = o.order_id
AND t.refund_id IS NULL AND t.refund_id IS NULL
AND t.transaction_type = 'Credit' AND t.transaction_type = 'Credit'
LEFT JOIN sys_client_incremental sci on sci.client_id = o.client_id
<where> <where>
<if test="search_text != null"> <if test="search_text != null">
<bind name="name_pattern" value="'%' + search_text + '%'"/> <bind name="name_pattern" value="'%' + search_text + '%'"/>

@ -1154,10 +1154,12 @@
r.client_refund_id, r.client_refund_id,
o.order_detail, o.order_detail,
o.dev_id, o.dev_id,
o.source o.source,
ifnull(sci.incremental_rate_value,0) as rate_value
FROM pmt_transactions t FROM pmt_transactions t
LEFT JOIN pmt_orders o ON o.order_id = t.order_id LEFT JOIN pmt_orders o ON o.order_id = t.order_id
LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id
LEFT JOIN sys_client_incremental sci on sci.client_id = t.client_id
WHERE t.channel != 'Settlement' WHERE t.channel != 'Settlement'
AND t.clearing_order = #{clearing_order} AND t.clearing_order = #{clearing_order}
]]> ]]>

@ -380,8 +380,14 @@
<td ng-bind="trade.display_amount|currency:trade.currency"></td> <td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td>{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}<span ng-if="trade.surcharge_rate">%</span></td> <td>{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}<span ng-if="trade.surcharge_rate">%</span></td>
<td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td> <td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td>
<td><span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span></td> <td>
<td>{{trade.source}}:<span ng-if="trade.incremental_surcharge">{{trade.incremental_surcharge | currency:trade.currency}}</span><span ng-if="!trade.incremental_surcharge">{{0.00 | currency:trade.currency}}</span></td> <span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span>
<span ng-if="!trade.rate_value">{{trade.source}}:0.00%</span>
</td>
<td>{{trade.source}}:
<span ng-if="trade.incremental_surcharge">{{trade.incremental_surcharge | currency:trade.currency}}</span>
<span ng-if="!trade.incremental_surcharge">{{0.00 | currency:trade.currency}}</span>
</td>
<td ng-bind="trade.status|tradeStatus"></td> <td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td> <td ng-bind="trade.create_time"></td>
<td> <td>

@ -143,6 +143,16 @@
</div> </div>
</a> </a>
</div> </div>
<div ng-if="'tradelog'|withModule" class="col-sm-2 col-xs-6">
<a ui-sref="incremental_trade" ui-sref-opts="{reload:true}">
<div class="description-block">
<img src="/static/images/main_menu/transaction_flow.png"/>
<div class="description-text">
<span class="description-text">增值服务交易流水</span>
</div>
</div>
</a>
</div>
<div ng-if="('transAnalysis'|withModule) && (currentUser.org_id==null || currentUser.org_id==1)" class="col-sm-2 col-xs-6"> <div ng-if="('transAnalysis'|withModule) && (currentUser.org_id==null || currentUser.org_id==1)" class="col-sm-2 col-xs-6">
<a ui-sref="analysis_transanalysis" ui-sref-opts="{reload:true}"> <a ui-sref="analysis_transanalysis" ui-sref-opts="{reload:true}">
<div class="description-block"> <div class="description-block">

@ -397,8 +397,14 @@
<td ng-bind="trade.display_amount|currency:trade.currency"></td> <td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td><span ng-if="trade.surcharge_rate">{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}%</span></td> <td><span ng-if="trade.surcharge_rate">{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}%</span></td>
<td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td> <td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td>
<td><span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span></td> <td>
<td><span ng-if="trade.incremental_surcharge">{{trade.source}}:{{trade.incremental_surcharge | currency:trade.currency}}</span></td> <span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span>
<span ng-if="!trade.rate_value">{{trade.source}}:0.00%</span>
</td>
<td>
<span ng-if="trade.incremental_surcharge">{{trade.source}}:{{trade.incremental_surcharge | currency:trade.currency}}</span>
<span ng-if="!trade.incremental_surcharge">{{0.00 | currency:trade.currency}}</span>
</td>
<td ng-bind="trade.status|tradeStatus"></td> <td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td> <td ng-bind="trade.create_time"></td>
<td> <td>

@ -350,8 +350,14 @@
<td ng-bind="trade.display_amount|currency:trade.currency"></td> <td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td>{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}<span ng-if="trade.surcharge_rate">%</span></td> <td>{{(trade.surcharge_rate * 100 - trade.rate_value)| number : 2}}<span ng-if="trade.surcharge_rate">%</span></td>
<td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td> <td>{{(trade.total_surcharge-trade.incremental_surcharge) | number : 2 | currency:trade.currency}}</td>
<td><span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span></td> <td>
<td>{{trade.source}}:<span ng-if="trade.incremental_surcharge">{{trade.incremental_surcharge | currency:trade.currency}}</span><span ng-if="!trade.incremental_surcharge">{{0.00 | currency:trade.currency}}</span></td> <span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span>
<span ng-if="!trade.rate_value">{{trade.source}}:0.00%</span>
</td>
<td>{{trade.source}}:
<span ng-if="trade.incremental_surcharge">{{trade.incremental_surcharge | currency:trade.currency}}</span>
<span ng-if="!trade.incremental_surcharge">{{0.00 | currency:trade.currency}}</span>
</td>
<td ng-bind="trade.status|tradeStatus"></td> <td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td> <td ng-bind="trade.create_time"></td>
<td> <td>

Loading…
Cancel
Save