|
|
@ -1,18 +1,12 @@
|
|
|
|
package au.com.royalpay.payment.manage.dev.web;
|
|
|
|
package au.com.royalpay.payment.manage.dev.web;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.alipay.runtime.AlipayOnlineApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.alipay.runtime.AlipayRetailApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfoInheritance;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfoInheritance;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.impls.WxPayMerchantRegister;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.impls.WxPayMerchantRegister;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentDevHelper;
|
|
|
|
import au.com.royalpay.payment.core.PaymentDevHelper;
|
|
|
|
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
|
|
|
|
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
|
|
|
|
import au.com.royalpay.payment.core.mappers.PmtCustomReportMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.ATOReportService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.ATOReportService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
@ -23,6 +17,8 @@ import au.com.royalpay.payment.manage.dev.bean.SendWechatMessage;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.AliforexcelService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.AliforexcelService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.AlipayRegisterService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.AlipayRegisterService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.management.clearing.beans.CustomizedSettleRequest;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.management.clearing.core.SettleTasksService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.*;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.*;
|
|
|
@ -69,12 +65,13 @@ import javax.validation.Valid;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
import java.security.InvalidParameterException;
|
|
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yixian on 2016-07-06.
|
|
|
|
* Created by yixian on 2016-07-06.
|
|
|
@ -106,6 +103,8 @@ public class TestController {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PaymentApi paymentApi;
|
|
|
|
private PaymentApi paymentApi;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SettleTasksService settleTasksService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private TradeLogService tradeLogService;
|
|
|
|
private TradeLogService tradeLogService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private RetailAppService retailAppService;
|
|
|
|
private RetailAppService retailAppService;
|
|
|
@ -127,8 +126,6 @@ public class TestController {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PaymentDevHelper paymentDevHelper;
|
|
|
|
private PaymentDevHelper paymentDevHelper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PmtCustomReportMapper pmtCustomReportsMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SysWxMerchantApplyMapper sysWxMerchantApplyMapper;
|
|
|
|
private SysWxMerchantApplyMapper sysWxMerchantApplyMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
|
|
|
|
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
|
|
|
@ -259,13 +256,13 @@ public class TestController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject alipayApsCashierRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_CASHIER.getChannelCode());
|
|
|
|
JSONObject alipayApsCashierRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_CASHIER.getChannelCode());
|
|
|
|
if (alipayApsCashierRate != null) {
|
|
|
|
if (alipayApsCashierRate != null) {
|
|
|
|
client.put("aps_cashier_rate", alipayApsCashierRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)+"%");
|
|
|
|
client.put("aps_cashier_rate", alipayApsCashierRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN) + "%");
|
|
|
|
client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN)+"%");
|
|
|
|
client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").multiply(CommonConsts.HUNDRED).setScale(2, RoundingMode.DOWN) + "%");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject alipayApsInstoreRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_IN_STORE.getChannelCode());
|
|
|
|
JSONObject alipayApsInstoreRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_IN_STORE.getChannelCode());
|
|
|
|
if (alipayApsInstoreRate != null) {
|
|
|
|
if (alipayApsInstoreRate != null) {
|
|
|
|
client.put("aps_instore_rate", alipayApsInstoreRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)+"%");
|
|
|
|
client.put("aps_instore_rate", alipayApsInstoreRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN) + "%");
|
|
|
|
client.put("aps_instore_service_rate",alipayApsInstoreRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN)+"%");
|
|
|
|
client.put("aps_instore_service_rate", alipayApsInstoreRate.getBigDecimal("transaction_fee").multiply(CommonConsts.HUNDRED).setScale(2, RoundingMode.DOWN) + "%");
|
|
|
|
client.put("alipayplus_clean", alipayApsInstoreRate.getString("clean_days"));
|
|
|
|
client.put("alipayplus_clean", alipayApsInstoreRate.getString("clean_days"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
} catch (Exception ignored) {
|
|
|
@ -436,6 +433,11 @@ public class TestController {
|
|
|
|
aliforexcelService.registerRangeAlipayOnlineMerchant(start, end);
|
|
|
|
aliforexcelService.registerRangeAlipayOnlineMerchant(start, end);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/customized_settle", method = RequestMethod.POST, role = ManagerRole.DEVELOPER)
|
|
|
|
|
|
|
|
public JSONObject sendCustomizedSettle(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody CustomizedSettleRequest req) {
|
|
|
|
|
|
|
|
return settleTasksService.submitCustomizedSettle(req, manager);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/register/alipayGms")
|
|
|
|
@GetMapping(value = "/register/alipayGms")
|
|
|
|
public void registerAlipayMerchant() {
|
|
|
|
public void registerAlipayMerchant() {
|
|
|
|
aliforexcelService.registerAlipayMerchant();
|
|
|
|
aliforexcelService.registerAlipayMerchant();
|
|
|
@ -824,14 +826,14 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int st=0;
|
|
|
|
int st = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量更新支付宝子商户号报备
|
|
|
|
* 批量更新支付宝子商户号报备
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping(value = "/batch_update_alipayapply")
|
|
|
|
@GetMapping(value = "/batch_update_alipayapply")
|
|
|
|
public void batchUpdateAlipayApply() {
|
|
|
|
public void batchUpdateAlipayApply() {
|
|
|
|
if(st>0){
|
|
|
|
if (st > 0) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
st++;
|
|
|
|
st++;
|
|
|
|