From 9b9b430dfa7101f96a9e11ac8adf984e6024107c Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Wed, 8 Aug 2018 21:35:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BF=BC=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=B8=85=E7=AE=97=E5=BC=80=E5=A7=8B=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/impls/PlatformClearAnalysisServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java index 26386ea08..b8a173cf7 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java @@ -54,16 +54,16 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { @Override public JSONObject getChannelSettleLog(String channel) { JSONObject sysLogs = new JSONObject(); - JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog5("2018-02-05 02:00:00", sdfNormal.format(new Date()), channel, "Credit"); + JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog5("2018-04-05 02:00:00", sdfNormal.format(new Date()), channel, "Credit"); sysLogs.put("sys_pay_fee", creditLogs.getBigDecimal("rmb_amount")); - JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog5("2018-02-05 02:00:00", sdfNormal.format(new Date()), channel, "Debit"); + JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog5("2018-04-05 02:00:00", sdfNormal.format(new Date()), channel, "Debit"); sysLogs.put("sys_refund_fee", debitLogs.getBigDecimal("rmb_amount")); sysLogs.put("surcharge", creditLogs.getBigDecimal("charge_amount").subtract(debitLogs.getBigDecimal("charge_amount"))); sysLogs.put("sys_settle_amount", sysLogs.getBigDecimal("sys_pay_fee").subtract(sysLogs.getBigDecimal("sys_refund_fee")).subtract(sysLogs.getBigDecimal("surcharge"))); - sysLogs.put("start_date","2018-02-05"); + sysLogs.put("start_date","2018-04-05"); sysLogs.put("end_date",sdfClear.format(new Date())); return sysLogs; } From 010bd56a610755229ec8e3d6326688133f5bd737 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 9 Aug 2018 14:10:11 +0800 Subject: [PATCH 2/5] fix --- src/db/modify.sql | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/db/modify.sql b/src/db/modify.sql index 0e4cc4745..50f6f75c6 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -684,4 +684,30 @@ INSERT INTO `sys_configs` VALUES ('payment.ali.per_order_limit', 10000,null); update sys_clients set contact_phone = concat('+61',contact_phone) where create_time >'2018-06-01' and source = 4 +ALTER TABLE `log_clearing_detail` +ADD COLUMN `total_cashback` decimal(16,3) NOT NULL DEFAULT 0 COMMENT '返现总额(2018-04-21开始计算)' AFTER `tax_amount`, +DEFAULT CHARACTER SET DEFAULT; + +ALTER TABLE `log_clearing` +ADD COLUMN `total_charge` decimal(16,3) NOT NULL DEFAULT 0 COMMENT '总手续费' AFTER `royalpay_charge`, +ADD COLUMN `charge_cashback` decimal(16,3) NOT NULL DEFAULT 0 COMMENT '返现' AFTER `total_charge`; + + +ALTER TABLE `pmt_custom_reports` +ADD COLUMN `report_serial` varchar(50) NOT NULL FIRST , +ADD COLUMN `serial_no` int NULL DEFAULT 0 AFTER `report_id`, +ADD COLUMN `custom_target` varchar(30) NOT NULL AFTER `custom`, +DROP PRIMARY KEY, +DROP INDEX `client_id` , +ADD INDEX `client_id` (`client_id`) USING HASH , +DROP INDEX `order_id` , +ADD INDEX `order_id` (`order_id`) USING HASH , +DROP INDEX `channel` , +ADD INDEX `channel` (`channel`) USING HASH , +ADD INDEX `report_id` (`report_id`) USING HASH ; + + +update pmt_custom_reports set report_serial=uuid(); + +alter pmt_custom_reports add PRIMARY key (report_serial); alter table sys_org add COLUMN `state` varchar(20) DEFAULT NULL COMMENT '州 (使用标准码 NSW,QLD,WA,VIC,ACT,NT,TAS,SA)'; \ No newline at end of file From 90da2a1c1c5c2a3eb5337e67daa8660dbc01569d Mon Sep 17 00:00:00 2001 From: luoyang14z7 <704328506@qq.com> Date: Thu, 9 Aug 2018 17:13:23 +0800 Subject: [PATCH 3/5] fix : ali for excel --- .../manage/dev/core/impl/AliforexcelServiceImpl.java | 6 +++++- .../royalpay/payment/manage/mappers/system/ClientMapper.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java index 845c76876..ca6b5b381 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java @@ -48,7 +48,11 @@ public class AliforexcelServiceImpl implements AliforexcelService { row = sheet.createRow(++rowNum); row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("company_name")); row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("short_name")); - row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("client_moniker")); + if (!"".equals(partner.getString("ali_sub_merchant_id"))) { + row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("ali_sub_merchant_id")); + }else { + row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("client_moniker")); + } row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("alipayindustry")); row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("address")+","+partner.getString("suburb") + "," + partner.getString("state") + "," + partner.getString("postcode")); row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("business_hours")); diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index ef9a4a2ff..24bfc3a90 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -168,7 +168,7 @@ - select b.bill_id,b.status,b.currency,DATE_FORMAT(b.create_time,'%Y-%c-%e') create_date, DATE_FORMAT(b.create_time,'%H:%m:%s') create_time,b.remark,b.price,count(o.bill_order_id) order_counts,sum(o.order_total_amount) order_total_amount + select b.bill_id,b.status,b.currency,DATE_FORMAT(b.create_time, '%Y-%m-%d') create_date,DATE_FORMAT(b.create_time, '%k:%i:%s') create_time,b.remark,b.price,count(o.bill_order_id) order_counts,sum(o.order_total_amount) order_total_amount from pmt_bill b left join pmt_bill_order o on b.bill_id = o.bill_id and o.order_status = 1