[Y] stable 2.3.0

master
taylor.dang 4 years ago
parent e9b7bc3491
commit 1453f0505a

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.2.35</version>
<version>2.3.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>
@ -33,30 +33,14 @@
<groupId>au.com.royalpay.payment</groupId>
<artifactId>alipay-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>hf-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>rppaymentsvc</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>jd-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>rpay-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>yeepay-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>bestpay-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.stuxuhai</groupId>
<artifactId>jpinyin</artifactId>

@ -16,5 +16,4 @@ public interface PlatformClearService {
void generateAliPaySettleLogs();
void doVerifyHFSettleLog(JSONObject param);
}

@ -35,14 +35,9 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
}*/
List<JSONObject> listChannel = new ArrayList<>();
listChannel.add(putParam(params,"Wechat"));
listChannel.add(putParam(params,"Bestpay"));
listChannel.add(putParam(params,"Alipay"));
listChannel.add(putParam(params,"AlipayOnline"));
listChannel.add(putParam(params,"jd"));
listChannel.add(putParam(params,"hf"));
listChannel.add(putParam(params,"Rpay"));
listChannel.add(putParam(params,"Yeepay"));
listChannel.add(putParam(params,"LakalaPay"));
listChannel.add(putParam(params,"rpaypmt_card"));
listChannel.add(putParam(params,"rpaypmt_dd"));
return listChannel;
@ -55,7 +50,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
}
List<JSONObject> list = new ArrayList<>();
Map<Date,JSONObject> analysisMap = new TreeMap<>();
String[] channels = {"Wechat","Bestpay","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay","LakalaPay","rpaypmt_card","rpaypmt_dd"};
String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd"};
for (String channel:channels){
analysisChannelCustomers(params, analysisMap, channel);
}

@ -92,12 +92,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
JSONObject result = new JSONObject();
List<String> channels = new ArrayList<>();
if (params.get("channel") == null) {
channels.add("Bestpay");
channels.add("Yeepay");
channels.add("Rpay");
channels.add("hf");
channels.add("jd");
channels.add("LakalaPay");
channels.add("rpaypmt_card");
channels.add("rpaypmt_dd");
params.put("channels", channels);

@ -566,32 +566,6 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
}
}
}
/* @Override
public JSONObject getPlatformAmount(JSONObject params) {
JSONObject resp = new JSONObject();
params.put("channel","Bestpay");
resp.put("bestPayAmount",transactionAnalysisMapper.getPlatformAmount(params).getBigDecimal("amount"));
resp.put("bestPay_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
params.put("channel","Wechat");
resp.put("wechatAmount",transactionAnalysisMapper.getPlatformAmount(params).getBigDecimal("amount"));
resp.put("wechat_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
params.put("channel","Alipay");
resp.put("alipayAmount",transactionAnalysisMapper.getPlatformAmount(params).getBigDecimal("amount"));
resp.put("alipay_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
params.put("channel","jd");
resp.put("jdAmount",transactionAnalysisMapper.getPlatformAmount(params).getBigDecimal("amount"));
resp.put("jd_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
params.put("channel","AlipayOnline");
resp.put("aliOnlineAmount",transactionAnalysisMapper.getPlatformAmount(params).getBigDecimal("amount"));
resp.put("aliOnline_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
return resp;
}*/
@Override
public JSONObject getPlatformAmount(JSONObject params) {
String jsonStr = stringRedisTemplate.boundValueOps("org_ChannelAnalysis" + params.getString("org_id")+params.getString("begin")).get();
@ -614,7 +588,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
}
}
private JSONObject getTodayChannelCount(JSONObject params){
String[] channels = new String[]{"Bestpay", "Wechat", "Alipay", "jd", "AlipayOnline", "hf", "Rpay", "Yeepay", "LakalaPay", "rpaypmt_card", "rpaypmt_dd"};
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd"};
JSONObject resp = new JSONObject();
for(String channel:channels) {
params.put("channel", channel);

@ -293,16 +293,6 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
}
List<JSONObject> hfSettle = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "hf");
if (hfSettle != null && hfSettle.size() > 0) {
for (JSONObject logs : hfSettle) {
dayInfo.put("hfSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));
dayInfo.put("platformGetSettleFee", dayInfo.getBigDecimal("hfSettleFee_" + logs.getString("merchants")));
}
} else {
dayInfo.put("platformGetSettleFee", BigDecimal.ZERO);
}
List<JSONObject> alipaySettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "Alipay");
for (JSONObject logs : alipaySettleLogs) {
dayInfo.put("aliSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));

@ -11,10 +11,8 @@ import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
@ -23,12 +21,11 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
/**
* Created by yishuqian on 20/02/2017.
*/
@ -63,7 +60,6 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
client.put("transaction_time", DateFormatUtils.format(earlistOrder.getDate("transaction_time"), "yyyy-MM-dd"));
}
JSONObject res = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), data, "Wechat");
JSONObject best_pay = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), data, "Bestpay");
JSONObject ali_pay = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), data, "Alipay");
JSONObject rate_value = new JSONObject();
if (res != null) {
@ -72,9 +68,6 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
client.put("clean_days", res.getIntValue("clean_days"));
}
}
if (best_pay != null) {
rate_value.put("best_rate_value", best_pay.getBigDecimal("rate_value").setScale(1, BigDecimal.ROUND_DOWN));
}
if (ali_pay != null) {
rate_value.put("ali_rate_value", ali_pay.getBigDecimal("rate_value").setScale(1, BigDecimal.ROUND_DOWN));
}

@ -12,40 +12,23 @@ import au.com.royalpay.payment.manage.mappers.log.PlatformSettlementMapper;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMethod;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import cn.yixblog.platform.http.HttpRequestGenerator;
import java.util.*;
@Service
public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
@ -104,7 +87,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
doVerifyAlipayOnlineSettleLog(sdfClear.parse(end_date));
} catch (Exception e) {
logger.error("PlatformClearAnalysisServiceImpl.verifySettleLogByDate ==> 校验" + end_date + "支付宝Online到账失败", e);
throw new ChannelNetworkException("校验失败:",e);
throw new ChannelNetworkException("校验失败:", e);
}
}
if (StringUtils.equals("Wechat", channel)) {
@ -276,9 +259,9 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
JSONObject alipaySettleLog = new JSONObject();
JSONArray payments = aliSettleLog.getJSONArray("payments");
BigDecimal credit = new BigDecimal(0.00);
BigDecimal creditFee = new BigDecimal(0.00);
BigDecimal creditSettle = new BigDecimal(0.00);
BigDecimal credit = BigDecimal.ZERO;
BigDecimal creditFee = BigDecimal.ZERO;
BigDecimal creditSettle = BigDecimal.ZERO;
if (payments != null) {
for (int i = 0; i < payments.size(); i++) {
JSONObject json = payments.getJSONObject(i);
@ -297,21 +280,19 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
JSONArray refunds = aliSettleLog.getJSONArray("refunds");
logger.info("alipay的refunds清算总信息" + refunds.toJSONString());
BigDecimal debit = new BigDecimal(0.00);
BigDecimal debitFee = new BigDecimal(0.00);
BigDecimal debitSettle = new BigDecimal(0.00);
if (refunds != null) {
for (int i = 0; i < refunds.size(); i++) {
JSONObject json = refunds.getJSONObject(i);
BigDecimal transactionAmount = json.getBigDecimal("transaction_amount");
BigDecimal chargeFee = json.getBigDecimal("charge_fee");
debit = debit.add(transactionAmount);
debitFee = debitFee.add(chargeFee);
if (json.containsKey("settle_amount")) {
debitSettle = debitSettle.add(json.getBigDecimal("settle_amount"));
} else {
debitSettle = debitSettle.add(transactionAmount.subtract(chargeFee));
}
BigDecimal debit = BigDecimal.ZERO;
BigDecimal debitFee = BigDecimal.ZERO;
BigDecimal debitSettle = BigDecimal.ZERO;
for (int i = 0; i < refunds.size(); i++) {
JSONObject json = refunds.getJSONObject(i);
BigDecimal transactionAmount = json.getBigDecimal("transaction_amount");
BigDecimal chargeFee = json.getBigDecimal("charge_fee");
debit = debit.add(transactionAmount);
debitFee = debitFee.add(chargeFee);
if (json.containsKey("settle_amount")) {
debitSettle = debitSettle.add(json.getBigDecimal("settle_amount"));
} else {
debitSettle = debitSettle.add(transactionAmount.subtract(chargeFee));
}
}
alipaySettleLog.put("debit", debit);
@ -370,7 +351,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
sysLogs.put("sys_net_fee", creditLogs.getBigDecimal("aud_amount").subtract(debitLogs.getBigDecimal("aud_amount")));
if (StringUtils.equals("Alipay", channel)) {
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, new BigDecimal(0.006)));
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, BigDecimal.valueOf(0.006)));
} else if (StringUtils.equals("AlipayOnline", channel)) {
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, alipay_online_rate));
} else {
@ -385,121 +366,4 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
}
return null;
}
@Override
public void doVerifyHFSettleLog(JSONObject param) {
String end = param.getString("end");
String start = param.getString("start");
JSONObject hfSettle = handleHFSettleFile(param.getString("fileId"));
if (hfSettle == null) {
return;
}
JSONObject record = new JSONObject();
record.put("settle_date", end);
record.put("start_date", start);
record.put("end_date", end);
record.put("channel", "hf");
record.put("last_update_date", new Date());
JSONObject syscleardata = getHFSystemClearingAmount(start, end);
if (syscleardata != null && syscleardata.size() > 0) {
record.put("sys_pay_fee", syscleardata.getBigDecimal("sys_pay_fee"));
record.put("sys_refund_fee", syscleardata.getBigDecimal("sys_refund_fee"));
record.put("sys_net_fee", syscleardata.getBigDecimal("sys_net_fee"));
record.put("sys_surcharge", syscleardata.getBigDecimal("sys_surcharge"));
record.put("sys_settlement_fee", syscleardata.getBigDecimal("sys_settle_fee"));
}
record.put("pay_fee", BigDecimal.ZERO);
record.put("refund_fee", BigDecimal.ZERO);
record.put("net_fee", hfSettle.getBigDecimal("orderAmount"));
record.put("settlement_fee", hfSettle.getBigDecimal("clearingAmount"));
record.put("surcharge", hfSettle.getBigDecimal("surcharge"));
record.put("unsettle_fee", BigDecimal.ZERO);
List<JSONObject> check = null;
try {
check = platformSettlementMapper.findBySettleDate(DateUtils.parseDate(end, "yyyy-MM-dd"), "hf");
} catch (ParseException e) {
e.printStackTrace();
}
if (CollectionUtils.isNotEmpty(check)) {
record.put("log_id", check.get(0).getString("log_id"));
platformSettlementMapper.update(record);
} else {
platformSettlementMapper.save(record);
}
logger.info("汇付清算记录查询完成");
}
private JSONObject handleHFSettleFile(String fileId) {
try {
HttpRequestGenerator gen = new HttpRequestGenerator(attachmentClient.getFileUrl(fileId), RequestMethod.GET);
HSSFWorkbook workbook = new HSSFWorkbook(gen.execute().getResponseContentStream());
HSSFSheet sheet = workbook.getSheetAt(0);
Iterator<Row> rowIterator = sheet.rowIterator();
Row row = null;
Cell cell = null;
// 跳过第一行
rowIterator.next();
JSONObject result = new JSONObject();
BigDecimal orderAmount = BigDecimal.ZERO;
BigDecimal surcharge = BigDecimal.ZERO;
BigDecimal clearingAmount = BigDecimal.ZERO;
while (rowIterator.hasNext()) {
row = rowIterator.next();
cell = row.getCell(0);
if (cell != null) {
continue;
}
cell = row.getCell(15);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
if (cell != null) {
String orderAmountStr = cell.getStringCellValue().trim();
if (StringUtils.isNotEmpty(orderAmountStr)) {
result.put("orderAmount", new BigDecimal(orderAmountStr));
}
}
cell = row.getCell(16);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
if (cell != null) {
String surchargeStr = cell.getStringCellValue().trim();
if (StringUtils.isNotEmpty(surchargeStr)) {
result.put("surcharge", new BigDecimal(surchargeStr));
}
}
cell = row.getCell(17);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
if (cell != null) {
String clearingAmounStr = cell.getStringCellValue().trim();
if (StringUtils.isNotEmpty(clearingAmounStr)) {
result.put("clearingAmount", new BigDecimal(clearingAmounStr));
}
}
}
return result;
} catch (Exception e) {
logger.debug("处理汇付清算文件出错", e);
}
return null;
}
private JSONObject getHFSystemClearingAmount(String start, String end) {
JSONObject result = new JSONObject();
try {
JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog(start, end, "hf", "Credit", new BigDecimal(0.008));
result.put("sys_pay_fee", creditLogs.getBigDecimal("aud_amount"));
JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog(start, end, "hf", "Debit", new BigDecimal(0.008));
result.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start, end, "hf", new BigDecimal(0.008)));
result.put("sys_refund_fee", debitLogs.getBigDecimal("aud_amount"));
result.put("sys_net_fee", creditLogs.getBigDecimal("aud_amount").subtract(debitLogs.getBigDecimal("aud_amount")));
result.put("sys_settle_fee", result.getBigDecimal("sys_net_fee").subtract(result.getBigDecimal("sys_surcharge")));
return result;
} catch (Exception ignore) {
ignore.printStackTrace();
}
return null;
}
}

@ -17,7 +17,7 @@ import java.util.List;
@Service
public class PlatformRevenueImpl implements PlatformRevenueService {
private org.slf4j.Logger logger = LoggerFactory.getLogger(getClass());
String[] channelArr = { "Wechat", "Alipay", "Bestpay" };
String[] channelArr = { "Wechat", "Alipay" };
@Resource
private ClearingLogMapper clearingLogMapper;

@ -4,19 +4,11 @@ import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.text.ParseException;
@RestController
@RequestMapping(value = "/platform/analysis")
@ -49,8 +41,4 @@ public class PlatformClearAController {
platformClearService.generateSettleLogs();
}
@ManagerMapping(value = "/generate/hf/settle", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.DEVELOPER})
public void generatehfSettleLogs(@RequestBody JSONObject param) {
platformClearService.doVerifyHFSettleLog(param);
}
}

