master
kira 8 years ago
commit 7db3b8875a

@ -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)';

@ -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;
}

@ -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"));

@ -221,7 +221,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish
operator.put("operator_id", partnerAccount.getString("account_id"));
operator.put("operator", partnerAccount.getString("display_name"));
} else {
operator.put("operator_id", manager.getIntValue("manager_id"));
operator.put("operator_id", manager.getString("manager_id"));
operator.put("operator", manager.getString("display_name"));
}
boolean requireAudit = type == OperatorType.PARTNER && PartnerRole.getRole(partnerAccount.getIntValue("role")) == PartnerRole.CASHIER

@ -3,7 +3,7 @@
<mapper namespace="au.com.royalpay.payment.manage.mappers.bill.BillMapper">
<select id="listWithOrderAnalysis" resultType="com.alibaba.fastjson.JSONObject" >
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
<where>

@ -168,7 +168,7 @@
</select>
<select id="passPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT
company_name,short_name,client_moniker,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction
company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction
from sys_clients
<where>
(approve_result=1 or (approve_result=2 and (source=1 or source=2)))

Loading…
Cancel
Save