From 529be0e353a144fe0998fd327be574eaf5895a2c Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 1 Apr 2020 18:42:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B8=85=E7=AE=97=E6=97=A5=E6=8A=A5?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=AF=AF=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../web/PartnerCardDashboardController.java | 13 +-------- .../web/CleanLogClientController.java | 29 ++----------------- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 9ee3066b1..b0501cc09 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.23 + 1.4.24 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/web/PartnerCardDashboardController.java b/src/main/java/au/com/royalpay/payment/manage/analysis/web/PartnerCardDashboardController.java index 682949f6e..80cb363ed 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/web/PartnerCardDashboardController.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/web/PartnerCardDashboardController.java @@ -10,15 +10,11 @@ import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.time.DateFormatUtils; -import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.text.ParseException; -import java.util.Date; import java.util.List; import java.util.Map; @@ -96,14 +92,7 @@ public class PartnerCardDashboardController { @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}") @ReadOnlyConnection public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - Date date = new Date(); - try { - date = DateUtils.parseDate(reportDate, "yyyy-MM-dd"); - } catch (ParseException e) { - logger.error("parse report date error:{}", e.getMessage()); - } - String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd"); - return cleanService.getCleanLogTransactionsOfMergeSettle(client_id,realRDate, manager); + return cleanService.getCleanLogTransactionsOfMergeSettle(client_id,reportDate, manager); } @RequestMapping("/settlement_logs/{detailId}/analysis/{channel}") diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/web/CleanLogClientController.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/web/CleanLogClientController.java index 73eb6d09b..59bb2dde9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/web/CleanLogClientController.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/web/CleanLogClientController.java @@ -5,7 +5,6 @@ import au.com.royalpay.payment.manage.permission.manager.PartnerMapping; import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.exceptions.BadRequestException; import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -14,7 +13,6 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.text.ParseException; -import java.util.Date; import java.util.List; import java.util.Map; @@ -46,14 +44,7 @@ public class CleanLogClientController { @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}") public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) { - Date date = new Date(); - try { - date = DateUtils.parseDate(reportDate, "yyyy-MM-dd"); - } catch (ParseException e) { - logger.error("parse report date error:{}", e.getMessage()); - } - String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd"); - JSONObject data = cleanService.listClearingTransactionsByMergeSettle(partner.getIntValue("client_id"), realRDate, partner); + JSONObject data = cleanService.listClearingTransactionsByMergeSettle(partner.getIntValue("client_id"), reportDate, partner); data.put("report_date", reportDate); return data; } @@ -67,14 +58,7 @@ public class CleanLogClientController { @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}/analysis/{channel}") public Map channelAndDayOfMergeSettleAnalysis(@PathVariable int client_id, @PathVariable String reportDate, @PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) { - Date date = new Date(); - try { - date = DateUtils.parseDate(reportDate, "yyyy-MM-dd"); - } catch (ParseException e) { - logger.error("parse report date error:{}", e.getMessage()); - } - String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd"); - return cleanService.channelAndDayOfMergeSettleAnalysis(client_id, realRDate,channel,partner); + return cleanService.channelAndDayOfMergeSettleAnalysis(client_id, reportDate,channel,partner); } @PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export") @@ -86,14 +70,7 @@ public class CleanLogClientController { @PartnerMapping("/{client_id}/settlement_logs/report_date/{reportDate}/export") public void exportTransactionsByReportDate(@PathVariable int client_id, @PathVariable String reportDate, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) { - Date date = new Date(); - try { - date = DateUtils.parseDate(reportDate, "yyyy-MM-dd"); - } catch (ParseException e) { - logger.error("parse report date error:{}", e.getMessage()); - } - String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd"); - cleanService.exportTransactionsByReportDate(realRDate, partner, resp); + cleanService.exportTransactionsByReportDate(reportDate, partner, resp); } // @RequestMapping(value = "/{clearId}.json")