From 121950e4a7f9a55ddccf81249e448dc7ebbde3bb Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Mon, 23 Apr 2018 19:15:20 +0800 Subject: [PATCH] update app statement detail api --- .../appclient/core/RetailAppService.java | 3 +++ .../core/impls/RetailAppServiceImp.java | 11 ++++++++- .../appclient/web/RetailAppController.java | 24 ++++++++----------- .../partner/templates/partner_detail.html | 14 +++++------ 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java index e7c902375..a47819a0d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java @@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** @@ -130,4 +131,6 @@ public interface RetailAppService { JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception; void getInvoiceFile(JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception; + + Map channelAndDayOfAnalysis(int client_id, String clearingDetailId, String channel, JSONObject device); } diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 32ac37f2e..65552ea80 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -10,6 +10,7 @@ import au.com.royalpay.payment.manage.appclient.core.RetailAppService; import au.com.royalpay.payment.manage.cashback.core.CashbackService; import au.com.royalpay.payment.manage.customers.core.CouponValidateService; import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl; +import au.com.royalpay.payment.manage.management.clearing.core.CleanService; import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper; import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper; import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper; @@ -150,7 +151,8 @@ public class RetailAppServiceImp implements RetailAppService { private AppActService appActService; @Resource private LogSettleMailMapper logSettleMailMapper; - + @Resource + private CleanService cleanService; private Map senderMap = new HashMap<>(); @Resource @@ -293,6 +295,13 @@ public class RetailAppServiceImp implements RetailAppService { tradeLogService.exportTransFlow(tradeLogQuery,device,httpResponse); } + @Override + public Map channelAndDayOfAnalysis(int client_id, String clearingDetailId, String channel, JSONObject device) { + String clientType = device.getString("client_type"); + deviceSupport.findRegister(clientType); + return cleanService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,device.getJSONObject("client")); + } + @Override public void updateClient(JSONObject device, AppClientBean appClientBean) { String clientType = device.getString("client_type"); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index 68dd52b8f..1d0141232 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -15,7 +15,6 @@ import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport; import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean; import au.com.royalpay.payment.manage.signin.core.SignInStatusManager; import au.com.royalpay.payment.manage.system.core.ClientContractService; -import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.device.advise.AppClientController; import au.com.royalpay.payment.tools.exceptions.BadRequestException; @@ -23,31 +22,22 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO; - import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; - import org.apache.commons.lang3.time.DateUtils; import org.springframework.validation.Errors; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.math.BigDecimal; import java.text.ParseException; import java.util.Date; import java.util.List; import java.util.Map; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; - import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE; /** @@ -137,6 +127,12 @@ public class RetailAppController { return retailAppService.getTransactionLogsByClearingDetailId(device, clearing_detail_id, timezone); } + @RequestMapping("/{client_id}/settlement_logs/{clearingDetailId}/analysis/{channel}") + public Map channelAndDayOfAnalysis(@PathVariable int client_id, @PathVariable String clearingDetailId, + @PathVariable String channel,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { + return retailAppService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,device); + } + /* 消息模块begin */ @RequestMapping(value = "/notice", method = RequestMethod.GET) public JSONObject listNotices(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam Map params) { diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index 92c27a8f6..f03543d32 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -308,7 +308,7 @@
- +
@@ -340,18 +340,18 @@
-
1:  + -
2:  +