|
|
|
@ -59,10 +59,11 @@ public class FinancialController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/order_validations/{date}")
|
|
|
|
|
public JSONObject getCheckReport(@PathVariable String date, @RequestParam(defaultValue = "false") boolean fix,
|
|
|
|
|
@RequestParam(name = "use_cache", defaultValue = "true") boolean useCache) {
|
|
|
|
|
@RequestParam(name = "use_cache", defaultValue = "true") boolean useCache,
|
|
|
|
|
@RequestParam(name = "is_send_message", defaultValue = "false") boolean isSendMessage) {
|
|
|
|
|
try {
|
|
|
|
|
Date dt = DateUtils.parseDate(date, new String[]{"yyyyMMdd"});
|
|
|
|
|
return cleanService.validTransactions(dt, fix, !useCache, false);
|
|
|
|
|
return cleanService.validTransactions(dt, fix, !useCache, false,isSendMessage);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
throw new ParamInvalidException("date", "error.payment.valid.invalid_date_format");
|
|
|
|
|
}
|
|
|
|
@ -97,8 +98,8 @@ public class FinancialController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/get/transaction/status/{transactionId}")
|
|
|
|
|
public TransactionStatus getTransactionStatus(@PathVariable String transactionId) {
|
|
|
|
|
if(transactionId.isEmpty()){
|
|
|
|
|
throw new ParamInvalidException("date","Transaction flow is empty");
|
|
|
|
|
if (transactionId.isEmpty()) {
|
|
|
|
|
throw new ParamInvalidException("date", "Transaction flow is empty");
|
|
|
|
|
}
|
|
|
|
|
return cleanService.getTransactionStatus(transactionId);
|
|
|
|
|
}
|
|
|
|
@ -109,12 +110,11 @@ public class FinancialController {
|
|
|
|
|
@RequestParam(value = "noCache") boolean noCache,
|
|
|
|
|
@RequestParam(value = "billType", required = false) String billType,
|
|
|
|
|
@RequestParam(value = "channel") String channel,
|
|
|
|
|
HttpServletResponse response) {
|
|
|
|
|
HttpServletResponse response) {
|
|
|
|
|
ChannelReconciliationFileContent file = cleanService.downloadChannelReconciliationFile(pid, au.com.royalpay.payment.tools.utils.DateUtils.parseDate(billDate)
|
|
|
|
|
, noCache, channel, billType);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try (InputStream in = new ByteArrayInputStream(file.content())) {
|
|
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(file.name(), Charsets.UTF_8.name()));
|
|
|
|
|
response.setContentLength(file.length());
|
|
|
|
|