@ -1665,7 +1665,6 @@ public class RetailAppServiceImp implements RetailAppService {
channels[0] = getChannel(clientId, now, "Wechat");
channels[1] = getChannel(clientId, now, "Alipay");
channels[2] = getChannel(clientId, now, "Bestpay");
res.put("channels", channels);
return res;
@ -1782,7 +1781,6 @@ public class RetailAppServiceImp implements RetailAppService {
List<JSONObject> newActs = new ArrayList<>();
for (JSONObject act : JSON.parseArray(acts.toJSONString(), JSONObject.class)) {
if (act.getString("page_desc") != null && !act.getString("page_desc").equals("0")) {
logger.info("app get banner{}-{}", device.getIntValue("client_id"), act.toJSONString());
if (StringUtils.equalsIgnoreCase(act.getString("page_keywords"), "RYCBSM")) {
if (geekShowActVersion(device.getString("version"))) {
newActs.add(act);
@ -2789,22 +2787,6 @@ public class RetailAppServiceImp implements RetailAppService {
throw new BadRequestException("Merchant Rate Not Configure,Please Contact Customer Service");
}
try {
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
}
} catch (Exception ignored) {
JSONObject rate = sysConfigRate.getJSONObject("t" + weChatRate.getString("clean_days"));
client.put("bestpay_rate", rate.getBigDecimal("Bestpay").setScale(2, RoundingMode.DOWN));
client.put("jd_rate", rate.getBigDecimal("JDpay").setScale(2, RoundingMode.DOWN));
}
JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id"));
if (bankAccount == null || bankAccount.size() <= 0) {
throw new BadRequestException("The Partner's Account is not config!");
@ -3099,14 +3081,6 @@ public class RetailAppServiceImp implements RetailAppService {
if (alipay.containsKey("channel")) {
channels.add(alipay);
}
JSONObject bestpay = getChannel(clientId, now, "Bestpay");
if (bestpay.containsKey("channel")) {
channels.add(bestpay);
}
JSONObject jd = getChannel(clientId, now, "jd");
if (jd.containsKey("channel")) {
channels.add(jd);
}
JSONObject alipayOnline = getChannel(clientId, now, "AlipayOnline");
if (alipayOnline.containsKey("channel")) {
channels.add(alipayOnline);
@ -3121,7 +3095,7 @@ public class RetailAppServiceImp implements RetailAppService {
}
res.put("channels", channels);
if (res.containsKey("rate_value")) {
BigDecimal minRate = res.getBigDecimal("rate_value").add(new BigDecimal(0.01)).setScale(2, RoundingMode.DOWN);
BigDecimal minRate = res.getBigDecimal("rate_value").add(BigDecimal.valueOf(0.01)).setScale(2, RoundingMode.DOWN);
res.put("customer_rage_title", (minRate.toPlainString() + "~" + res.getString("max_customer_surcharge_rate")));
}
return res;

@ -18,11 +18,11 @@ import au.com.royalpay.payment.tools.encryptalgorithm.SignUtils;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.mappers.CommonIncrementalChannelMapper;
import org.apache.commons.codec.binary.Base64;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.net.util.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@ -338,8 +338,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
apply.put("alipay_rate",rate.getString("Alipay"));
apply.put("alipay_online_rate",rate.getString("AlipayOnline"));
apply.put("cbbank_rate",rate.getString("CB_Bankpay"));
apply.put("bestpay_rate",rate.getString("Bestpay"));
apply.put("jd_rate",rate.getString("JDpay"));
JSONObject bankInfo = getBankInfo(apply.getString("bsb_no"));
apply.put("bank", bankInfo.getString("bank"));
@ -506,8 +504,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
apply.put("alipay_rate",rate.getString("Alipay"));
apply.put("alipay_online_rate",rate.getString("AlipayOnline"));
apply.put("cbbank_rate",rate.getString("CB_Bankpay"));
apply.put("bestpay_rate",rate.getString("Bestpay"));
apply.put("jd_rate",rate.getString("JDpay"));
JSONObject bankInfo = getBankInfo(apply.getString("bsb_no"));
apply.put("bank", bankInfo.getString("bank"));
@ -759,8 +755,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
configNewClientRate(sysRate, clientId, "Wechat", "Wechat");
configNewClientRate(sysRate, clientId, "Alipay", "Alipay");
configNewClientRate(sysRate, clientId, "AlipayOnline", "AlipayOnline");
configNewClientRate(sysRate, clientId, "Bestpay", "Bestpay");
configNewClientRate(sysRate, clientId, "jd", "JDpay");
configNewClientRate(sysRate, clientId, "CB_BankPay", "CB_Bankpay");
Runnable task2 = () -> {
try {

@ -42,9 +42,7 @@ public class ContentController {
model.addAttribute("wechat_rate", contractInfo.getString("wechat_rate"));
model.addAttribute("cbbank_rate", contractInfo.getString("cbbank_rate"));
model.addAttribute("alipay_online_rate", contractInfo.getString("alipay_online_rate"));
model.addAttribute("bestpay_rate", contractInfo.getString("bestpay_rate"));
model.addAttribute("alipay_rate", contractInfo.getString("alipay_rate"));
model.addAttribute("jd_rate", contractInfo.getString("jd_rate"));
return "contract_for_compliance";
}

@ -1,61 +0,0 @@
package au.com.royalpay.payment.manage.apps.events.listeners;
import au.com.royalpay.payment.core.events.AfterPaymentFinishEvent;
import au.com.royalpay.payment.manage.customers.core.CustomerPaymentInfoService;
import au.com.royalpay.payment.manage.mappers.system.SysCustomerPaymentInfoMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* Created by wangning on 17/01/2018.
*/
@Service
public class AfterPaymentFinishListener implements ApplicationListener<AfterPaymentFinishEvent> {
@Resource
private SysCustomerPaymentInfoMapper sysCustomerPaymentInfoMapper;
@Resource
private CustomerPaymentInfoService customerPaymentInfoService;
@Resource
private ClientManager clientManager;
@Override
public void onApplicationEvent(AfterPaymentFinishEvent event) {
JSONObject order = event.getFinishedEvent().getOrder();
if(!"hf".equals(order.getString("channel"))&&!"Yeepay".equals(order.getString("channel"))){
return;
}
switch (order.getString("channel")){
case "hf":
if(StringUtils.isEmpty(order.getString("ext_params"))){
return;
}
JSONObject extParam = JSONObject.parseObject(order.getString("ext_params"));
JSONObject orderInfo = sysCustomerPaymentInfoMapper.selectPaymentInfo(order.getString("customer_id"));
if (orderInfo != null) {
orderInfo.put("idcard_name", extParam.getString("payer_name"));
orderInfo.put("idcard_no", extParam.getString("payer_identity_card"));
orderInfo.put("bankcard", extParam.getString("card_number"));
orderInfo.put("bank", extParam.getString("bankId"));
sysCustomerPaymentInfoMapper.update(orderInfo);
}else {
JSONObject lastOrderInfo = new JSONObject();
lastOrderInfo.put("wechat_openid", order.getString("customer_id"));
lastOrderInfo.put("idcard_name", extParam.getString("payer_name"));
lastOrderInfo.put("idcard_no", extParam.getString("payer_identity_card"));
lastOrderInfo.put("bankcard", extParam.getString("card_number"));
lastOrderInfo.put("bank", extParam.getString("bankId"));
customerPaymentInfoService.save(lastOrderInfo);
}
clientManager.sendHfEmailNotice(order);
return;
case "Yeepay":
clientManager.sendGatewayEmailNotice(order);
return;
}
}
}

@ -81,7 +81,7 @@ public class BDPrizeServiceImpl implements BDPrizeService {
private static BigDecimal percent = new BigDecimal(100);
private static String[] channels = new String[]{"Wechat", "Alipay", "Bestpay", "jd", "AlipayOnline","hf", "Rpay","Yeepay","LakalaPay", "rpaypmt_card", "rpaypmt_dd"};
private static String[] channels = new String[]{"Wechat", "Alipay","AlipayOnline", "Rpay","rpaypmt_card", "rpaypmt_dd"};
private static Logger logger = LoggerFactory.getLogger(BDPrizeServiceImpl.class);
@Override

@ -62,10 +62,6 @@ public class AgentCommissionAnalysis {
orgCharge = grossAmount.multiply(org.getBigDecimal("wechat_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP));
orgNetCharge = orgCharge.subtract(grossAmount.multiply(parentOrg.getBigDecimal("wechat_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP)));
break;
case "jd":
orgCharge = grossAmount.multiply(org.getBigDecimal("jd_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP));
orgNetCharge = orgCharge.subtract(grossAmount.multiply(parentOrg.getBigDecimal("jd_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP)));
break;
case "alipayonline":
orgCharge = grossAmount.multiply(org.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP));
orgNetCharge = orgCharge.subtract(grossAmount.multiply(parentOrg.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP)));
@ -143,4 +139,4 @@ public class AgentCommissionAnalysis {
}
return list;
}
}
}

@ -222,9 +222,6 @@ public class CityPartnerCommissionAnalysis {
case "wechat":
thirdPartyPaymentCharge = total.multiply(wechatChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;
case "jd":
thirdPartyPaymentCharge = total.multiply(jdChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;
case "alipayonline":
thirdPartyPaymentCharge = total.multiply(alipayonlineChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;

@ -226,9 +226,6 @@ public class CityPartnerSeniorCommissionAnalysis {
case "wechat":
thirdPartyPaymentCharge = total.multiply(wechatChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;
case "jd":
thirdPartyPaymentCharge = total.multiply(jdChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;
case "alipayonline":
thirdPartyPaymentCharge = total.multiply(alipayonlineChargeRate).divide(CommonConsts.HUNDRED, 2, RoundingMode.HALF_UP);
break;

@ -284,8 +284,6 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
HashMap<String, String> channelMap = new HashMap<>();
channelMap.put("Alipay", "Alipay");
channelMap.put("Wechat", "Wechat");
channelMap.put("Bestpay", "Bestpay");
channelMap.put("jd", "jd");
channelMap.put("AlipayOnline", "AlipayOnline");
Set<Integer> orgIds = new HashSet<>();
List<JSONObject> transactionAnalysis = transactionMapper.listTransactionsForCityPartnerCommission(year, month);
@ -430,20 +428,19 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal transaction_fee = BigDecimal.ZERO;
JSONObject json = new JSONObject();
String channel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cb_bankpay";
if (orgInfo.get("cb_bankpay_rate_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + "cbbankpay" + "成本手续费未设置");
}
} else {
if (orgInfo.get(channel.toLowerCase() + "_rate_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
}
if (orgInfo.get(channel.toLowerCase() + "_rate_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
}
for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
//增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO);
}
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge")
.subtract(params.getBigDecimal("surcharge_cashback"))
.subtract(params.getBigDecimal("transaction_fee"));
//增加货币判断
int i = currencyScale(params.getString("clearing_currency"));
total = total.add(tmpClearingAmount);
@ -482,14 +479,16 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal transaction_fee = BigDecimal.ZERO;
JSONObject json = new JSONObject();
String channel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cb_bankpay";
}
for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
//增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO);
}
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge")
.subtract(params.getBigDecimal("surcharge_cashback"))
.subtract(params.getBigDecimal("transaction_fee"));
//增加货币判断
int i = currencyScale(params.getString("clearing_currency"));
BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP);
@ -542,10 +541,6 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
JSONObject json = new JSONObject();
String channel = oneChannel.getKey();
String rateChannel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cb_bankpay";
rateChannel = "CB_BankPay";
}
JSONObject clientRate = null;
try {
clientRate = merchantInfoProvider.clientCurrentRate(clientId, oneChannel.getValue().get(0).getDate("transaction_time"),
@ -557,6 +552,10 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
//增加货币判断
//增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO);
}
int i = currencyScale(params.getString("clearing_currency"));
if (total.compareTo(BigDecimal.ZERO) == 0) {
datefrom = params.getDate("transaction_time");
@ -587,7 +586,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("client_id", clientId);
if (clientRate != null) {
json.put("client_rate", clientRate.getBigDecimal("rate_value"));
}else {
} else {
json.put("client_rate", oneChannel.getValue().get(0).getBigDecimal("surcharge_rate").multiply(CommonConsts.HUNDRED));
}
json.put("gross_amount", total);
@ -636,9 +635,6 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
case "Wechat":
thirdPartyPaymentCharge = total.multiply(chargeRate.getBigDecimal("wechatChargeRate").divide(CommonConsts.HUNDRED, 4, BigDecimal.ROUND_DOWN)).setScale(2, RoundingMode.HALF_UP);
break;
case "jd":
thirdPartyPaymentCharge = total.multiply(chargeRate.getBigDecimal("jdChargeRate").divide(CommonConsts.HUNDRED, 4, BigDecimal.ROUND_DOWN)).setScale(2, RoundingMode.HALF_UP);
break;
case "AlipayOnline":
thirdPartyPaymentCharge = total.multiply(chargeRate.getBigDecimal("alipayonlineChargeRate").divide(CommonConsts.HUNDRED, 4, BigDecimal.ROUND_DOWN)).setScale(2, RoundingMode.HALF_UP);
break;
@ -707,8 +703,6 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
HashMap<String, String> channelMap = new HashMap<>();
channelMap.put("Alipay", "Alipay");
channelMap.put("Wechat", "Wechat");
channelMap.put("Bestpay", "Bestpay");
channelMap.put("jd", "jd");
channelMap.put("AlipayOnline", "AlipayOnline");
List<JSONObject> transactionAnalysis = transactionMapper.listTransactionsForAgentCommission(year, month, org.getIntValue("parent_org_id"));
Map<String, AgentCommissionAnalysis> results = new HashMap<>();
@ -1229,7 +1223,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("net_charge") == null ? BigDecimal.ZERO.toPlainString() : log.getBigDecimal("net_charge").toPlainString());
if (log.getBigDecimal("org_charge").compareTo(BigDecimal.ZERO) == 1) {
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("org_charge").toPlainString());
}else {
} else {
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(BigDecimal.ZERO.toPlainString());
}
row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("share_charge") == null ? BigDecimal.ZERO.toPlainString() : log.getBigDecimal("share_charge").toPlainString());

@ -1,9 +0,0 @@
package au.com.royalpay.payment.manage.dev.core;
import com.alibaba.fastjson.JSONObject;
public interface HfClearAmountService {
JSONObject hfjsonobject(String dateto,String datefrom);
}

@ -1,11 +0,0 @@
package au.com.royalpay.payment.manage.dev.core;
import com.alibaba.fastjson.JSONObject;
public interface HfUpdateService {
String updateStatus();
String rpayUpdate();
}

@ -14,8 +14,8 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject;
import com.yeepay.shade.org.apache.commons.lang3.StringUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;

@ -1,57 +0,0 @@
package au.com.royalpay.payment.manage.dev.core.impl;
import au.com.royalpay.payment.manage.dev.core.HfClearAmountService;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
@Service
public class HfClearAmountServiceImpl implements HfClearAmountService {
@Resource
private TransactionMapper transactionMapper;
@Override
public JSONObject hfjsonobject(String dateto, String datefrom) {
JSONObject params = new JSONObject();
try {
params.put("datefrom", DateUtils.addMinutes(DateUtils.parseDate(datefrom, "yyyy-MM-dd"), PlatformEnvironment.getEnv().getTimeZoneOffsetMinutes()));
params.put("dateto", DateUtils.addMinutes(DateUtils.parseDate(dateto, "yyyy-MM-dd"), PlatformEnvironment.getEnv().getTimeZoneOffsetMinutes()));
} catch (ParseException e) {
throw new ServerErrorException("时间转换异常");
}
List<JSONObject> hfClearAmountResult = transactionMapper.getHfClearAmount(params);
JSONObject result = new JSONObject();
result.put("payment_amount", BigDecimal.ZERO);
result.put("refund_amount", BigDecimal.ZERO);
result.put("gross_amount", BigDecimal.ZERO);
result.put("charge_amount", BigDecimal.ZERO);
result.put("clear_amount", BigDecimal.ZERO);
result.put("payment_surcharge", BigDecimal.ZERO);
result.put("refund_surcharge", BigDecimal.ZERO);
if (hfClearAmountResult.isEmpty()) {
return result;
}
hfClearAmountResult.forEach(dbResult -> {
if ("Credit".equals(dbResult.getString("transaction_type"))) {
result.put("payment_amount", dbResult.getBigDecimal("clear_amount"));
result.put("payment_surcharge", dbResult.getBigDecimal("charge_amount"));
}
if ("Debit".equals(dbResult.getString("transaction_type"))) {
result.put("refund_amount", dbResult.getBigDecimal("clear_amount"));
result.put("refund_surcharge", dbResult.getBigDecimal("charge_amount"));
}
});
result.put("gross_amount", result.getBigDecimal("payment_amount").subtract(result.getBigDecimal("refund_amount")));
result.put("charge_amount", result.getBigDecimal("payment_surcharge").subtract(result.getBigDecimal("refund_surcharge")));
result.put("clear_amount", result.getBigDecimal("gross_amount").subtract(result.getBigDecimal("charge_amount")));
return result;
}
}

@ -1,66 +0,0 @@
package au.com.royalpay.payment.manage.dev.core.impl;
import au.com.royalpay.payment.channels.rpay.runtime.RpayApi;
import au.com.royalpay.payment.manage.dev.core.HfUpdateService;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.List;
import javax.annotation.Resource;
@Service
public class HfUpdateImpl implements HfUpdateService {
@Resource
private ClientMapper clientMapper;
@Resource
private MpWechatApiProvider mpWechatApiProvider;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private RpayApi rpayApi;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override
public String updateStatus() {
List<JSONObject> clientIds = clientMapper.findByhfPayUrlNotNull();
clientIds.forEach(dbResult -> {
String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + dbResult.getString("client_moniker") + "/jump/pc");
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
String url = api.registerShortUrl(longUrl);
dbResult.put("hf_pay_url", url);
JSONObject config = new JSONObject();
config.put("client_id",dbResult.getString("client_id"));
config.put("hf_pay_url", url);
clientConfigMapper.update(config);
clientMapper.update(dbResult);
});
return "ok";
}
@Override
public String rpayUpdate() {
List<JSONObject> clientIds = clientMapper.findByrpayNotNull();
StringBuffer sb = new StringBuffer();
clientIds.forEach(dbResult -> {
try {
// rpayApi.modifySurchargeConfig(dbResult);
} catch (Exception e) {
sb.append("【" + dbResult.getString("client_moniker") + "】、");
}
});
logger.info("test for update rpay clearing date,fail + " + sb.toString());
return "ok";
}
}

@ -1,70 +0,0 @@
package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import com.alibaba.fastjson.JSONObject;
import org.joda.time.DateTime;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@RestController
@RequestMapping(value = "/dev/pine")
public class TestAPPController {
@Resource
private DashboardService dashboardService;
@GetMapping("/trade_log")
public List<JSONObject> getTradeLogs(HttpServletResponse response) {
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Credentials", "true");
response.addHeader("Access-Control-Allow-Headers", "Authorization,Origin, X-Requested-With, Content-Type, Accept");
response.addHeader("Access-Control-Allow-Methods", "*");
List<JSONObject> logs = new ArrayList<>();
for (int i = 0; i < 5; i++) {
JSONObject json = new JSONObject();
json.put("channel", "Alipay");
json.put("order_id", "PINE-r67783ej392u38ry982");
json.put("status", "1");
json.put("amount","9.99");
logs.add(json);
}
for (int i = 0; i < 5; i++) {
JSONObject json = new JSONObject();
json.put("channel", "Wechat");
json.put("order_id", "PINE-r67783ej392u38ry982");
json.put("status", "2");
json.put("amount","9.99");
logs.add(json);
}
for (int i = 0; i < 5; i++) {
JSONObject json = new JSONObject();
json.put("channel", "Bestpay");
json.put("order_id", "PINE-r67783ej392u38ry982");
json.put("status", "3");
json.put("amount","9.99");
logs.add(json);
}
return logs;
}
@RequestMapping(value = "/customer",method = RequestMethod.GET)
public void generateCustomersAndOrdersStatistics(){
DateTime dt17 = new DateTime(2018,5,17,11,11);
DateTime dt18 = new DateTime(2018,5,18,11,11);
DateTime dt19 = new DateTime(2018,5,19,11,11);
dashboardService.generateCustomersAndOrdersStatistics(dt17.toDate());
dashboardService.generateCustomersAndOrdersStatistics(dt18.toDate());
dashboardService.generateCustomersAndOrdersStatistics(dt19.toDate());
}
}

@ -2,11 +2,8 @@ package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
import au.com.royalpay.payment.channels.bestpay.runtime.BestPayClient;
import au.com.royalpay.payment.channels.jd.runtime.JDClient;
import au.com.royalpay.payment.channels.rpay.runtime.RpayClient;
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.OrderNotExistsException;
@ -19,8 +16,6 @@ import au.com.royalpay.payment.manage.dev.bean.AliExcel;
import au.com.royalpay.payment.manage.dev.bean.Message;
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.HfClearAmountService;
import au.com.royalpay.payment.manage.dev.core.HfUpdateService;
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
@ -37,7 +32,6 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.defines.TradeType;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.http.HttpUtils;
@ -112,14 +106,8 @@ public class TestController {
@Resource
private AlipayClient alipayClient;
@Resource
private BestPayClient bestPayClient;
@Resource
private JDClient jdClient;
@Resource
private RpayClient rpayClient;
@Resource
private YeePayClient yeepayClient;
@Resource
private TradeLogService tradeLogService;
@Resource
private RetailAppService retailAppService;
@ -128,14 +116,8 @@ public class TestController {
@Resource
private AliforexcelService aliforexcelService;
@Resource
private HfClearAmountService hfClearAmountService;
@Resource
private HfUpdateService hfUpdateService;
@Resource
private ClientManager clientManager;
@Resource
private SysConfigManager sysConfigManager;
@Resource
private MpWechatApiProvider mpWechatApiProvider;
@Resource
private SysClientLegalPersonMapper sysClientLegalPersonMapper;
@ -234,17 +216,6 @@ public class TestController {
if (alipayRate != null) {
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
@ -334,16 +305,6 @@ public class TestController {
xmlStr = XmlFormatUtils.formatXml(elem);
res.put("xml", xmlStr);
break;
case "Bestpay":
JSONObject status = bestPayClient.queryOrderStatus(order.getString("order_id"), order.getDate("create_time"));
String json = JSON.toJSONString(status, SerializerFeature.PrettyFormat);
res.put("xml", json);
break;
case "jd":
elem = jdClient.queryTransaction(orderId, orderId, JDClient.TRADE_TYPE_PAY);
xmlStr = XmlFormatUtils.formatXml(elem);
res.put("xml", xmlStr);
break;
case "AlipayOnline":
elem = alipayClient.checkOnlineOrderStatusByOrderId(orderId, AlipayEnvironment.getEnv().getAlipayOnlineMerchant().getPid());
xmlStr = XmlFormatUtils.formatXml(elem);
@ -354,9 +315,6 @@ public class TestController {
String rpayjson = JSON.toJSONString(orderInfo, SerializerFeature.PrettyFormat);
res.put("xml", rpayjson);
break;
case "Yeepay":
res.put("xml", yeepayClient.queryOrderStd(orderId).toString());
break;
default:
throw new BadRequestException("Not Support channel:" + channel);
}
@ -386,24 +344,11 @@ public class TestController {
String xmlStr = XmlFormatUtils.formatXml(elem);
res.put("xml", xmlStr);
break;
case "Bestpay":
JSONObject status = bestPayClient.queryRefundStatus(order.getString("order_id"), refundId, refundOrder.getDate("create_time"));
String json = JSON.toJSONString(status, SerializerFeature.PrettyFormat);
res.put("xml", json);
break;
case "jd":
elem = jdClient.queryTransaction(refundId, order.getString("order_id"), JDClient.TRADE_TYPE_REFUND);
xmlStr = XmlFormatUtils.formatXml(elem);
res.put("xml", xmlStr);
break;
case "AlipayOnline":
elem = alipayClient.onlineRefund(refundOrder, AlipayEnvironment.getEnv().getAlipayOnlineMerchant().getPid(), type == TradeType.GATEWAY_H5);
xmlStr = XmlFormatUtils.formatXml(elem);
res.put("xml", xmlStr);
break;
case "Yeepay":
res.put("xml", yeepayClient.queryRefundStd(refundOrder.getString("out_refund_id")).toString());
break;
default:
throw new BadRequestException("Not Support channel:" + channel);
}
@ -444,33 +389,11 @@ public class TestController {
wechatMessageService.sendMessageByOpenId(sendWechatMessage);
}
/* @ManagerMapping(value = "/orgusertest", method = RequestMethod.POST, role = {ManagerRole.ADMIN,ManagerRole.DEVELOPER})
public JSONObject orgusertest(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody @Valid ClientTestRegisterInfo registery,
Errors errors) {
HttpUtils.handleValidErrors(errors);
return newpartnerService.registerClient(null, registery, manager);
}*/
@ManagerMapping(value = "/aliforexcel", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
public void aliforexcel(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse, AliExcel query) throws Exception {
aliforexcelService.listClients(httpResponse, manager, query);
}
@ManagerMapping(value = "/hfClearAmount", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
public JSONObject hfUpdate(@RequestParam String datefrom, @RequestParam String dateto) {
return hfClearAmountService.hfjsonobject(dateto, datefrom);
}
@ManagerMapping(value = "/hfUpdate", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
public String hfClearAmount() {
return hfUpdateService.updateStatus();
}
@ManagerMapping(value = "/rpayUpdate", method = RequestMethod.PUT, role = ManagerRole.DEVELOPER)
public String rpayUpdateClearing() {
return hfUpdateService.rpayUpdate();
}
@ManagerMapping(value = "/partner/reset_password", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
public void resetPartnerPassword() {
clientManager.updateAllPartnerPassword("PINE");

@ -128,8 +128,6 @@ public class ClientRegisterInfo {
rate.put("wechat_rate_value", settleConfig.getWechatRate());
rate.put("alipay_rate_value", settleConfig.getAlipayRate());
rate.put("alipayonline_rate_value", settleConfig.getAlipayOnlineRate());
rate.put("bestpay_rate_value", getDefaultRate(defaultRateConfig, String.valueOf(settleConfig.getCleanDays()),"Bestpay"));
rate.put("jd_rate_value", getDefaultRate(defaultRateConfig, String.valueOf(settleConfig.getCleanDays()),"JDpay"));
rate.put("Rpay_rate_value", getDefaultRate(defaultRateConfig, String.valueOf(settleConfig.getCleanDays()),"Rpay"));
rate.put("cb_bankpay_rate_value", getDefaultRate(defaultRateConfig, String.valueOf(settleConfig.getCleanDays()),"CB_Bankpay"));
rate.put("transaction_fee", settleConfig.getTransactionFee());

@ -42,7 +42,7 @@ public class ClientSettleConfig {
@JSONField(name = "alipay_online_rate")
private String alipayOnlineRate;
@JSONField(name = "transaction_fee")
private String transactionFee;
private String transactionFee ="0.00";
@JSONField(name = "active_time")
private String activeTime;
@JSONField(name = "expire_time")

@ -31,7 +31,7 @@ public class ArrivalNoticeController {
@RequestParam("date") String date) throws ParseException {
JSONArray reports = new JSONArray();
Date dt = DateUtils.parseDate(date, new String[]{"yyyyMMdd"});
Date dt = DateUtils.parseDate(date, "yyyyMMdd");
JSONObject reportItem = validationLogMapper.findByDate(dt);
if (reportItem != null) {
JSONObject result = JSON.parseObject(reportItem.getString("result"));
@ -50,11 +50,6 @@ public class ArrivalNoticeController {
}
channelItem.put("analysis", analysis);
}
if (channel.equals("Bestpay") && result.containsKey("bestpay_valid_analysis")) {
List<JSONObject> analysis = new ArrayList<>();
analysis.add(result.getJSONObject("bestpay_valid_analysis"));
reports.getJSONObject(i).put("analysis", analysis);
}
}
}
map.put("reports", reports);

@ -25,7 +25,7 @@ public class ClientRateConfig {
@JSONField(name = "transaction_fee")
@NotNull(message = "error.payment.valid.param_missing")
private Double transactionFee;
private Double transactionFee = 0.00;
@JSONField(name = "active_time")
@NotNull(message = "error.payment.valid.param_missing")

@ -69,9 +69,6 @@ public interface ClientManager {
@Transactional
void updateClientRpayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject rpaySubMerchantInfo);
@Transactional
void updateClientYeepayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject yeepaySubMerchantInfo);
@Transactional
void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo);
@ -434,8 +431,6 @@ public interface ClientManager {
List<JSONObject> listRpaySubMerchantIdApplys(JSONObject manager, String clientMoniker);
List<JSONObject> listYeepaySubMerchantIdApplys(JSONObject manager, String clientMoniker);
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager);
void registerAlipayGms(String clientMoniker, JSONObject manager);
@ -492,12 +487,6 @@ public interface ClientManager {
void subRpayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager);
void subYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager);
void subYeepayMerchantAdd(String clientMoniker, JSONObject merchantInfo, JSONObject manager);
void reSubYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager);
void updateAllPartnerPassword(String clientMoniker);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client);

@ -13,9 +13,6 @@ import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
import au.com.royalpay.payment.channels.yeepay.config.YeePayConfig;
import au.com.royalpay.payment.channels.yeepay.mappers.YeePayClientConfigMapper;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
@ -93,7 +90,6 @@ import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yeepay.yop.sdk.service.kj.model.SubmerchantRegisterResult;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
@ -228,15 +224,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private RpayApi rpayApi;
@Resource
private YeePayClient yeePayClient;
@Resource
private YeePayConfig yeePayConfig;
@Resource
private YeePayClientConfigMapper yeePayClientConfigMapper;
@Resource
private ManagerMapper managerMapper;
@Resource
@ -452,14 +439,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (upayInfo != null) {
client.putAll(upayInfo);
}
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) != null);
client.put("show_all_permission", true);
int role = manager != null ? manager.getIntValue("role") : 0;
if (manager != null) {
if (ManagerRole.OPERATOR.hasRole(role)) {
List<JSONObject> log = logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"),
new PageBounds(Order.formString("create_time.desc")));
client.put("sub_merchant_id_log", log.size() > 0 ? true : false);
client.put("sub_merchant_id_log", log.size() > 0);
}
if (ManagerRole.BD_USER.hasRole(role)) {
int checkBDPermission = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
@ -520,15 +507,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("audit_card_logs", audit_card_logs);
}
//HF支付链接二维码
if (client.getString("hf_pay_url") != null) {
String hfQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("hfQrcodeUrl", QRCodeUtils.qrcodeImageCode(hfQrcodeUrl, 250, true));
}
if (client.getString("yeepay_pay_url") != null) {
String yeepayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/yeepay/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("yeepayQrcodeUrl", QRCodeUtils.qrcodeImageCode(yeepayQrcodeUrl, 250, true));
}
if (client.getString("cb_bankpay_url") != null) {
String cbBankPayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
client.put("cbBankPayQrcodeUrl", QRCodeUtils.qrcodeImageCode(cbBankPayQrcodeUrl, 250, true));
@ -574,6 +552,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
List<JSONObject> children = clientMapper.listChildClients(client.getIntValue("client_id"));
client.put("has_children", !children.isEmpty());
}
assert client != null;
client.putAll(clientConfigService.find(clientId));
return client;
}
@ -1080,7 +1059,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client);
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
String originSubMerchantId = client.getString("rpay_enterprise_id");
update.put("client_id", clientId);
String subMerchantId = rpaySubMerchantInfo.getString("rpay_enterprise_id");
update.put("rpay_enterprise_id", subMerchantId);
@ -1093,25 +1071,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(clientId);
}
@Transactional
@Override
public void updateClientYeepayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject yeepaySubMerchantInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
if (client.getString("yeepay_sub_merchant_id").equals(yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"))) {
throw new BadRequestException("The sub merchant Id is in use");
}
JSONObject yeepayConfigValid = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id"));
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayConfigValid.getString("yeepay_config_id"), 0);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfigBySub(client.getIntValue("client_id"), yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"));
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayConfig.getString("yeepay_config_id"), 1);
client.put("yeepay_sub_merchant_id", yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"));
clientMapper.update(client);
}
@Override
public void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -1665,9 +1624,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, permissionKey, allow));
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
upayProfileInfo.put(permissionKey, allow);
sysClientUpayProfileMapper.update(upayProfileInfo);
if (upayProfileInfo != null) {
upayProfileInfo.put(permissionKey, allow);
sysClientUpayProfileMapper.update(upayProfileInfo);
}
}
@Override
@ -1678,12 +1640,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new NotFoundException("Client Not Exists");
}
if (channel.equals("hf") && !allow && client.getBoolean("enable_hf_email_notice")) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_hf_email_notice", allow));
}
if (channel.equals("yeepay") && !allow && client.getBoolean("enable_yeepay_email_notice")) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_yeepay_email_notice", allow));
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow));
logger.info(manager.getString("display_name") + "(" + manager.getString("manager_id") + ") switched client " + clientMoniker + " channel "
@ -2089,25 +2045,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkAddRate(config, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
checkAddRate(config, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
checkAddRate(config, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
checkAddRate(config, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
checkAddRate(config, "jd", "jd_rate_value", org, "min_jd_rate");
// checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
// checkAddRate(config, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate");
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
configNewClientRate(config, clientId, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
configNewClientRate(config, clientId, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
configNewClientRate(config, clientId, "jd", "jd_rate_value", org, "min_jd_rate");
// configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
// configNewClientRate(config, clientId, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate");
//todo 暂不更新Rpay+ 费率信息
//rpayApi.modifySurchargeConfig(client);
}
private void configNewClientRate(JSONObject config, int clientId, String channel, String rateKey, JSONObject org, String rateValueKey) {
@ -2150,8 +2095,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkModifyRate(org, configJson, "Wechat", "min_wechat_rate");
checkModifyRate(org, configJson, "Alipay", "min_alipay_rate");
checkModifyRate(org, configJson, "AlipayOnline", "min_alipayonline_rate");
checkModifyRate(org, configJson, "jd", "min_jd_rate");
checkModifyRate(org, configJson, "Bestpay", "min_bestpay_rate");
configJson.put("client_rate_id", rateId);
configJson.put("manager_id", manager.getString("manager_id"));
configJson.put("manager_name", manager.getString("username"));
@ -2162,9 +2105,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
configJson.put("ext_rates", extParams.toJSONString());
}
clientRateMapper.updateConfig(configJson);
// if ("Rpay".equals(configJson.getString("rate_name"))) {
// rpayApi.modifySurchargeConfig(client);
// }
if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getRateName())) {
return;
}
@ -2174,7 +2114,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (cleanDays != client.getIntValue("clean_days") && StringUtils.equalsIgnoreCase("Wechat", config.getRateName())) {
clientModifySupport.processClientConfigModify(new ClearDaysModify(manager, clientMoniker, cleanDays));
}
// clientMapper.updateCleanDays(clientId, config.getCleanDays());
}
private void checkModifyRate(JSONObject org, JSONObject configJson, String rateName, String rateValueKey) {
@ -2451,23 +2390,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} catch (Exception ignored) {
throw new BadRequestException("Merchant Rate Not Configure,Please Contact Customer Service");
}
try {
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
} catch (Exception ignored) {
JSONObject rate = sysConfigRate.getJSONObject("t" + weChatRate.getString("clean_days"));
client.put("bestpay_rate", rate.getBigDecimal("Bestpay").setScale(2, BigDecimal.ROUND_DOWN));
client.put("jd_rate", rate.getBigDecimal("JDpay").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id"));
if (bankAccount == null || bankAccount.size() <= 0) {
throw new BadRequestException("The Partner's Account is not config!");
@ -3103,27 +3025,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")");
}
// List<JSONObject> clientRate = clientRateMapper.latestConfig(client.getIntValue("client_id"), null);
// if (CollectionUtils.isEmpty(clientRate)) {
// throw new BadRequestException("The Partner's Rate is not config!");
// }
// clientRate.forEach((p) -> {
// String rate_name = p.getString("rate_name");
// if ("Wechat".equals(rate_name)) {
// client.put("wechat_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
// client.put("clean", "T+" + p.getString("clean_days"));
// client.put("clean_days", p.getString("clean_days"));
// } else if ("Alipay".equals(rate_name)) {
// client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
// } else if ("Bestpay".equals(rate_name)) {
// client.put("bestpay_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
// } else if ("jd".equals(rate_name)) {
// client.put("jd_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
// } else if ("AlipayOnline".equals(rate_name)) {
// client.put("alipay_online_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
// }
// });
JSONObject weChatRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (weChatRate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
@ -3137,17 +3038,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (alipayRate != null) {
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
@ -3252,11 +3142,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("clean_days", p.getString("clean_days"));
} else if ("Alipay".equals(rate_name)) {
client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
} else if ("Bestpay".equals(rate_name)) {
client.put("bestpay_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
} else if ("jd".equals(rate_name)) {
client.put("jd_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
} else if ("AlipayOnline".equals(rate_name)) {
}else if ("AlipayOnline".equals(rate_name)) {
client.put("alipay_online_rate", p.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
});
@ -3332,16 +3218,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
@ -4240,22 +4116,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("Merchant Rate Not Configure,Please Contact Customer Service");
}
try {
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
} catch (Exception ignored) {
JSONObject rate = sysConfigRate.getJSONObject("t" + weChatRate.getString("clean_days"));
client.put("bestpay_rate", rate.getBigDecimal("Bestpay").setScale(2, BigDecimal.ROUND_DOWN));
client.put("jd_rate", rate.getBigDecimal("JDpay").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id"));
if (bankAccount == null || bankAccount.size() <= 0) {
throw new BadRequestException("The Partner's Account is not config!");
@ -5885,20 +5745,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return null;
}
@Override
public List<JSONObject> listYeepaySubMerchantIdApplys(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
List<JSONObject> applices = yeePayClientConfigMapper.findAllMerchantConfig(client.getInteger("client_id"));
if (!applices.isEmpty()) {
return applices;
}
return null;
}
@Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) {
@ -6159,116 +6005,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
@Transactional
public void subYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
List<JSONObject> yeepayClientConfigs = yeePayClientConfigMapper.findAllMerchantConfig(client.getIntValue("client_id"));
if (yeepayClientConfigs != null) {
for (JSONObject yeepayClientConfig : yeepayClientConfigs) {
if (yeepayClientConfig.getIntValue("is_valid") == 1) {
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayClientConfig.getString("yeepay_config_id"), 0);
}
}
}
merchantInfo.put("create_time", new Date());
merchantInfo.put("operator", manager.getString("display_name"));
merchantInfo.put("client_id", client.getIntValue("client_id"));
merchantInfo.put("client_id", merchantInfo.getString("client_id"));
// merchantInfo.put("vouchers",merchantInfo.getJSONObject("vouchers").toJSONString());
List<JSONObject> directorsAll = new ArrayList<>();
List<JSONObject> executivesAll = new ArrayList<>();
directorsAll.add(merchantInfo.getJSONObject("directors"));
executivesAll.add(merchantInfo.getJSONObject("executives"));
JSONObject extInfo = new JSONObject();
extInfo.put("directors", directorsAll);
extInfo.put("executives", executivesAll);
merchantInfo.put("extinfo", extInfo.toJSONString());
yeePayClientConfigMapper.saveMerchantConfig(merchantInfo);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id"));
yeepayConfig.put("company_website", merchantInfo.getString("company_website"));
yeepayConfig.put("abn", merchantInfo.getString("abn"));
yeepayConfig.put("company_name", merchantInfo.getString("company_name"));
yeepayConfig.put("contact_phone", merchantInfo.getString("contact_phone"));
yeepayConfig.put("contact_email", merchantInfo.getString("contact_email"));
yeepayConfig.put("contact_person", merchantInfo.getString("contact_person"));
SubmerchantRegisterResult result = yeePayClient.registerMerchant(client, yeepayConfig);
if (result.getStatus().equals("FAILED")) {
throw new BadRequestException(result.getErrorMsg());
}
yeepayConfig.put("sub_merchant_id", result.getSubMerchantId());
yeePayClientConfigMapper.updateSubMerchantId(yeepayConfig.getString("yeepay_config_id"), result.getMerchantId(), result.getSubMerchantId());
client.put("yeepay_sub_merchant_id", result.getSubMerchantId());
clientMapper.update(client);
}
@Override
public void subYeepayMerchantAdd(String clientMoniker, JSONObject merchantInfo, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject config = yeePayClientConfigMapper.findMerchantConfigBySub(client.getIntValue("client_id"), merchantInfo.getString("sub_merchant_id"));
if (config != null) {
throw new BadRequestException("You had add the sub merchant id");
}
List<JSONObject> yeepayClientConfigs = yeePayClientConfigMapper.findAllMerchantConfig(client.getIntValue("client_id"));
if (yeepayClientConfigs != null) {
for (JSONObject yeepayClientConfig : yeepayClientConfigs) {
if (yeepayClientConfig.getIntValue("is_valid") == 1) {
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayClientConfig.getString("yeepay_config_id"), 0);
}
}
}
merchantInfo.put("client_id", client.getIntValue("client_id"));
merchantInfo.put("merchant_id", yeePayConfig.getAppKey().split("_")[1]);
merchantInfo.put("create_time", new Date());
merchantInfo.put("is_valid", 1);
merchantInfo.put("operator", manager.getString("display_name"));
yeePayClientConfigMapper.saveMerchantConfig(merchantInfo);
client.put("yeepay_sub_merchant_id", merchantInfo.getString("sub_merchant_id"));
clientMapper.update(client);
}
@Override
public void reSubYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfigBySub(client.getIntValue("client_id"), merchantInfo.getString("subMerchantId"));
List<JSONObject> directorsAll = new ArrayList<>();
List<JSONObject> executivesAll = new ArrayList<>();
directorsAll.add(merchantInfo.getJSONObject("directors"));
executivesAll.add(merchantInfo.getJSONObject("executives"));
JSONObject extInfo = new JSONObject();
extInfo.put("directors", directorsAll);
extInfo.put("executives", executivesAll);
yeepayConfig.put("extinfo", extInfo.toJSONString());
yeepayConfig.put("industry", merchantInfo.getString("industry"));
yeepayConfig.put("business_content", merchantInfo.getString("business_content"));
yeepayConfig.put("business_licence", merchantInfo.getString("business_licence"));
yeePayClientConfigMapper.update(yeepayConfig);
yeepayConfig.put("company_website", merchantInfo.getString("company_website"));
yeepayConfig.put("abn", merchantInfo.getString("abn"));
yeepayConfig.put("company_name", merchantInfo.getString("company_name"));
yeepayConfig.put("contact_phone", merchantInfo.getString("contact_phone"));
yeepayConfig.put("contact_email", merchantInfo.getString("contact_email"));
yeepayConfig.put("contact_person", merchantInfo.getString("contact_person"));
yeepayConfig.put("mode", "UPDATE");
SubmerchantRegisterResult result = yeePayClient.registerMerchant(client, yeepayConfig);
if (result.getStatus().equals("FAILED")) {
throw new BadRequestException(result.getErrorMsg());
}
}
@Override
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -6609,7 +6345,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
ctx.setVariable("order_id", order.getString("order_id"));
ctx.setVariable("amount", order.getString("total_amount"));
ctx.setVariable("currency", order.getString("currency"));
ctx.setVariable("channel", getOrderChannel(order.getString("channel")));
ctx.setVariable("channel", order.getString("channel"));
String create_time = "";
if (client.getString("timezone") != null) {
create_time = DateFormatUtils.format(order.getDate("create_time"),
@ -6632,16 +6368,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}).start();
}
private String getOrderChannel(String channel) {
switch (channel) {
case "hf":
return "汇付";
case "Yeepay":
return "易宝支付";
}
return "";
}
@Override
public void updateAllPartnerPassword(String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -7392,6 +7118,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("rpaypmt_card rate Not configured");
}
JSONObject cardRate = clientRate.getJSONObject("ext_rates");
//增加transaction_fee为null异常
if (!cardRate.containsKey("transaction_fee") || StringUtils.isEmpty(cardRate.getString("transaction_fee"))) {
cardRate.put("transaction_fee", BigDecimal.ZERO);
}
JSONObject bankAccountInfo = clientBankAccountMapper.clientBankAccounts(clientId).get(0);
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(clientId);
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);

@ -209,11 +209,6 @@ public class PartnerManageController {
clientManager.updateClientRpayPaymentConfig(manager, clientMoniker, rpaySubMerchantInfo);
}
@ManagerMapping(value = "/{clientMoniker}/yeepay_payment_config", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void updatePartnerYeepayPaymentConfig(@PathVariable String clientMoniker, @RequestBody JSONObject yeepaySubMerchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.updateClientYeepayPaymentConfig(manager, clientMoniker, yeepaySubMerchantInfo);
}
@ManagerMapping(value = "/{clientMoniker}/ali_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void updateAliSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject aliSubMerchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.updateAliSubMerchantId(manager, clientMoniker, aliSubMerchantInfo);
@ -810,12 +805,6 @@ public class PartnerManageController {
public List<JSONObject> listRpaySubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listRpaySubMerchantIdApplys(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/list_yeepay_sub_applices", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public List<JSONObject> listYeepaySubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listYeepaySubMerchantIdApplys(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public String subMerchantApplication(@PathVariable String clientMoniker, @RequestBody SubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.subMerchantApplication(clientMoniker, subMerchantIdApply, manager);
@ -900,16 +889,6 @@ public class PartnerManageController {
clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo, manager);
}
@ManagerMapping(value = "/{clientMoniker}/registYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void subYeepayMerchantApplication(@PathVariable String clientMoniker, @RequestBody JSONObject merchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.subYeepayMerchantApplication(clientMoniker, merchantInfo, manager);
}
@ManagerMapping(value = "/{clientMoniker}/updateYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void reSubYeepayMerchantApplication(@PathVariable String clientMoniker, @RequestBody JSONObject merchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.reSubYeepayMerchantApplication(clientMoniker, merchantInfo, manager);
}
@GetMapping("/compliance")
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {
@ -932,10 +911,6 @@ public class PartnerManageController {
return clientManager.cbBankPayLink(clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/addYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void subYeepayMerchantAdd(@PathVariable String clientMoniker, @RequestBody JSONObject merchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.subYeepayMerchantAdd(clientMoniker, merchantInfo, manager);
}
@GetMapping("/{clientMoniker}/cb_bankpay/link/pc")
public void switchPaymentWayPC(@PathVariable String clientMoniker, HttpServletResponse response) throws IOException {

@ -18,10 +18,10 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.net.util.Base64;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

@ -26,7 +26,6 @@ public class OrgInfo {
private String remark;
private Double alipay_rate_value;
private Double wechat_rate_value;
private Double bestpay_rate_value;
private Double alipayonline_rate_value;
private Double cb_bankpay_rate_value;
private Double rpaypmt_card_rate_value;
@ -182,14 +181,6 @@ public class OrgInfo {
this.wechat_rate_value = wechat_rate_value;
}
public Double getBestpay_rate_value() {
return bestpay_rate_value;
}
public void setBestpay_rate_value(Double bestpay_rate_value) {
this.bestpay_rate_value = bestpay_rate_value;
}
public Double getAlipayonline_rate_value() {
return alipayonline_rate_value;
}

@ -339,7 +339,7 @@ public class OrgManagerImpl implements OrgManager {
JSONArray rate1 = new JSONArray();
JSONArray rate2 = new JSONArray();
if(orgObject.getString("commission_type").equals(json.getString("commission_type"))){
String[] rates = new String[]{"alipay_rate_value","wechat_rate_value","bestpay_rate_value","alipayonline_rate_value","jd_rate_value","cb_bankpay_rate_value"};
String[] rates = new String[]{"alipay_rate_value","wechat_rate_value","alipayonline_rate_value","cb_bankpay_rate_value"};
for (String rateName: rates ){
if(StringUtils.isEmpty(orgObject.getString(rateName))){
rate1.add(rateName);

@ -23,8 +23,6 @@ import java.util.Map;
*/
@Component
public class PartnerPermissionScanner implements BeanPostProcessor, PermissionPartnerReader {
private Logger logger = LoggerFactory.getLogger(getClass());
private Map<String, PermissionNode> permissionNodes = new HashMap<>();
@Override
@ -55,7 +53,6 @@ public class PartnerPermissionScanner implements BeanPostProcessor, PermissionPa
PermissionNode node = new PermissionNode(controller.getSimpleName(), method.getName());
getRequestInfo(node, clazzRequestMapping, methodMapping);
node.setPartnerPermissions(clazzPermission, methodPermission);
logger.debug("register permission:" + node.getFuncName() + ":" + node.getRequestId());
if (permissionNodes.containsKey(node.getFuncId())) {
throw new RuntimeException("Duplicated permission function ID:" + controller.getName() + "." + method.getName());
}

@ -3,8 +3,6 @@ package au.com.royalpay.payment.manage.pos.datasource;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
@ -17,18 +15,14 @@ import org.springframework.stereotype.Component;
@Component
public class ReadOnlyConnectionInterceptor implements Ordered {
public static final Logger logger = LoggerFactory.getLogger(ReadOnlyConnectionInterceptor.class);
@Around("@annotation(readOnlyConnection)")
public Object proceed(ProceedingJoinPoint proceedingJoinPoint,ReadOnlyConnection readOnlyConnection) throws Throwable {
public Object proceed(ProceedingJoinPoint proceedingJoinPoint, ReadOnlyConnection readOnlyConnection) throws Throwable {
try {
logger.info("set database connection to read only");
DbContextHolder.setDbType(DbContextHolder.DbType.SLAVE);
Object result = proceedingJoinPoint.proceed();
return result;
}finally {
} finally {
DbContextHolder.clearDbType();
logger.info("restore database connection");
}
}

@ -53,13 +53,6 @@ public class PromotionRootController {
@GetMapping("/clients/{clientMoniker}/aggregate")
public void clientPromotionRoot(@PathVariable String clientMoniker, @RequestHeader("User-Agent") String userAgent, HttpServletResponse response) {
String url = null;
/*if (userAgent.toLowerCase().contains("micromessenger") ) {
url ="/promotions/clients/"+clientMoniker+"/alipay";
}
if (userAgent.toLowerCase().contains("bestpay") ) {
url ="/promotions/clients/"+clientMoniker+"/alipay";
}*/
if (userAgent.toLowerCase().contains("alipayclient") ) {
url ="/promotions/clients/"+clientMoniker+"/alipay";

@ -254,9 +254,6 @@ public class RiskMerchantServiceImpl implements RiskMerchantService {
attention.put("is_valid", 1);
attention.put("enjoin_wechat", params.getBoolean("enjoin_wechat")== null ? true : params.getBoolean("enjoin_wechat"));
attention.put("enjoin_alipay", params.getBoolean("enjoin_alipay")== null ? true : params.getBoolean("enjoin_alipay"));
attention.put("enjoin_bestpay", params.getBoolean("enjoin_bestpay")== null ? true : params.getBoolean("enjoin_bestpay"));
attention.put("enjoin_jd", params.getBoolean("enjoin_jd")== null ? true : params.getBoolean("enjoin_jd"));
attention.put("enjoin_hf", params.getBoolean("enjoin_hf")== null ? true : params.getBoolean("enjoin_hf"));
attention.put("creation_date", params.getDate("creation_date")==null ? new Date() : params.getDate("creation_date"));
attention.put("creation_by", manager.getString("manager_id"));
attention.put("remark", params.getString("remark"));
@ -346,9 +343,6 @@ public class RiskMerchantServiceImpl implements RiskMerchantService {
}
attentionMerchant.put("enjoin_wechat", attention.getBoolean("enjoin_wechat"));
attentionMerchant.put("enjoin_alipay", attention.getBoolean("enjoin_alipay"));
attentionMerchant.put("enjoin_bestpay", attention.getBoolean("enjoin_bestpay"));
attentionMerchant.put("enjoin_jd", attention.getBoolean("enjoin_jd"));
attentionMerchant.put("enjoin_hf", attention.getBoolean("enjoin_hf"));
attentionMerchant.put("last_update_date", new Date());
attentionMerchant.put("last_update_by", manager.getString("manager_id"));
riskAttentionMerchantsAMapper.update(attentionMerchant);

@ -1,11 +1,9 @@
package au.com.royalpay.payment.manage.support.attachment.web;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import com.alibaba.fastjson.JSONObject;
import com.yeepay.yop.sdk.service.kj.model.FileUploadResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -22,8 +20,6 @@ import java.io.IOException;
public class AttachmentController {
@Resource
private AttachmentClient attachmentClient;
@Resource
private YeePayClient yeePayClient;
@PostMapping("/files")
@RequirePartner
@ -32,13 +28,6 @@ public class AttachmentController {
return attachmentClient.uploadFile(file,false);
}
@PostMapping("/yeepayFiles")
@RequirePartner
@RequireManager
public FileUploadResult uploadYeepayImage(@RequestParam MultipartFile file) throws IOException {
return yeePayClient.uploadFile(file.getOriginalFilename(),"VOUCHER",file.getInputStream());
}
@PostMapping("/riskFiles")
public JSONObject uploadRiskImage(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,false);

@ -26,7 +26,6 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
@ -175,14 +174,6 @@ public class TradeLogServiceImpl implements TradeLogService {
if (timezone != null) {
TimeZoneUtils.switchTimeZone(logs, timezone, "create_time", "confirm_time", "transaction_time");
}
if (account != null) {
PartnerRole role = PartnerRole.getRole(account.getIntValue("role"));
if (role == PartnerRole.MANAGER || role == PartnerRole.ADMIN) {
for (JSONObject log : logs) {
log.put("audition", !refundAuditionMapper.listAuditingRefundsOfOrder(log.getString("order_id")).isEmpty());
}
}
}
JSONObject result = PageListUtils.buildPageListResult(logs);
JSONObject analysis = orderMapper.analysisOrders(params);
result.put("analysis", analysis);
@ -212,14 +203,6 @@ public class TradeLogServiceImpl implements TradeLogService {
if (timezone != null) {
TimeZoneUtils.switchTimeZone(logs, timezone, "create_time", "confirm_time", "transaction_time");
}
if (account != null) {
PartnerRole role = PartnerRole.getRole(account.getIntValue("role"));
if (role == PartnerRole.MANAGER || role == PartnerRole.ADMIN) {
for (JSONObject log : logs) {
log.put("audition", !refundAuditionMapper.listAuditingRefundsOfOrder(log.getString("order_id")).isEmpty());
}
}
}
JSONObject result = PageListUtils.buildPageListResult(logs);
JSONObject analysis = orderMapper.analysisOrders(params);
result.put("analysis", analysis);
@ -691,16 +674,6 @@ public class TradeLogServiceImpl implements TradeLogService {
.filter(log -> "Alipay".equals(log.getString("channel")))
.map(log -> getSymbol(log).multiply(log.getBigDecimal("channel_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("jd_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.filter(log -> "jd".equals(log.getString("channel")))
.map(log -> getSymbol(log).multiply(log.getBigDecimal("channel_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("bestpay_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.filter(log -> "Bestpay".equals(log.getString("channel")))
.map(log -> getSymbol(log).multiply(log.getBigDecimal("channel_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("alipay_online_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.filter(log -> "AlipayOnline".equals(log.getString("channel")))
@ -710,6 +683,9 @@ public class TradeLogServiceImpl implements TradeLogService {
}
private BigDecimal getSymbol(JSONObject log) {
if (!log.containsKey("transaction_fee") || StringUtils.isEmpty(log.getString("transaction_fee"))) {
log.put("transaction_fee", BigDecimal.ZERO);
}
return "Credit".equals(log.getString("transaction_type")) || "Settlement".equals(log.getString("channel")) ? BigDecimal.ONE : BigDecimal.valueOf(-1);
}
@ -741,8 +717,6 @@ public class TradeLogServiceImpl implements TradeLogService {
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO));
parmerters.put("alipay_fee", takeDecimalOrDefault(analysis, "alipay_fee", BigDecimal.ZERO));
parmerters.put("wechat_fee", takeDecimalOrDefault(analysis, "wechat_fee", BigDecimal.ZERO));
parmerters.put("bestpay_fee", takeDecimalOrDefault(analysis, "bestpay_fee", BigDecimal.ZERO));
parmerters.put("jd_fee", takeDecimalOrDefault(analysis, "jd_fee", BigDecimal.ZERO));
parmerters.put("alipay_online_fee", takeDecimalOrDefault(analysis, "alipay_online_fee", BigDecimal.ZERO));
parmerters.put("gst", takeDecimalOrDefault(analysis, "tax_amount", BigDecimal.ZERO));
parmerters.put("royalpay_fee", takeDecimalOrDefault(analysis, "total_royalpay_fee", BigDecimal.ZERO));
@ -816,8 +790,6 @@ public class TradeLogServiceImpl implements TradeLogService {
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO));
parmerters.put("alipay_fee", takeDecimalOrDefault(analysis, "alipay_fee", BigDecimal.ZERO));
parmerters.put("wechat_fee", takeDecimalOrDefault(analysis, "wechat_fee", BigDecimal.ZERO));
parmerters.put("bestpay_fee", takeDecimalOrDefault(analysis, "bestpay_fee", BigDecimal.ZERO));
parmerters.put("jd_fee", takeDecimalOrDefault(analysis, "jd_fee", BigDecimal.ZERO));
parmerters.put("alipay_online_fee", takeDecimalOrDefault(analysis, "alipay_online_fee", BigDecimal.ZERO));
parmerters.put("gst", takeDecimalOrDefault(analysis, "tax_amount", BigDecimal.ZERO));
parmerters.put("royalpay_fee", takeDecimalOrDefault(analysis, "total_royalpay_fee", BigDecimal.ZERO));
@ -838,6 +810,10 @@ public class TradeLogServiceImpl implements TradeLogService {
BigDecimal incrementalSurcharge = item.containsKey("incremental_surcharge") ? item.getBigDecimal("incremental_surcharge") : BigDecimal.ZERO;
BigDecimal taxAmount = item.containsKey("tax_amount") ? item.getBigDecimal("tax_amount") : BigDecimal.ZERO;
BigDecimal incrementalTax = incrementalSurcharge.divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
//增加transaction_fee为null异常
if (!item.containsKey("transaction_fee") || StringUtils.isEmpty(item.getString("transaction_fee"))) {
item.put("transaction_fee", BigDecimal.ZERO);
}
BigDecimal transactionFee = item.getBigDecimal("transaction_fee");
BigDecimal transactionFeeTax = item.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax).subtract(incrementalSurcharge).subtract(incrementalTax);
@ -1368,52 +1344,6 @@ public class TradeLogServiceImpl implements TradeLogService {
return res;
}
public static JSONObject bestpayInfo() {
JSONObject res = new JSONObject();
res.put("bw", "China Telecom BestPay Co.,Ltd");
res.put("bx", "BestPay");
res.put("by", "");
res.put("bz", "BestPay");
res.put("ca", "Tianhe District/Guangzhou");
res.put("cb", "GUANGDONG PROVINCE");
res.put("cc", "510000");
res.put("cd", "CHINA");
res.put("ce", "10F, Central Tower, No. 5 Xiancun Road, Zhu Jiang New Town");
res.put("cf", "Tianhe District/Guangzhou");
res.put("cg", "GUANGDONG PROVINCE");
res.put("ch", "51000");
res.put("ci", "CHINA");
res.put("cj", "8617701910171");
res.put("ck", "cenjianhu@bestpay.com.cn");
res.put("cl", "Payment Services");
res.put("cm", "");
res.put("cn", "Company");
return res;
}
public static JSONObject jdpayInfo() {
JSONObject res = new JSONObject();
res.put("bw", "Chinabank Payment Technology Co. Ltd.");
res.put("bx", "Jing Dong Pay");
res.put("by", "");
res.put("bz", "JDPay");
res.put("ca", "Da Xing District, Beijing");
res.put("cb", "Beijing");
res.put("cc", "100111");
res.put("cd", "CHINA");
res.put("ce", "Block A, No.18 Kechang 11 Street, BDA, China.");
res.put("cf", "Da Xing District, Beijing");
res.put("cg", "Beijing");
res.put("ch", "100111");
res.put("ci", "CHINA");
res.put("cj", "861089186958");
res.put("ck", "luoqi1@jd.com");
res.put("cl", "Payment Services");
res.put("cm", "");
res.put("cn", "Company");
return res;
}
@Override
public void exportTransLog(TradeLogQuery query, JSONObject manager, HttpServletResponse httpResponse) {
// List<JSONObject> ausTracData = austracDataMapper.getAustracData(query.toParams(null));
@ -1424,7 +1354,7 @@ public class TradeLogServiceImpl implements TradeLogService {
// }else {
// ausTracData = austracDataMapper.getAustracDataNew(query.toParams(null));
// }
if (!ausTracData.isEmpty() && ausTracData.size() > 0) {
if (!ausTracData.isEmpty()) {
for (JSONObject data : ausTracData) {
if (data.getIntValue("client_id") == 0) {
data.putAll(tunnel());
@ -1435,12 +1365,6 @@ public class TradeLogServiceImpl implements TradeLogService {
if (StringUtils.isNotBlank(data.getString("channel")) && "AlipayOnline".equals(data.getString("channel"))) {
data.putAll(alipayInfo());
}
if (StringUtils.isNotBlank(data.getString("channel")) && "Bestpay".equals(data.getString("channel"))) {
data.putAll(bestpayInfo());
}
if (StringUtils.isNotBlank(data.getString("channel")) && "jd".equals(data.getString("channel"))) {
data.putAll(jdpayInfo());
}
}
}

@ -109,24 +109,26 @@
<![CDATA[
UPDATE pmt_orders o
LEFT JOIN (
SELECT
order_id,
IFNULL(SUM(amount), 0) t
FROM pmt_refunds
WHERE status IN (2, 4, 5) AND order_id = #{order_id}
GROUP BY order_id) r ON r.order_id = o.order_id
SET o.refund_amount = ifnull(r.t, 0),
o.status = CASE
WHEN IFNULL(r.t, 0) = 0
THEN o.status
WHEN r.t > 0 AND r.t < o.customer_payment_amount
THEN 6
WHEN r.t >= o.customer_payment_amount
THEN 7
END
WHERE o.order_id = #{order_id}
UPDATE pmt_orders o
LEFT JOIN (
SELECT
order_id,
IFNULL(SUM(amount), 0) t
FROM pmt_refunds
WHERE status IN (2, 4, 5) AND order_id = #{order_id}
GROUP BY order_id) r ON r.order_id = o.order_id
SET o.refund_amount = ifnull(r.t, 0),
o.status = CASE
WHEN IFNULL(r.t, 0) = 0
THEN o.status
WHEN r.t > 0 AND r.t < o.customer_payment_amount
THEN 6
WHEN r.t >= o.customer_payment_amount
THEN 7
END
WHERE o.order_id = #{order_id}
]]>
@ -136,9 +138,11 @@
<![CDATA[
UPDATE pmt_orders
SET status = #{status}, error_code = #{error_code}, error_message = #{error_message}
WHERE order_id = #{order_id} AND status <= #{status}
UPDATE pmt_orders
SET status = #{status}, error_code = #{error_code}, error_message = #{error_message}
WHERE order_id = #{order_id} AND status <= #{status}
]]>
@ -205,7 +209,7 @@
</if>
<if test="source != 'ALL'">
AND
oo.source = #{source}
oo.source = #{source}
</if>
</where>
) o
@ -487,6 +491,8 @@
and o.customer_id = #{customer_id}
</if>
LEFT JOIN pmt_transactions t on t.order_id=o.order_id and t.refund_id is null and t.transaction_type='Credit'
<if test="from!=null">and t.create_time &gt;= #{from}</if>
<if test="to!=null">and t.create_time &lt; #{to}</if>
<where>
<if test="search_text!=null">
<bind name="name_pattern" value="'%'+search_text+'%'"/>
@ -513,7 +519,7 @@
and o.client_order_id = #{search_text}
</if>
</if>
<if test="dev_id!=null">and binary dev_id=#{dev_id}</if>
<if test="dev_id!=null">and binary dev_id=#{dev_id}</if>
<if test="trade_type!=null">and o.gateway in
<foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">#{gateway}</foreach>
</if>
@ -523,7 +529,6 @@
</if>
<if test="from!=null">and o.create_time &gt;= #{from}</if>
<if test="to!=null">and o.create_time &lt; #{to}</if>
<if test="date!=null">and date(o.create_time)=date(#{date})</if>
<if test="status!=null">
and
<foreach collection="status" item="std" open="(" close=")" separator=" or ">o.status=#{std}</foreach>
@ -592,9 +597,11 @@
count(DISTINCT l.client_id) clients,
ifnull(sum(if(l.transaction_type='Credit' and l.refund_id is null and l.currency!='CNY',l.display_amount,0)),0)
display_amount,
ifnull(sum(if(l.transaction_type='Credit' and l.refund_id is null and l.currency!='CNY',l.incremental_surcharge,0)),0)
ifnull(sum(if(l.transaction_type='Credit' and l.refund_id is null and
l.currency!='CNY',l.incremental_surcharge,0)),0)
incremental_surcharge,
ifnull(sum(if(l.transaction_type='Debit' and l.refund_id is not null and l.currency!='CNY',l.incremental_surcharge,0)),0)
ifnull(sum(if(l.transaction_type='Debit' and l.refund_id is not null and
l.currency!='CNY',l.incremental_surcharge,0)),0)
refund_incremental_surcharge,
ifnull(sum(if(l.currency!='CNY',l.incremental_surcharge,0)),0)
all_incremental_surcharge,
@ -625,6 +632,8 @@
</if>
INNER JOIN pmt_transactions t on t.order_id=o.order_id and (t.transaction_type='Credit' or t.refund_id is not
null)
<if test="from!=null">and t.create_time &gt;= #{from}</if>
<if test="to!=null">and t.create_time &lt; #{to}</if>
<where>
<if test="search_text!=null">
<bind name="name_pattern" value="'%'+search_text+'%'"/>
@ -669,7 +678,6 @@
<if test="org_id!=null and org_ids==null">and p.org_id=#{org_id}</if>
<if test="from!=null">and o.create_time &gt;= #{from}</if>
<if test="to!=null">and o.create_time &lt; #{to}</if>
<if test="date!=null">and date(o.create_time)=date(#{date})</if>
<if test="dev_id!=null">and binary o.dev_id=#{dev_id}</if>
<if test="onlyIncrementAmount != null">
AND t.incremental_surcharge >0
@ -752,14 +760,16 @@
<![CDATA[
SELECT
o.order_id,
o.channel
FROM pmt_orders o
WHERE o.order_id NOT IN (
SELECT DISTINCT order_id
FROM pmt_transactions
WHERE transaction_type = 'Credit') AND o.status >= 5 AND o.customer_payment_amount > 0
SELECT
o.order_id,
o.channel
FROM pmt_orders o
WHERE o.order_id NOT IN (
SELECT DISTINCT order_id
FROM pmt_transactions
WHERE transaction_type = 'Credit') AND o.status >= 5 AND o.customer_payment_amount > 0
]]>
@ -929,7 +939,7 @@
t.exchange_rate,
t.clearing_status,
t.settle_amount,
t.clearing_status = 2 pre_auth,
t.clearing_status = 2 pre_auth,
IF( t.remark like '%RYCBSM%',TRUE,FALSE) as geek_apply_deduction
from pmt_orders o
left join pmt_transactions t on t.order_id=o.order_id and t.channel!='Settlement'
@ -1053,23 +1063,25 @@
<select id="listHalloweenActOrder" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
o.order_id order_id,
o.currency,
o.channel,
o.customer_id,
format(t.clearing_amount,2) clearing_amount
FROM pmt_orders o
LEFT JOIN pmt_transactions t
ON t.order_id = o.order_id
WHERE t.refund_id IS NULL
AND t.transaction_type = 'Credit'
AND t.channel != 'System'
and o.transaction_date = #{transaction_date}
and o.status = #{status}
and o.customer_id = #{customer_id}
and t.clearing_amount >= 1.99
]]>
SELECT
o.order_id order_id,
o.currency,
o.channel,
o.customer_id,
format(t.clearing_amount,2) clearing_amount
FROM pmt_orders o
LEFT JOIN pmt_transactions t
ON t.order_id = o.order_id
WHERE t.refund_id IS NULL
AND t.transaction_type = 'Credit'
AND t.channel != 'System'
and o.transaction_date = #{transaction_date}
and o.status = #{status}
and o.customer_id = #{customer_id}
and t.clearing_amount >= 1.99
]]>
</select>
<select id="listGatewayByClientId" resultType="java.lang.Integer">
SELECT gateway FROM pmt_orders

@ -787,13 +787,6 @@ margin-bottom: 10%;"/>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; <small>Alipay Rate Value(Online): &nbsp;{{rate.alipayonline_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; <small>Bestpay Rate Value: &nbsp;{{rate.bestpay_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; <small>JD Rate Value: &nbsp;{{rate.jd_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; <small>CB Bankpay Rate Value: &nbsp;{{rate.cb_bankpay_rate_value}}%</small></p>
</div>

@ -53,27 +53,6 @@
</div>
</div>
<div class="col-xs-3 ng-scope"
ng-if="detail.Bestpay_gross_amount|| detail.Bestpay_total_charge || detail.Bestpay_royalpay_charge|| detail.Bestpay_org_charge">
<div class="info-box" style="background: lightcyan">
<div class="info-box-icon" style=" background: bottom;">
<img uib-tooltip="Bestpay" src="/static/images/bestpay_sign_lg.png">
</div>
<div class="info-box-content">
<h5 class="ng-binding">Total Transaction:<span
ng-bind="detail.Bestpay_gross_amount|currency:'AUD'"></span></h5>
<h5 class="ng-binding">Total Charge:<span
ng-bind="detail.Bestpay_total_charge|currency:'AUD'"></span></h5>
<h5 class="ng-binding">RoyalPay Charge:<span
ng-bind="detail.Bestpay_royalpay_charge|currency:'AUD'"></span></h5>
<h5 class="ng-binding">Org Net Charge:<span
ng-bind="detail.Bestpay_org_net_charge|currency:'AUD'"></span></h5>
<h5 class="ng-binding">City Partner Charge:<span
ng-bind="detail.Bestpay_org_charge|currency:'AUD'"></span></h5>
</div>
</div>
</div>
<div class="col-xs-3 ng-scope"
ng-if="detail.Wechat_gross_amount|| detail.Wechat_total_charge || detail.Wechat_royalpay_charge|| detail.Wechat_org_charge">
<div class="info-box" style="background: lightcyan">
@ -183,4 +162,4 @@
</table>
</div>
</div>
</div>
</div>

@ -20,9 +20,6 @@
<div class="btn-group">
<a class="btn btn-default" ui-sref=".category({catId:'pay_success'})">支付成功微信页广告位</a>
</div>
<div class="btn-group">
<a class="btn btn-default" ui-sref=".category({catId:'pay_success_bestpay'})">支付成功翼支付广告位</a>
</div>
<div class="btn-group">
<a class="btn btn-default" ui-sref=".category({catId:'app_activity'})">App活动页</a>
</div>
@ -41,4 +38,4 @@
</div>
</div>
</section>
</div>
</div>

@ -85,40 +85,6 @@
</div>
</div>
</div>
</br>
<div class="box box-warning" ng-if="bestpayLogs">
<div class="box-header">
<h4 class="text-blue">Bestpay Logs</h4>
</div>
<div class="box-body table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>Date Start</th>
<th>Date End</th>
<th>Pay Fee</th>
<th>Refund Fee</th>
<th>Surcharge</th>
<th>Settlement Fee</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{bestpayLogs.start_date}}</th>
<th>{{bestpayLogs.end_date}}</th>
<th>{{bestpayLogs.sys_pay_fee}}</th>
<th>{{bestpayLogs.sys_refund_fee}}</th>
<th>{{bestpayLogs.surcharge}}</th>
<th>{{bestpayLogs.sys_settle_amount}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<h4 class="text-blue">Alipay Logs</h4>
@ -196,7 +162,6 @@
</div>
<div class="box box-warning">
<div class="box-header">
<h4 class="text-blue">AlipayOnline Logs</h4>
@ -300,12 +265,11 @@
</button>
<button class="btn btn-primary" type="button"
ng-click="dohfSettle()">
ng-click="dohfSettle()">
<i class="fa fa-upload"></i> Do Settlement
</button>
<div class="box-body table-responsive">
<p ng-if="!hfLogs.length">No Data</p>
<table class="table table-hover" ng-if="hfLogs.length">
@ -374,4 +338,4 @@
</div>
</div>
</div>
</div>
</div>

@ -712,7 +712,7 @@ define(['angular', 'uiRouter', 'jstz', 'uiBootstrap', 'angularEcharts'], functio
}
},
legend: {
data: ['Wechat', 'Alipay'/*,'Bestpay'*/],
data: ['Wechat', 'Alipay'],
bottom: 0,
height: '15%',
width: '80%',
@ -795,4 +795,4 @@ define(['angular', 'uiRouter', 'jstz', 'uiBootstrap', 'angularEcharts'], functio
}
}]);
return app;
});
});

@ -1,310 +1,257 @@
<div ui-view class="dashboard-page">
<section class="content-header">
<h1>
Dashboard
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Dashboard</li>
</ol>
</section>
<section class="content">
<div class="row margin-bottom">
<div class="col-xs-12">
<div class="btn-group pull-right">
<button class="btn btn-default" ng-repeat="scale in scales"
ng-class="{'active':currentScale.key==scale.key}"
ng-bind="scale.label" ng-click="switchScale(scale)" type="button"></button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<img ng-if="max_amount && analysis.trade_amount>=max_amount" style="position: absolute;right: 0px;top: -10px" src="/static/images/new_record.png">
<span class="info-box-icon bg-aqua"><i class="ion ion-social-usd"></i></span>
<div class="info-box-content">
<span class="info-box-text">交易额</span>
<span class="info-box-number" ng-bind="analysis.trade_amount|currency:'AUD '"></span>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="ion ion-person-add"></i></span>
<div class="info-box-content">
<span class="info-box-text">开通商户数</span>
<span class="info-box-number" ng-bind="analysis.new_partners"></span>
<section class="content-header">
<h1>
Dashboard
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Dashboard</li>
</ol>
</section>
<section class="content">
<div class="row margin-bottom">
<div class="col-xs-12">
<div class="btn-group pull-right">
<button class="btn btn-default" ng-repeat="scale in scales"
ng-class="{'active':currentScale.key==scale.key}"
ng-bind="scale.label" ng-click="switchScale(scale)" type="button"></button>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">总商户数</span>
<span class="info-box-number" ng-bind="analysis.total_partners"></span>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<img ng-if="max_transaction_partners && analysis.traded_partners>=max_transaction_partners" style="position: absolute;right: 0px;top: -10px" src="/static/images/new_record.png">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="ion ion-android-done"></i></span>
<div class="info-box-content">
<span class="info-box-text">产生交易商户数</span>
<span class="info-box-number" ng-bind="analysis.traded_partners"></span>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<!-- <div class="box-header with-border">各平台交易总额</div>
<div class="box-body table-responsive">
<table class="table">
<tr>
<th>
<img src="/static/images/wechatpay_sign.png"/>
Wechat:{{totalChannelAmount.wechatPayAmount|currency: ' $ '}}</th>
<th>
<img src="/static/images/bestpay_sign.png"/>
Bestpay:{{totalChannelAmount.bestPayAmount|currency: ' $ '}}</th>
<th>
<img src="/static/images/alipay_sign.png"/>
Alipay:{{totalChannelAmount.aliPayAmount|currency: ' $ '}}</th>
&lt;!&ndash;<th>&ndash;&gt;
&lt;!&ndash;<img src="/static/images/wechatpay_sign.png"/>&ndash;&gt;
&lt;!&ndash;Znyoo:{{totalChannelAmount.znyooAmount|currency: ' $ '}}</th>&ndash;&gt;
</tr>
</table>
</div>-->
<div class="box-footer">
<div class="row">
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-header text-red"
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-header text-red"
ng-bind="totalChannelAmount.wechat_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/wechatpay_sign.png"/> Wechat <a style="cursor:pointer;"><i class="fa fa-question-circle-o" uib-tooltip-html="htmlTooltip"></i></i></a></div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<img ng-if="max_amount && analysis.trade_amount>=max_amount"
style="position: absolute;right: 0px;top: -10px" src="/static/images/new_record.png">
<span class="info-box-icon bg-aqua"><i class="ion ion-social-usd"></i></span>
<div class="info-box-content">
<span class="info-box-text">交易额</span>
<span class="info-box-number" ng-bind="analysis.trade_amount|currency:'AUD '"></span>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-header text-red"
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-header text-red"
ng-bind="totalChannelAmount.alipay_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/> Alipay</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonline_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/> AlipayOnline</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="ion ion-person-add"></i></span>
<div class="info-box-content">
<span class="info-box-text">开通商户数</span>
<span class="info-box-number" ng-bind="analysis.new_partners"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.bestpay_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/> Bestpay</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">总商户数</span>
<span class="info-box-number" ng-bind="analysis.total_partners"></span>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.jd_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/jd_sign.png"/> JD Pay</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<img ng-if="max_transaction_partners && analysis.traded_partners>=max_transaction_partners"
style="position: absolute;right: 0px;top: -10px" src="/static/images/new_record.png">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="ion ion-android-done"></i></span>
<div class="info-box-content">
<span class="info-box-text">产生交易商户数</span>
<span class="info-box-number" ng-bind="analysis.traded_partners"></span>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.hf_order_count"></label>
</div>
</div>
<div class="box box-warning">
<!-- <div class="box-header with-border">各平台交易总额</div>
<div class="box-body table-responsive">
<table class="table">
<tr>
<th>
<img src="/static/images/wechatpay_sign.png"/>
Wechat:{{totalChannelAmount.wechatPayAmount|currency: ' $ '}}</th>
<th>
<img src="/static/images/bestpay_sign.png"/>
Bestpay:{{totalChannelAmount.bestPayAmount|currency: ' $ '}}</th>
<th>
<img src="/static/images/alipay_sign.png"/>
Alipay:{{totalChannelAmount.aliPayAmount|currency: ' $ '}}</th>
&lt;!&ndash;<th>&ndash;&gt;
&lt;!&ndash;<img src="/static/images/wechatpay_sign.png"/>&ndash;&gt;
&lt;!&ndash;Znyoo:{{totalChannelAmount.znyooAmount|currency: ' $ '}}</th>&ndash;&gt;
</tr>
</table>
</div>-->
<div class="box-footer">
<div class="row">
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-header text-red"
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-header text-red"
ng-bind="totalChannelAmount.wechat_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/wechatpay_sign.png"/>
Wechat <a style="cursor:pointer;"><i class="fa fa-question-circle-o"
uib-tooltip-html="htmlTooltip"></i></i></a></div>
</div>
<div class="description-header text-bold"><img src="/static/images/hf_sign.png"/>HF</div>
</div>
</div>
<!-- dashboard显示Rpay+交易额-->
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpay_order_count"></label>
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-header text-red"
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-header text-red"
ng-bind="totalChannelAmount.alipay_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/> Alipay
</div>
</div>
<div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>Rpay+</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepay_order_count"></label>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonline_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/>
AlipayOnline
</div>
</div>
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.lakalapayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.lakalapay_order_count"></label>
<!-- dashboard显示Rpay+交易额-->
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpay_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>Rpay+
</div>
</div>
<div class="description-header text-bold"><img src="/static/images/lakalapay_sign.png"/>LakalaPay</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_cardamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_card_order_count"></label>
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_cardamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_card_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/card_payment_sign.png"/>Card
Payment
</div>
</div>
<div class="description-header text-bold"><img src="/static/images/card_payment_sign.png"/>Card Payment</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_ddamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_dd_order_count"></label>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_ddamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_dd_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/direct_debit_sign.png"/>Direct
Debit
</div>
</div>
<div class="description-header text-bold"><img src="/static/images/direct_debit_sign.png"/>Direct Debit</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易分布
<a style="float: right" role="button" ui-sref=".gateway">+ more</a></div>
<div class="box-body">
<div class="row">
<div class="col-sm-4 col-xs-12">
<div class="col-sm-12 col-xs-6">
<p class="text-center">交易类型分布-交易量</p>
<div class="chart" style="height: 250px" echarts="analysis.trade_type_chart"
ng-class="{nodata:analysis.trade_type_chart.nodata}"></div>
<div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易分布
<a style="float: right" role="button" ui-sref=".gateway">+ more</a></div>
<div class="box-body">
<div class="row">
<div class="col-sm-4 col-xs-12">
<div class="col-sm-12 col-xs-6">
<p class="text-center">交易类型分布-交易量</p>
<div class="chart" style="height: 250px" echarts="analysis.trade_type_chart"
ng-class="{nodata:analysis.trade_type_chart.nodata}"></div>
</div>
<div class="col-sm-12 col-xs-6">
<p class="text-center">交易类型分布-商户数量</p>
<div class="chart" style="height: 250px" echarts="analysis.partners_type_chart"
ng-class="{nodata:analysis.partners_type_chart.nodata}"></div>
</div>
</div>
<div class="col-sm-12 col-xs-6">
<p class="text-center">交易类型分布-商户数量</p>
<div class="chart" style="height: 250px" echarts="analysis.partners_type_chart"
ng-class="{nodata:analysis.partners_type_chart.nodata}"></div>
<div class="col-sm-8 col-xs-12">
<p class="text-center">交易额前十商户</p>
<div class="chart" style="height: 500px;" echarts="analysis.top_partners"
ng-class="{nodata:analysis.top_partners.nodata}"></div>
</div>
</div>
<div class="col-sm-8 col-xs-12">
<p class="text-center">交易额前十商户</p>
<div class="chart" style="height: 500px;" echarts="analysis.top_partners"
ng-class="{nodata:analysis.top_partners.nodata}"></div>
</div>
</div>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<p class="description-header text-bold">最大交易额订单</p>
<p class="description-text" ng-if="!analysis.top_amount_order">暂无</p>
<p class="description-header text-red"
ng-bind="analysis.top_amount_order.aud_fee|currency:'AUD '"
ng-if="analysis.top_amount_order"></p>
<p class="description-text" ng-bind="analysis.top_amount_order.short_name"
ng-if="analysis.top_amount_order"></p>
<div class="box-footer">
<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<p class="description-header text-bold">最大交易额订单</p>
<p class="description-text" ng-if="!analysis.top_amount_order">暂无</p>
<p class="description-header text-red"
ng-bind="analysis.top_amount_order.aud_fee|currency:'AUD '"
ng-if="analysis.top_amount_order"></p>
<p class="description-text" ng-bind="analysis.top_amount_order.short_name"
ng-if="analysis.top_amount_order"></p>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<img ng-if="max_orders && analysis.trade_count>=max_orders" style="position: absolute;right: 20%;" src="/static/images/new_record.png">
<p class="description-header text-bold">交易笔数</p>
<p class="description-text" ng-if="!analysis.trade_count">暂无</p>
<p class="description-header text-red"
ng-bind="analysis.trade_count"
ng-if="analysis.trade_count"></p>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<img ng-if="max_orders && analysis.trade_count>=max_orders"
style="position: absolute;right: 20%;" src="/static/images/new_record.png">
<p class="description-header text-bold">交易笔数</p>
<p class="description-text" ng-if="!analysis.trade_count">暂无</p>
<p class="description-header text-red"
ng-bind="analysis.trade_count"
ng-if="analysis.trade_count"></p>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<p class="description-header text-bold">支付人数</p>
<!--<p class="description-header text-red"-->
<!--ng-bind="analysis.top_amount_order.aud_fee|currency:'AUD '" ng-if="analysis.top_amount_order"></p>-->
<!--<p class="description-text" ng-bind="analysis.top_amount_order.short_name" ng-if="analysis.top_amount_order"></p>-->
<p class="description-header text-green">
<label>{{analysis.total_customers}}</label> /
<label>{{analysis.new_customers}}</label> /
<label>{{analysis.old_customers}}</label>
</p>
<p class="description-text">总消费人数/新客户/老客户</p>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right" ng-click="displayExchangeRateHistory()" role="button" title="点击显示汇率历史记录">
<p class="description-header text-bold">最新汇率</p>
<div class="description-text"><img src="/static/images/wechatpay_sign.png"/>
<label ng-bind="analysis.wechat_rate"></label>
<label ng-if="!analysis.wechat_rate">暂无</label>
<p class="description-header text-bold">支付人数</p>
<!--<p class="description-header text-red"-->
<!--ng-bind="analysis.top_amount_order.aud_fee|currency:'AUD '" ng-if="analysis.top_amount_order"></p>-->
<!--<p class="description-text" ng-bind="analysis.top_amount_order.short_name" ng-if="analysis.top_amount_order"></p>-->
<p class="description-header text-green">
<label>{{analysis.total_customers}}</label> /
<label>{{analysis.new_customers}}</label> /
<label>{{analysis.old_customers}}</label>
</p>
<p class="description-text">总消费人数/新客户/老客户</p>
</div>
<div class="description-text"><img src="/static/images/alipay_sign.png"/>
<label ng-bind="analysis.alipay_rate"></label>
<label ng-if="!analysis.alipay_rate">暂无</label>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right" ng-click="displayExchangeRateHistory()"
role="button" title="点击显示汇率历史记录">
<p class="description-header text-bold">最新汇率</p>
<div class="description-text"><img src="/static/images/wechatpay_sign.png"/>
<label ng-bind="analysis.wechat_rate"></label>
<label ng-if="!analysis.wechat_rate">暂无</label>
</div>
<div class="description-text"><img src="/static/images/alipay_sign.png"/>
<label ng-bind="analysis.alipay_rate"></label>
<label ng-if="!analysis.alipay_rate">暂无</label>
</div>
</div>
</div>
</div>
@ -312,28 +259,27 @@
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易时间分布</div>
<div class="box-body">
<div class="chart" echarts="analysis.trade_time" style="height: 450px"
ng-class="{nodata:analysis.trade_time.nodata}"></div>
</div>
</div>
</div>
</div>-->
<div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易额趋势</div>
<div class="box-body">
<div class="chart" echarts="analysis.trade_line" style="height: 300px"
ng-class="{nodata:analysis.trade_line.nodata}"></div>
<!-- <div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易时间分布</div>
<div class="box-body">
<div class="chart" echarts="analysis.trade_time" style="height: 450px"
ng-class="{nodata:analysis.trade_time.nodata}"></div>
</div>
</div>
</div>
</div>-->
<div class="row">
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">交易额趋势</div>
<div class="box-body">
<div class="chart" echarts="analysis.trade_line" style="height: 300px"
ng-class="{nodata:analysis.trade_line.nodata}"></div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>

@ -2462,38 +2462,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t1.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t1.Alipay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t1.AlipayOnline);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t1.Bestpay);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t1.JDpay);
$scope.rate.hf_rate_value = parseFloat($scope.sysRateConfig.t1.HFpay);
$scope.rate.Rpay_rate_value = parseFloat($scope.sysRateConfig.t1.Rpay);
$scope.rate.yeepay_rate_value = parseFloat($scope.sysRateConfig.t1.Yeepay);
$scope.rate.cb_bankpay_rate_value = parseFloat($scope.sysRateConfig.t1.CB_Bankpay);
$scope.rate.transaction_fee = 0;
break;
}
case '2': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t2.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t2.Alipay);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t2.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t2.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t2.JDpay);
$scope.rate.hf_rate_value = parseFloat($scope.sysRateConfig.t2.HFpay);
$scope.rate.Rpay_rate_value = parseFloat($scope.sysRateConfig.t2.Rpay);
$scope.rate.yeepay_rate_value = parseFloat($scope.sysRateConfig.t2.Yeepay);
$scope.rate.cb_bankpay_rate_value = parseFloat($scope.sysRateConfig.t2.CB_Bankpay);
$scope.rate.transaction_fee = 0;
break;
}
case '3': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t3.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t3.Alipay);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t3.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t3.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t3.JDpay);
$scope.rate.hf_rate_value = parseFloat($scope.sysRateConfig.t3.HFpay);
$scope.rate.Rpay_rate_value = parseFloat($scope.sysRateConfig.t3.Rpay);
$scope.rate.yeepay_rate_value = parseFloat($scope.sysRateConfig.t3.Yeepay);
$scope.rate.cb_bankpay_rate_value = parseFloat($scope.sysRateConfig.t3.CB_Bankpay);
$scope.rate.transaction_fee = 0;
break;
}

@ -88,76 +88,6 @@
</div>
</div>
<div class="form-group"
ng-class="{'has-error':rate_form.bestpay_rate_value.$invalid && rate_form.bestpay_rate_value.$dirty}">
<label class="control-label col-sm-4" for="bestpay_rate_value_input">Bestpay Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="bestpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.bestpay_rate_value"
min="0.6" max="5" step="0.1" id="bestpay_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.bestpay_rate_value.$error" ng-if="rate_form.bestpay_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':rate_form.jd_rate_value.$invalid && rate_form.jd_rate_value.$dirty}">
<label class="control-label col-sm-4" for="jd_rate_value_input">JD Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="jd_rate_value" stringToNumber2 class="form-control" ng-model="rate.jd_rate_value"
min="0.6" max="5" step="0.1" id="jd_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.jd_rate_value.$error" ng-if="rate_form.jd_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!--<div class="form-group"
ng-class="{'has-error':rate_form.hf_rate_value.$invalid && rate_form.hf_rate_value.$dirty}">
<label class="control-label col-sm-4" for="hf_rate_value_input">HF Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="hf_rate_value" stringToNumber2 class="form-control" ng-model="rate.hf_rate_value"
min="0.6" max="2.2" step="0.1" id="hf_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.hf_rate_value.$error" ng-if="rate_form.hf_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 2.2%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>-->
<div class="form-group"
ng-class="{'has-error':rate_form.Rpay_rate_value.$invalid && rate_form.Rpay_rate_value.$dirty}">

@ -56,14 +56,6 @@
</p>
</div>
</div>
<div class="form-group" ng-if="'10'|withRole">
<label class="col-sm-3 control-label">Yeepay Sub Merchant Id</label>
<div class="col-sm-9">
<p class="form-control-static">
{{paymentInfo.yeepay_sub_merchant_id||'初始化'}}
</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Ali Sub Merchant Id</label>
@ -597,16 +589,6 @@
switch-change="toggleRequireRemark()">
</div>
</div>
<div class="form-group" ng-if="'1000000000111'|withRole">
<label class="col-sm-2 control-label">Bill Code Version</label>
<div class="col-sm-2">
<select class="form-control" ng-change="changeBillCodeVersion()" ng-model="paymentInfo.billcode_version"
title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
</div>
</div>
</div>
</div>

@ -14,10 +14,6 @@
class="channel-icon-mid">
<img ng-if="good.channel=='AlipayOnline'" src="/static/images/alipay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='Bestpay'" src="/static/images/bestpay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='jd'" src="/static/images/jd_sign_lg.png"
class="channel-icon-mid">
</span>
</li>
<li class="list-group-item list-group-item-text" style="height: 60px;">
@ -42,4 +38,4 @@
</div>
</div>
</div>
</div>
</div>

@ -154,18 +154,8 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"

@ -155,18 +155,8 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
@ -370,24 +360,12 @@
uib-tooltip="RP跨境商城" ng-if="trade.source=='RP跨境商城'"/>
<img src="/static/images/wechatpay_sign.png"
uib-tooltip="WechatPay" ng-if="trade.channel=='Wechat'"/>
<img src="/static/images/wechatpay_sign.png"
uib-tooltip="Znyoo" ng-if="trade.channel=='Znyoo'"/>
<img src="/static/images/bestpay_sign.png"
uib-tooltip="BestPay" ng-if="trade.channel=='Bestpay'"/>
<img src="/static/images/alipay_sign.png"
uib-tooltip="Alipay" ng-if="trade.channel=='Alipay'"/>
<img src="/static/images/alipay_sign.png"
uib-tooltip="AlipayOnline" ng-if="trade.channel=='AlipayOnline'"/>
<img src="/static/images/jd_sign.png"
uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/>
<img src="/static/images/hf_sign.png"
uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png"
uib-tooltip="Royal Pay" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png"
uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png"

@ -25,36 +25,11 @@
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay';channelAndDayOfAnalysis()" title="Bestpay">
<img src="/static/images/bestpay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='jd'}" ng-if="report.channels.jd">
<a role="button" ng-click="ctrl.channel='jd';channelAndDayOfAnalysis()" title="JD Pay">
<img src="/static/images/jd_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='hf'}" ng-if="report.channels.hf">
<a role="button" ng-click="ctrl.channel='hf';channelAndDayOfAnalysis()" title="HF Pay">
<img src="/static/images/hf_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Rpay'}" ng-if="report.channels.Rpay">
<a role="button" ng-click="ctrl.channel='Rpay';channelAndDayOfAnalysis()" title="Rpay Pay">
<img src="/static/images/rpayplus_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Yeepay'}" ng-if="report.channels.Yeepay">
<a role="button" ng-click="ctrl.channel='Yeepay';channelAndDayOfAnalysis()" title="Yeepay">
<img src="/static/images/yeepay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='LakalaPay'}" ng-if="report.channels.LakalaPay">
<a role="button" ng-click="ctrl.channel='LakalaPay';channelAndDayOfAnalysis()" title="LakalaPay">
<img src="/static/images/lakalapay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png">

@ -208,18 +208,8 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"

@ -113,9 +113,7 @@
<tr ng-repeat="trade in vip_orders">
<td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td>
<td>
<img src="https://file.royalpay.com.au/open/2017/07/20/1500528987490_T7vfHPjJ9bXIU6gtYTSUFNy4KKnEdO.png" uib-tooltip="Znyoo" ng-if="trade.channel=='Znyoo'"/>
<img src="https://file.royalpay.com.au/open/2017/07/20/1500528987490_T7vfHPjJ9bXIU6gtYTSUFNy4KKnEdO.png" uib-tooltip="WechatPay" ng-if="trade.channel=='Wechat'"/>
<img src="https://file.royalpay.com.au/open/2017/07/20/1500529652937_aH3Y5LQUAlzgDa1JvJJMLwkRwy2srS.png" uib-tooltip="BestPay" ng-if="trade.channel=='Bestpay'"/>
<img src="https://file.royalpay.com.au/open/2017/07/20/1500529018427_7TMmv7sKT3XiXdTkkyCAx3K0RIyAFH.png" uib-tooltip="Alipay" ng-if="trade.channel=='Alipay'"/>
{{trade.order_id}}
</td>
@ -170,4 +168,4 @@
</div>
</div>
</div>
</div>

@ -284,8 +284,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
};
}]);
app.controller('newRiskCtrl', ['$scope', '$http','commonDialog', function ($scope, $http,commonDialog) {
$scope.attentions = {"enjoin_wechat": true,"enjoin_alipay": true,"enjoin_bestpay": true,
"enjoin_jd": true,"enjoin_hf": true}
$scope.attentions = {"enjoin_wechat": true,"enjoin_alipay": true}
$scope.save = function (attentions) {
var params = angular.copy(attentions);
$http.post('/sys/risk/attention/'+ attentions.client_moniker, params).then(function () {
@ -374,4 +373,4 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
});
return app;
});
});

@ -73,9 +73,6 @@
<td>
<span ng-if="client.enjoin_wechat">Wechat</span>
<span ng-if="client.enjoin_alipay">Alipay</span>
<span ng-if="client.enjoin_bestpay">Bestpay</span>
<span ng-if="client.enjoin_jd">JD</span>
<span ng-if="client.enjoin_hf">HF</span>
</td>
<td>
<a role="button" class="text-bold text-danger"
@ -103,4 +100,4 @@
</div>
</div>
</section>
</div>
</div>

@ -36,15 +36,6 @@
<label>
<input type="checkbox" ng-model="attentions.enjoin_alipay" name="Alipay|支付宝">Alipay|支付宝
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_bestpay" name="Bestpay|翼支付">Bestpay|翼支付
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_jd" name="JD|京东">JD|京东
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_hf" name="HF|汇付">HF|汇付
</label>
</p>
</div>
</form>
@ -58,4 +49,4 @@
<div class="btn-group">
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>
</div>

@ -28,15 +28,6 @@
<label>
<input type="checkbox" ng-model="attentions.enjoin_alipay" name="Alipay|支付宝">Alipay|支付宝
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_bestpay" name="Bestpay|翼支付">Bestpay|翼支付
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_jd" name="JD|京东">JD|京东
</label>
<label>
<input type="checkbox" ng-model="attentions.enjoin_hf" name="HF|汇付">HF|汇付
</label>
</p>
</div>
</form>
@ -50,4 +41,4 @@
<div class="btn-group">
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>
</div>

@ -1,7 +1,7 @@
package au.com.royalpay.payment.manage.process.aes;
import au.com.royalpay.payment.tools.codec.AESCrypt;
import org.apache.commons.net.util.Base64;
import org.apache.commons.codec.binary.Base64;
import org.junit.Test;
import java.nio.charset.StandardCharsets;

@ -6,8 +6,8 @@ import au.com.royalpay.payment.tools.codec.AESCrypt;
import au.com.royalpay.payment.tools.encryptalgorithm.SignUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.stuxuhai.jpinyin.PinyinException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.net.util.Base64;
import org.junit.Test;
import javax.crypto.BadPaddingException;

@ -1,11 +1,10 @@
package au.com.royalpay.payment.manage.valid;
import au.com.royalpay.payment.manage.support.serverless.qcloud.support.ServerLessFunctionInvokeRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.net.util.Base64;
import org.junit.Test;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.ResponseEntity;

Loading…
Cancel
Save