From 0bb2c9212a7514b0f47ef8ae6d2cf43c575f6936 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Tue, 31 Jul 2018 12:18:29 +0800 Subject: [PATCH] update --- .../manage/custom/core/impl/CustomServiceImpl.java | 8 ++++++++ .../manage/mappers/custom/CustomReportsMapper.xml | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/custom/core/impl/CustomServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/custom/core/impl/CustomServiceImpl.java index b93a4351a..f42f8fe74 100644 --- a/src/main/java/au/com/royalpay/payment/manage/custom/core/impl/CustomServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/custom/core/impl/CustomServiceImpl.java @@ -13,6 +13,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.util.List; @@ -66,6 +67,13 @@ public class CustomServiceImpl implements CustomService { @Override public JSONObject query(JSONObject param, int page, int limit) { param.put("orderStatus", OrderStatus.SUCCESS.getStatus()); + List channels = customSupport.customSupportedChannels(param.getIntValue("client_id")); + param.put("channels",channels); + if(!StringUtils.isEmpty(param.getString("channel"))) { + channels.clear(); + channels.add(param.getString("channel")); + param.put("channels",channels); + } return PageListUtils.buildPageListResult(customReportsMapper.queryWithTrans(param, new PageBounds(page, limit))); } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/custom/CustomReportsMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/custom/CustomReportsMapper.xml index da79f0d7a..ec3880a92 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/custom/CustomReportsMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/custom/CustomReportsMapper.xml @@ -2,7 +2,7 @@ - select o.order_id order_id, t.transaction_time transaction_time, t.transaction_amount transaction_amount, t.cny_amount cny_amount ,r.report_status report_status,r.report_id report_id,o.channel channel @@ -15,7 +15,12 @@ pmt_custom_reports r on r.order_id = o.order_id where - o.channel = 'Alipay' + o.channel in ( + + #{item} + + ) + and o.client_id = #{client_id} and transaction_type = 'Credit' and