fix 清算日报时间误差

master
luoyang 5 years ago
parent d871253368
commit 529be0e353

@ -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.23</version> <version>1.4.24</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>

@ -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.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject; 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.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.ParseException;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -96,14 +92,7 @@ public class PartnerCardDashboardController {
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}") @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}")
@ReadOnlyConnection @ReadOnlyConnection
public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
Date date = new Date(); return cleanService.getCleanLogTransactionsOfMergeSettle(client_id,reportDate, manager);
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);
} }
@RequestMapping("/settlement_logs/{detailId}/analysis/{channel}") @RequestMapping("/settlement_logs/{detailId}/analysis/{channel}")

@ -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.CommonConsts;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -14,7 +13,6 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -46,14 +44,7 @@ public class CleanLogClientController {
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}") @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}")
public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate, public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) { @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
Date date = new Date(); JSONObject data = cleanService.listClearingTransactionsByMergeSettle(partner.getIntValue("client_id"), reportDate, partner);
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);
data.put("report_date", reportDate); data.put("report_date", reportDate);
return data; return data;
} }
@ -67,14 +58,7 @@ public class CleanLogClientController {
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}/analysis/{channel}") @RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}/analysis/{channel}")
public Map<String,JSONObject> channelAndDayOfMergeSettleAnalysis(@PathVariable int client_id, @PathVariable String reportDate, public Map<String,JSONObject> channelAndDayOfMergeSettleAnalysis(@PathVariable int client_id, @PathVariable String reportDate,
@PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) { @PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
Date date = new Date(); return cleanService.channelAndDayOfMergeSettleAnalysis(client_id, reportDate,channel,partner);
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);
} }
@PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export") @PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export")
@ -86,14 +70,7 @@ public class CleanLogClientController {
@PartnerMapping("/{client_id}/settlement_logs/report_date/{reportDate}/export") @PartnerMapping("/{client_id}/settlement_logs/report_date/{reportDate}/export")
public void exportTransactionsByReportDate(@PathVariable int client_id, @PathVariable String reportDate, public void exportTransactionsByReportDate(@PathVariable int client_id, @PathVariable String reportDate,
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) { @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) {
Date date = new Date(); cleanService.exportTransactionsByReportDate(reportDate, partner, resp);
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);
} }
// @RequestMapping(value = "/{clearId}.json") // @RequestMapping(value = "/{clearId}.json")

Loading…
Cancel
Save