fix incremental rate display

master
luoyang 5 years ago
parent 9babac186b
commit 3f21fe319c

@ -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.32</version> <version>1.4.33</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>

@ -185,7 +185,7 @@ public class AppActServiceImp implements AppActService {
@Override @Override
public void sendTESTAnnualBillMessage(JSONObject params) { public void sendTESTAnnualBillMessage(JSONObject params) {
logger.debug("sendAnnualMessage Begin"); logger.debug("sendAnnualMessage Begin");
JSONObject devToken = clientDeviceTokenMapper.findByDevId("cf90a252-1121-4bfd-a201-fb573b44ac11"); JSONObject devToken = clientDeviceTokenMapper.getTestTokens();
Runnable task = () -> { Runnable task = () -> {
String token = devToken.getString("token"); String token = devToken.getString("token");
JSONObject log = saveAppMessageLog(devToken.getString("dev_id"), JSONObject log = saveAppMessageLog(devToken.getString("dev_id"),

@ -28,6 +28,8 @@ public interface ClientDeviceTokenMapper {
List<JSONObject> listAllTokens(JSONObject devToken); List<JSONObject> listAllTokens(JSONObject devToken);
JSONObject getTestTokens();
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> listAllTokensByClient_id(@Param("client_id") int client_id); List<JSONObject> listAllTokensByClient_id(@Param("client_id") int client_id);
} }

@ -541,7 +541,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 ,ifnull(i.incremental_rate,0.00) 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">

@ -49,6 +49,17 @@
group by token group by token
</select> </select>
<select id="getTestTokens" resultType="com.alibaba.fastjson.JSONObject">
select
scdt.*,
scd.client_type
from
sys_clients_devices_token scdt
left join sys_clients_devices scd on scdt.dev_id = scd.dev_id
where scdt.dev_token_id = 'e6b3cd0c-f728-4ef0-a443-84536ca8b8a2'
group by token
</select>
<select id="findByDevId" resultType="com.alibaba.fastjson.JSONObject"> <select id="findByDevId" resultType="com.alibaba.fastjson.JSONObject">
SELECT * SELECT *
FROM sys_clients_devices_token FROM sys_clients_devices_token

@ -395,7 +395,8 @@
ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a> ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a>
</td> </td>
<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>{{(((trade.surcharge_rate * 100) > trade.rate_value)?(trade.surcharge_rate * 100-trade.rate_value):trade.surcharge_rate)| number : 2}}%
</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> <td>
<span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span> <span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span>

@ -348,7 +348,7 @@
<a ng-if="trade.refund_fee" class="text-danger" role="button">(-{{trade.refund_fee}})</a> <a ng-if="trade.refund_fee" class="text-danger" role="button">(-{{trade.refund_fee}})</a>
</td> </td>
<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)?(trade.surcharge_rate * 100-trade.rate_value):trade.surcharge_rate)| number : 2}}%</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> <td>
<span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span> <span ng-if="trade.rate_value">{{trade.source}}:{{(trade.rate_value) | number : 2}}%</span>

Loading…
Cancel
Save