Merge remote-tracking branch 'origin/master'

master
luoyang 5 years ago
commit 642ef5e8a5

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.1.2</jib-maven-plugin.version> <jib-maven-plugin.version>1.1.2</jib-maven-plugin.version>
<docker-image.version>1.0.43</docker-image.version> <docker-image.version>1.1.5</docker-image.version>
</properties> </properties>
<dependencies> <dependencies>

@ -128,8 +128,8 @@ public class DailyReportImp implements DailyReport {
kpi.put("kpi_percent", p.getBigDecimal("month_amount").divide(kpi_amount,4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%"); kpi.put("kpi_percent", p.getBigDecimal("month_amount").divide(kpi_amount,4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%");
for(JSONObject clientAmount :clientsAmount ){ for(JSONObject clientAmount :clientsAmount ){
if(clientAmount.getString("bd_group").equals(kpi.getString("bd_group"))){ if(clientAmount.getString("bd_group").equals(kpi.getString("bd_group"))){
kpi.put("clients_month",clientAmount.getIntValue("clients_month")); kpi.put("clients_month",clientAmount.getBigDecimal("clients_month"));
kpi.put("clients_yesterday",clientAmount.getIntValue("clients_yesterday")); kpi.put("clients_yesterday",clientAmount.getBigDecimal("clients_yesterday"));
} }
} }
total_kpi_amount = total_kpi_amount.add(kpi_amount); total_kpi_amount = total_kpi_amount.add(kpi_amount);

@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.swing.plaf.basic.BasicScrollPaneUI; import javax.swing.plaf.basic.BasicScrollPaneUI;
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper; import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
@ -499,9 +500,9 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
} }
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBigDecimal("clearing_amount").subtract(params.getBigDecimal("surcharge_cashback")); BigDecimal tmpClearingAmount = 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 channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = tmpClearingAmount.multiply(params.getBigDecimal("surcharge_rate")).setScale(2, RoundingMode.HALF_UP); BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
//增加货币判断 //增加货币判断
int i = currencyScale(params.getString("clearing_currency")); int i = currencyScale(params.getString("clearing_currency"));
total = total.add(tmpClearingAmount); total = total.add(tmpClearingAmount);
@ -542,9 +543,9 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
channel = "cb_bankpay"; channel = "cb_bankpay";
} }
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBigDecimal("clearing_amount").subtract(params.getBigDecimal("surcharge_cashback")); BigDecimal tmpClearingAmount = 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 channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = tmpClearingAmount.multiply(params.getBigDecimal("surcharge_rate")).setScale(2, RoundingMode.HALF_UP); BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
//增加货币判断 //增加货币判断
int i = currencyScale(params.getString("clearing_currency")); 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); BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP);
@ -594,14 +595,21 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
Date dateto = new Date(); Date dateto = new Date();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
String channel = oneChannel.getKey(); String channel = oneChannel.getKey();
String rateChannel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) { if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cb_bankpay"; channel = "cb_bankpay";
rateChannel = "CB_BankPay";
}
JSONObject clientRate = null;
try {
clientRate = merchantInfoProvider.clientCurrentRate(clientId, oneChannel.getValue().get(0).getDate("transaction_time"),
rateChannel);
} catch (Exception e) {
} }
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBigDecimal("clearing_amount").subtract(params.getBigDecimal("surcharge_cashback")); BigDecimal tmpClearingAmount = 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 channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = tmpClearingAmount.multiply(params.getBigDecimal("surcharge_rate")).setScale(2, RoundingMode.HALF_UP); BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
//增加货币判断 //增加货币判断
int i = currencyScale(params.getString("clearing_currency")); int i = currencyScale(params.getString("clearing_currency"));
if (total.compareTo(BigDecimal.ZERO) == 0) { if (total.compareTo(BigDecimal.ZERO) == 0) {
@ -630,7 +638,11 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("record_id", recordId); json.put("record_id", recordId);
json.put("client_id", clientId); json.put("client_id", clientId);
if (clientRate != null) {
json.put("client_rate", clientRate.getBigDecimal("rate_value"));
}else {
json.put("client_rate", oneChannel.getValue().get(0).getBigDecimal("surcharge_rate").multiply(CommonConsts.HUNDRED)); json.put("client_rate", oneChannel.getValue().get(0).getBigDecimal("surcharge_rate").multiply(CommonConsts.HUNDRED));
}
json.put("gross_amount", total); json.put("gross_amount", total);
json.put("total_charge", total_surage); json.put("total_charge", total_surage);
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value")); json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.mappers.payment; package au.com.royalpay.payment.manage.mappers.payment;
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -27,5 +28,4 @@ public interface CommonSubMerchantIdMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
JSONObject find(@Param("sub_merchant_id") String subMerchantId); JSONObject find(@Param("sub_merchant_id") String subMerchantId);
} }

@ -23,6 +23,7 @@ import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
@ -96,15 +97,14 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
@Override @Override
public void generateClientsSunMerchantId() { public void generateClientsSunMerchantId() {
//重构未交易商户号逻辑 //重构未交易商户号逻辑
String tempSubMerchantIds = sysConfigManager.getSysConfig().getString("temp_sub_mch_id");
List<JSONObject> clients = clientAnalysisMapper.tradeSubMerchantIdBy60Days(DateUtils.addDays(new Date(), -60)); List<JSONObject> clients = clientAnalysisMapper.tradeSubMerchantIdBy60Days(DateUtils.addDays(new Date(), -60));
if (clients.size() > 0) { if (clients.size() > 0) {
clientSubMerchantIdMapper.deleteAll(); clientSubMerchantIdMapper.deleteAll();
} }
for (JSONObject client: clients) { for (JSONObject client: clients) {
String subMerchantId = client.getString("sub_merchant_id"); String subMerchantId = client.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMerchantIds != null && tempSubMerchantIds.contains(subMerchantId)) { if (subMerchantId != null) {
client.put("temp_sub_merchant", true); client.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
} }
String id = client.getString("sub_merchant_id"); String id = client.getString("sub_merchant_id");
client.put("create_time",new Date()); client.put("create_time",new Date());
@ -142,11 +142,10 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
} }
private Map<String, List<JSONObject>> getClientMap(List<JSONObject> clients){ private Map<String, List<JSONObject>> getClientMap(List<JSONObject> clients){
String tempSubMerchantIds = sysConfigManager.getSysConfig().getString("temp_sub_mch_id");
for (JSONObject client: clients) { for (JSONObject client: clients) {
String subMerchantId = client.getString("sub_merchant_id"); String subMerchantId = client.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMerchantIds != null && tempSubMerchantIds.contains(subMerchantId)) { if (subMerchantId != null) {
client.put("temp_sub_merchant", true); client.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
} }
} }
Map<String, List<JSONObject>> clientsMap = clients.stream() Map<String, List<JSONObject>> clientsMap = clients.stream()
@ -190,4 +189,11 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
String sign = DigestUtils.sha256Hex(validStr).toLowerCase(); String sign = DigestUtils.sha256Hex(validStr).toLowerCase();
return "time=" + time + "&nonce_str=" + nonceStr + "&sign=" + sign; return "time=" + time + "&nonce_str=" + nonceStr + "&sign=" + sign;
} }
@Cacheable("common_sub_mch_id:")
public boolean checkSubMerchantIdInCommonPool(String subMerchantId) {
JSONObject json = commonSubMerchantIdMapper.find(subMerchantId);
return json != null;
}
} }

@ -6,4 +6,8 @@ public interface ClientInfoCacheSupport {
void clearClientCache(int clientId); void clearClientCache(int clientId);
void clearClientMonikerCache(String clientMoniker); void clearClientMonikerCache(String clientMoniker);
void clearClientConfigCache(int clientId);
void clearClientMonikerConfigCache(String clientMoniker);
} }

@ -241,6 +241,8 @@ public interface ClientManager {
void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version); void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
void changeCBBankPaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version); void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version);
void switchChildEachRefund(JSONObject manager, String clientMoniker, boolean childEachRefund); void switchChildEachRefund(JSONObject manager, String clientMoniker, boolean childEachRefund);
@ -251,6 +253,8 @@ public interface ClientManager {
void changePaymentPage(JSONObject account, String paypad_version); void changePaymentPage(JSONObject account, String paypad_version);
void changeCBBankPaymentPage(JSONObject account, String paypad_version);
void changeManualSettle(JSONObject account , int client_id, boolean manual_settle,String operator_id,int type,String operation); void changeManualSettle(JSONObject account , int client_id, boolean manual_settle,String operator_id,int type,String operation);
void changeQRCodePaySurcharge(JSONObject account, boolean paySurcharge); void changeQRCodePaySurcharge(JSONObject account, boolean paySurcharge);

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.merchants.core.impls; package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport; import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
@ -20,6 +21,8 @@ public class ClientInfoCacheSupportImpl implements ClientInfoCacheSupport{
@Resource @Resource
private ClientManager clientManager; private ClientManager clientManager;
@Resource @Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private ClientInfoCacheSupport clientInfoCacheSupport; private ClientInfoCacheSupport clientInfoCacheSupport;
@Override @Override
@ -39,4 +42,18 @@ public class ClientInfoCacheSupportImpl implements ClientInfoCacheSupport{
@CacheEvict(value = ":app_client_info_moniker:", key = "#clientMoniker") @CacheEvict(value = ":app_client_info_moniker:", key = "#clientMoniker")
public void clearClientMonikerCache(String clientMoniker) { public void clearClientMonikerCache(String clientMoniker) {
} }
@Override
@CacheEvict(value = ":app_client_config_info:", key = "''+#clientId")
public void clearClientConfigCache(int clientId) {
JSONObject client = clientConfigMapper.find(clientId);
if(client!=null){
clientInfoCacheSupport.clearClientMonikerConfigCache(client.getString("client_moniker"));
}
}
@Override
@CacheEvict(value = ":app_client_config_info_moniker:", key = "#clientMoniker")
public void clearClientMonikerConfigCache(String clientMoniker) {
}
} }

@ -26,6 +26,7 @@ import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.management.sysconfig.core.impls.PermissionPartnerManagerImpl; import au.com.royalpay.payment.manage.management.sysconfig.core.impls.PermissionPartnerManagerImpl;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper; import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.*; import au.com.royalpay.payment.manage.mappers.log.*;
import au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper; import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper; import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
@ -277,6 +278,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private MerchantSignInfoMapper merchantSignInfoMapper; private MerchantSignInfoMapper merchantSignInfoMapper;
@Resource @Resource
private CommonSubMerchantIdMapper commonSubMerchantIdMapper;
@Resource
private Locker locker; private Locker locker;
@ -372,12 +375,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
if (!StringUtils.equalsIgnoreCase(clientMoniker, PlatformEnvironment.getEnv().getTestMoniker())) { if (!StringUtils.equalsIgnoreCase(clientMoniker, PlatformEnvironment.getEnv().getTestMoniker())) {
String subMerchantId = client.getString("sub_merchant_id"); String subMerchantId = client.getString("sub_merchant_id");
String tempSubMerchantIds = sysConfigManager.getSysConfig().getString("temp_sub_mch_id"); if (subMerchantId != null) {
String tempSubMchSource = sysConfigManager.getSysConfig().getString("temp_sub_mch_id_source"); client.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
tempSubMchSource = tempSubMchSource == null ? "" : tempSubMchSource;
if (subMerchantId != null && tempSubMerchantIds != null && tempSubMerchantIds.contains(subMerchantId)
&& !tempSubMchSource.contains(client.getString("client_moniker"))) {
client.put("temp_sub_merchant", true);
} }
} }
if (client.getIntValue("approve_result") == 1 if (client.getIntValue("approve_result") == 1
@ -526,9 +525,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期 int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
for (JSONObject partner : partners) { for (JSONObject partner : partners) {
String subMerchantId = partner.getString("sub_merchant_id"); String subMerchantId = partner.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMchId != null && tempSubMchId.contains(subMerchantId) if (subMerchantId != null ) {
&& !tempSubMchSource.contains(partner.getString("client_moniker"))) { partner.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
partner.put("temp_sub_merchant", true);
} }
if (partner.getIntValue("approve_result") == 2) { if (partner.getIntValue("approve_result") == 2) {
partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays)); partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays));
@ -3220,6 +3218,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
clientModifySupport.processClientConfigModify(new PaypadVersionModify(manager, clientMoniker, paypad_version)); clientModifySupport.processClientConfigModify(new PaypadVersionModify(manager, clientMoniker, paypad_version));
clientInfoCacheSupport.clearClientMonikerConfigCache(clientMoniker);
}
@Override
public void changeCBBankPaymentPage(JSONObject manager, String clientMoniker, String paypad_version) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("cbbank_paypad_version", paypad_version);
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientMonikerConfigCache(clientMoniker);
} }
@Override @Override
@ -3327,7 +3339,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
clientModifySupport.processClientConfigModify(new PaypadVersionModify(account, client.getString("client_moniker"), paypad_version)); clientModifySupport.processClientConfigModify(new PaypadVersionModify(account, client.getString("client_moniker"), paypad_version));
clientInfoCacheSupport.clearClientMonikerConfigCache(client.getString("client_moniker"));
}
@Override
public void changeCBBankPaymentPage(JSONObject account, String paypad_version) {
int clientId = account.getIntValue("client_id");
JSONObject client = getClientInfo(clientId);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("cbbank_paypad_version", paypad_version);
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientMonikerConfigCache(client.getString("client_moniker"));
} }
@Override @Override
@ -4911,6 +4936,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Cacheable("common_sub_mch_id:")
public boolean checkSubMerchantIdInCommonPool(String subMerchantId) {
JSONObject json = commonSubMerchantIdMapper.find(subMerchantId);
return json != null;
}
@Override @Override
public JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query) { public JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query) {
JSONObject params = query.toJsonParam(); JSONObject params = query.toJsonParam();
@ -4926,9 +4957,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期 int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
for (JSONObject partner : partners) { for (JSONObject partner : partners) {
String subMerchantId = partner.getString("sub_merchant_id"); String subMerchantId = partner.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMchId != null && tempSubMchId.contains(subMerchantId) if (subMerchantId != null) {
&& !tempSubMchSource.contains(partner.getString("client_moniker"))) { partner.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
partner.put("temp_sub_merchant", true);
} }
if (partner.getIntValue("approve_result") == 2) { if (partner.getIntValue("approve_result") == 2) {
partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays)); partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays));

@ -0,0 +1,29 @@
package au.com.royalpay.payment.manage.merchants.entity.impls;
import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify;
import com.alibaba.fastjson.JSONObject;
/**
* Create by yixian at 2018-04-12 16:43
*/
public class CBBankPaypadVersionModify extends ClientConfigModify {
private String cbbank_paypad_version;
public CBBankPaypadVersionModify(JSONObject account, String clientMoniker, String paypad_version) {
super(account, clientMoniker);
this.cbbank_paypad_version = paypad_version;
}
@Override
protected String business() {
return "";
}
@Override
protected JSONObject getModifyResult() {
JSONObject modify = new JSONObject();
modify.put("cbbank_paypad_version", cbbank_paypad_version);
return modify;
}
}

@ -321,6 +321,11 @@ public class PartnerManageController {
clientManager.changePaymentPage(manager, clientMoniker, pass.getString("paypad_version")); clientManager.changePaymentPage(manager, clientMoniker, pass.getString("paypad_version"));
} }
@ManagerMapping(value = "/{clientMoniker}/cbbank_payment_page_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void changeCBBankPaymentPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changeCBBankPaymentPage(manager, clientMoniker, pass.getString("cbbank_paypad_version"));
}
@ManagerMapping(value = "/{clientMoniker}/paysuccess_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientMoniker}/paysuccess_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void changePaymentSuccessPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void changePaymentSuccessPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changePaymentSuccessPage(manager, clientMoniker, pass.getString("paysuccess_version")); clientManager.changePaymentSuccessPage(manager, clientMoniker, pass.getString("paysuccess_version"));

@ -395,6 +395,12 @@ public class PartnerViewController {
clientManager.changePaymentPage(account, pass.getString("paypad_version")); clientManager.changePaymentPage(account, pass.getString("paypad_version"));
} }
@PartnerMapping(value = "/cbbank_payment_page_version", method = RequestMethod.PUT)
@ResponseBody
public void changeCBBankPaymentPage(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.changeCBBankPaymentPage(account, pass.getString("cbbank_paypad_version"));
}
@PartnerMapping(value = "/qrcode_surcharge", method = RequestMethod.PUT) @PartnerMapping(value = "/qrcode_surcharge", method = RequestMethod.PUT)
@ResponseBody @ResponseBody
public void changeQRCodePaySurCharge(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { public void changeQRCodePaySurCharge(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {

@ -766,7 +766,9 @@
if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount, if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount,
if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge, if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge,
if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge, if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge,
t.order_id t.order_id,
t.org_rate,
t.surcharge_cashback
from pmt_transactions t from pmt_transactions t
INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1 INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1
AND so.type = 0 AND so.type = 0

@ -553,43 +553,89 @@
fbc.bd_name, fbc.bd_name,
fbc.bd_group, fbc.bd_group,
fbc.bd_type, fbc.bd_type,
count( * ) clients_month sum( a.proportion ) clients_month
FROM FROM
sys_clients sc sys_client_bd a
INNER JOIN sys_client_bd d ON sc.client_id = d.client_id INNER JOIN (
INNER JOIN financial_bd_config c ON d.bd_id = c.manager_id SELECT
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group bd_id,
max( create_time ) create_time
FROM
sys_client_bd
WHERE WHERE
sc.org_id = 1 client_id IN (
AND sc.create_time &gt;= #{start_date_month} SELECT
AND d.is_valid = 1 client_id
AND c.bd_group IS NOT NULL FROM
AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( ) sys_clients c
WHERE
c.approve_time &gt;= #{start_date_month}
AND c.approve_time &lt;= #{end_date}
AND c.is_valid = 1
AND c.approve_result = 1
AND c.org_id = 1
)
AND start_date &lt;= #{end_date} AND is_valid = 1 AND ( end_date &gt; #{start_date_month}
OR end_date IS NULL
) )
GROUP BY GROUP BY
fbc.bd_type bd_id,
client_id
) b ON a.bd_id = b.bd_id
AND a.create_time = b.create_time
INNER JOIN financial_bd_config c ON a.bd_id = c.manager_id
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group
WHERE
a.is_valid = 1
GROUP BY
fbc.bd_group
ORDER BY
clients_month DESC
) t1 ) t1
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
count( * ) clients_yesterday, fbc.bd_name,
fbc.bd_group fbc.bd_group,
fbc.bd_type,
sum( a.proportion ) clients_yesterday
FROM FROM
sys_clients sc sys_client_bd a
INNER JOIN sys_client_bd d ON sc.client_id = d.client_id INNER JOIN (
INNER JOIN financial_bd_config c ON d.bd_id = c.manager_id SELECT
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group bd_id,
max( create_time ) create_time
FROM
sys_client_bd
WHERE
client_id IN (
SELECT
client_id
FROM
sys_clients c
WHERE WHERE
sc.org_id = 1 c.approve_time &gt;= #{start_date}
AND sc.create_time &gt;= #{start_date} AND c.approve_time &lt; #{end_date}
AND sc.create_time &lt; #{end_date} AND c.is_valid = 1
AND d.is_valid = 1 AND c.approve_result = 1
AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( ) AND c.org_id = 1
)
AND start_date &lt;= #{end_date} AND is_valid = 1 AND ( end_date &gt; #{start_date}
OR end_date IS NULL
) )
GROUP BY GROUP BY
fbc.bd_type bd_id,
) t2 ON t1.bd_group = t2.bd_group client_id
) b ON a.bd_id = b.bd_id
AND a.create_time = b.create_time
INNER JOIN financial_bd_config c ON a.bd_id = c.manager_id
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group
WHERE WHERE
t1.bd_type IN ( 1, 2, 6, 7 ) a.is_valid = 1
GROUP BY
fbc.bd_group
ORDER BY
clients_yesterday DESC
) t2 ON t1.bd_group = t2.bd_group
</select> </select>
<select id="clientPayTypeInfoByClientIdRange" resultType="com.alibaba.fastjson.JSONObject"> <select id="clientPayTypeInfoByClientIdRange" resultType="com.alibaba.fastjson.JSONObject">

@ -29,8 +29,8 @@
<body> <body>
<div class="weui-tab"> <div class="weui-tab">
<div class="weui-navbar"> <div class="weui-navbar">
<a class="weui-navbar__item weui-bar__item_on">收入</a> <a class="weui-navbar__item weui-bar__item_on">交易</a>
<a class="weui-navbar__item">支出</a> <!--<a class="weui-navbar__item">支出</a>-->
<a class="weui-navbar__item">KPI</a> <a class="weui-navbar__item">KPI</a>
</div> </div>
<div class="weui-tab__panel"> <div class="weui-tab__panel">
@ -94,46 +94,46 @@
</div> </div>
<div class="tabcontent" style="display: none;"> <!--<div class="tabcontent" style="display: none;">-->
<div class="weui-panel"> <!--<div class="weui-panel">-->
<div class="weui-panel__hd">运营支出</div> <!--<div class="weui-panel__hd">运营支出</div>-->
<div class="weui-panel__ft"> <!--<div class="weui-panel__ft">-->
<div class="weui-cell"> <!--<div class="weui-cell">-->
<div class="weui-cell__bd weui-cell_primary">红包(¥)</div> <!--<div class="weui-cell__bd weui-cell_primary">红包(¥)</div>-->
<div class="weui-cell__ft" th:text="${report.debit.redpack.value}"></div> <!--<div class="weui-cell__ft" th:text="${report.debit.redpack.value}"></div>-->
</div> <!--</div>-->
<div class="weui-cell"> <!--<div class="weui-cell">-->
<div class="weui-cell__bd weui-cell_primary">较昨天比较</div> <!--<div class="weui-cell__bd weui-cell_primary">较昨天比较</div>-->
<div class="weui-cell__ft"> <!--<div class="weui-cell__ft">-->
<span style="color: green" th:if="${report.debit.redpack.compare>0}" <!--<span style="color: green" th:if="${report.debit.redpack.compare>0}"-->
th:text="'↑'+${report.debit.redpack.compare_value}"></span> <!--th:text="'↑'+${report.debit.redpack.compare_value}"></span>-->
<span style="color: red" th:if="${report.debit.redpack.compare<0}" <!--<span style="color: red" th:if="${report.debit.redpack.compare<0}"-->
th:text="'↓'+${report.debit.redpack.compare_value}"></span> <!--th:text="'↓'+${report.debit.redpack.compare_value}"></span>-->
<span th:if="${report.debit.redpack.compare==0}" <!--<span th:if="${report.debit.redpack.compare==0}"-->
th:text="${report.debit.redpack.compare_value}"></span> <!--th:text="${report.debit.redpack.compare_value}"></span>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
<div class="weui-panel"> <!--<div class="weui-panel">-->
<div class="weui-panel__hd">周末费率优惠</div> <!--<div class="weui-panel__hd">周末费率优惠</div>-->
<div class="weui-panel__ft"> <!--<div class="weui-panel__ft">-->
<div class="weui-cell"> <!--<div class="weui-cell">-->
<div class="weui-cell__bd weui-cell_primary">返现A$</div> <!--<div class="weui-cell__bd weui-cell_primary">返现A$</div>-->
<div class="weui-cell__ft" th:text="${report.debit.cashback.value}"></div> <!--<div class="weui-cell__ft" th:text="${report.debit.cashback.value}"></div>-->
</div> <!--</div>-->
<div class="weui-cell"> <!--<div class="weui-cell">-->
<div class="weui-cell__bd weui-cell_primary">较昨天比较</div> <!--<div class="weui-cell__bd weui-cell_primary">较昨天比较</div>-->
<div class="weui-cell__ft"> <!--<div class="weui-cell__ft">-->
<span style="color: green" th:if="${report.debit.cashback.compare>0}" th:text="'↑'+${report.debit.cashback.compare_value}"></span> <!--<span style="color: green" th:if="${report.debit.cashback.compare>0}" th:text="'↑'+${report.debit.cashback.compare_value}"></span>-->
<span style="color: red" th:if="${report.debit.cashback.compare<0}" th:text="'↓'+${report.debit.cashback.compare_value}"></span> <!--<span style="color: red" th:if="${report.debit.cashback.compare<0}" th:text="'↓'+${report.debit.cashback.compare_value}"></span>-->
<span th:if="${report.debit.cashback.compare==0}" th:text="${report.debit.cashback.compare_value}"></span> <!--<span th:if="${report.debit.cashback.compare==0}" th:text="${report.debit.cashback.compare_value}"></span>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
<div class="tabcontent" style="display: none;"> <div class="tabcontent" style="display: none;">
<div class="weui-panel"> <div class="weui-panel">
<div class="weui-panel__hd">KPI进度</div> <div class="weui-panel__hd">KPI进度</div>

@ -206,7 +206,6 @@
<div class="row padding" style="position: relative"> <div class="row padding" style="position: relative">
<div class="col-xs-8 text-left"> <div class="col-xs-8 text-left">
<img src="static/images/logo_new.jpg" class="img-block logo"> <img src="static/images/logo_new.jpg" class="img-block logo">
<p>联系人: Locky Ge</p>
<p>Phone: +61 03 9448 8865</p> <p>Phone: +61 03 9448 8865</p>
<p>Email: info@royalpay.com.au</p> <p>Email: info@royalpay.com.au</p>
<p>Address: Level 11/15 William st</p> <p>Address: Level 11/15 William st</p>

@ -881,7 +881,7 @@ margin-bottom: 10%;"/>
</li> </li>
</ul> </ul>
</li> </li>
<li ng-if="currentUser.client.client_moniker=='PINE' || currentUser.client.client_moniker=='LMEN'"> <li>
<ul> <ul>
<li> <li>
<a ui-sref="cashiers"> <a ui-sref="cashiers">

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -2129,6 +2129,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
}; };
$scope.changeCBBankPaymentPage = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_payment_page_version', {cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change CBBank Payment Page Version',
content: resp.data.message,
type: 'error'
})
})
};
// 更改支付成功页 // 更改支付成功页
$scope.changePaySuccessPage = function () { $scope.changePaySuccessPage = function () {
if (!$scope.paymentInfo) { if (!$scope.paymentInfo) {

@ -758,6 +758,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}) })
}) })
};
$scope.changeCBBankPaymentPage = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/client/partner_info/cbbank_payment_page_version', {cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version}).then(function () {
// $scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change Payment Page Version',
content: resp.data.message,
type: 'error'
})
})
}; };
$scope.saveCustomerSurchargeRate = function (cofig) { $scope.saveCustomerSurchargeRate = function (cofig) {
if (cofig != null && isNaN(cofig)) { if (cofig != null && isNaN(cofig)) {

@ -311,7 +311,6 @@
</a> </a>
</p> </p>
</div> </div>
<!--<div style="padding-top: 30px;padding-left: 20%;text-align: center">--> <!--<div style="padding-top: 30px;padding-left: 20%;text-align: center">-->
<!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/pc_hf_pay_step1.png" class="img-responsive" ng-click="reset();toPcFirst();toPcShow()"/>--> <!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/pc_hf_pay_step1.png" class="img-responsive" ng-click="reset();toPcFirst();toPcShow()"/>-->
<!--<span style="font-size:9px;">微信/支付宝电脑端</span>--> <!--<span style="font-size:9px;">微信/支付宝电脑端</span>-->
@ -365,6 +364,22 @@
<!--</span>--> <!--</span>-->
<!--</div>--> <!--</div>-->
</div> </div>
<div class="form-group col-sm-6" ng-if="paymentInfo.enable_cb_bankpay">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()" ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'" src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'" src="/static/images/cbbank_payment_page_v2.jpg">
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -450,6 +450,23 @@
</p> </p>
</div> </div>
</div> </div>
<div class="form-group col-sm-6" ng-if="paymentInfo.enable_cb_bankpay">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()" ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'" src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'" src="/static/images/cbbank_payment_page_v2.jpg">
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -0,0 +1,719 @@
.header-banner {
background: url(/static/images/pay_v4_banner.png) no-repeat;
background-size: 92% 100%;
background-position: center;
box-shadow: 0 0 10px #dddddd inset;
}
.merchant-title {
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #4A4A4A;
letter-spacing: 0;
}
.line {
padding-left: 30px;
color: #FFD194;
}
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
div, span, p, ul, li {
box-sizing: border-box;
}
.warning-sm {
color: red;
font-size: 10px;
transform-origin: left;
transform: scale(0.8);
}
.weui_grid {
padding: 7px;
height: 53px;
}
.ff.key {
position: relative;
}
.ff {
font-size: 26px;
color: #FFFFFF;
}
.ff img {
margin: 10px auto;
display: block;
width: 34px;
}
div.wait {
top: 0;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
position: absolute;
vertical-align: middle;
text-align: center;
bottom: 0;
opacity: .5;
background-color: gray;
z-index: 10000;
}
.bisnam {
font-size: 16px;
color: #aaaaaa;
text-align: left;
padding: 0;
}
.rmbcurrency {
font-size: 13px;
color: #FFFFFF;
vertical-align: text-bottom;
line-height: 38px;
padding-left: 10px;
}
.static .rmbcurrency {
font-size: 14px;
line-height: 30px;
}
.rmbvalue {
font-size: 24px;
color: #FFFFFF;
vertical-align: text-bottom;
float: right;
}
.rmbvalue:before {
content: '≈¥';
font-size: 16px;
}
.paydetail {
float: right;
margin-top: 5px;
margin-left: 5px;
}
.static .rmbvalue {
font-size: 18px;
}
.currency {
font-size: 40px;
color: #FFFFFF;
/* line-height: 67px; */
vertical-align: text-bottom;
padding-left: 10px;
}
.static .currency {
color: #FFFFFF;
font-size: 25px;
}
.value {
font-size: 50px;
line-height: 66px;
color: #FFFFFF;
margin-left: -5px;
vertical-align: text-bottom;
padding-right: 10px;
}
.static .value {
color: #FFFFFF;
font-size: 24px;
}
input.value {
background: transparent;
border: none;
line-height: 50px;
}
input.value:active {
background: transparent;
}
input.value:focus {
border: none;
outline: none;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
}
.pp {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow-x: hidden;
background-color: #fbf9fe;
}
.new_year {
width: 100%;
height: 100%;
position: absolute;
top: 18%;
left: 0;
z-index: -1;
border-radius: 0 0 25px 25px;
}
.bankpay {
text-align: center;
padding: 20px;
color: #FFFFFF;
}
@media screen and (max-height: 520px) {
.bankpay {
text-align: center;
padding: 0;
color: #FFFFFF;
}
}
.row {
width: 100%;
padding: 0 20px;
}
.hidden {
display: none;
}
.hide-keyboard-btn {
width: 100%;
}
.hide-keyboard-btn:after {
content: '';
transform: rotate(45deg);
border-right: 2px solid #ccc;
border-bottom: 2px solid #ccc;
width: 30px;
height: 30px;
transform-origin: center;
display: block;
margin: auto;
}
.remark-box.visible {
display: block;
}
.remark-box.visible .remark-input {
font-size: 1.4em;
border: none;
background: #fff;
}
.white-box {
background: #fff;
width: 96%;
margin: 10px auto;
display: block;
position: relative;
padding: 0 10px;
box-sizing: border-box;
}
.white-box.full {
width: 100%;
}
.logo-box .banner {
width: 100%;
display: block;
}
.logo {
margin: auto;
display: block;
max-height: 60px;
max-width: 80%;
}
.logo-small {
max-height: 100px;
}
.currencyrow {
box-sizing: border-box;
margin-top: 0;
text-align: left;
margin-bottom: 0px;
position: relative;
}
@media screen and (max-height: 670px) {
.currencyrow {
box-sizing: border-box;
margin-top: 0;
text-align: left;
margin-bottom: 0px;
}
}
@media screen and (max-height: 520px) {
.currencyrow {
box-sizing: border-box;
margin-top: 20px;
text-align: center;
margin-bottom: 20px;
}
}
.currencyrow:after {
content: '';
display: block;
clear: both;
}
.currencyrow > * {
display: inline-block;
vertical-align: bottom;
margin-bottom: 0;
box-sizing: border-box;
}
.remark-input {
width: 100%;
font-size: 26px;
border-radius: 0;
outline: none;
}
.remark-box {
display: none;
}
.remark-box .remark-mask {
text-align: center;
height: 50px;
font-size: 0.9em;
line-height: 35px;
color: #ccc;
}
.remark-label {
position: absolute;
top: 5px;
right: 5px;
font-size: 20px;
z-index: 1;
font-weight: bold;
color: #0d6aad;
}
.coupons {
width: 100%;
}
.coupons > li {
display: block;
width: 100%;
float: none;
color: #888888;
border-bottom: 1px dashed #aaa;
padding: 5px 0px;
}
.coupons > li:after {
content: '';
clear: both;
display: block
}
.coupons > li:last-child {
border: none;
}
.coupons .title, .coupons .desc, .coupons label {
display: block;
}
.coupons .coupon-content {
display: block;
float: left;
}
.coupons .title {
font-weight: bold;
font-size: 1em;
}
.coupons .use-check {
position: relative;
display: block;
width: 25px;
background-repeat: no-repeat;
height: 25px;
background-size: contain;
float: right;
margin-right: 5px;
margin-top: 10px;
}
.coupons .use-check.checked {
background-image: url(/static/images/checkbox-checked.png);
}
.coupons .use-check.unchecked {
background-image: url(/static/images/checkbox-unchecked.png);
}
.coupons .use-check.disabled {
background-image: url(/static/images/checkbox-disabled.png) !important;
}
.coupons .desc {
font-size: 1em;
}
.weui-wepay-logos {
background: transparent;
}
.row.weui_grids:before, .row.weui_grids .weui_grid:before, .row.weui_grids .weui_grid:after {
display: none;
}
.button_sp_area {
display: block;
position: relative;
margin-top: 10px;
}
.button_sp_area:after {
content: '';
clear: both;
display: block;
}
.button_sp_area a {
height: 50px;
line-height: 50px;
padding: 0px;
font-family: Helvetica;
font-size: 20px;
float: left;
text-align: center;
border-radius: 0;
color: #fff;
}
.button_sp_area .paynow {
width: 65%;
background: #FEB900;
}
.button_sp_area.alipay .paynow {
background-color: #FEB900;
}
.button_sp_area.rpay .paynow {
background-color: #FEB900;
}
.button_sp_area .remark-btn {
width: 35%;
background: #FF9705
}
.pay-brands {
text-align: center;
line-height: 20px;
font-size: 24px;
margin-top: 64px;
color: #dddddd;
}
.pay-brands img {
height: 18px;
}
.pay-brands img.wechat-logo {
height: 14px;
}
.weui_dialog_bd .final {
font-weight: bold;
}
#coupon-box-toggle {
padding: 0 20px;
margin-bottom: 10px;
text-align: right;
color: #30af69;
font-size: 12px;
cursor: pointer;
}
.coupons-container {
position: fixed;
z-index: 1;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
display: none;
}
.coupons-container.show {
display: block;
}
.coupons-container > .coupons-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, .6);
z-index: 1;
}
.coupons-container > .coupon-box {
position: fixed;
z-index: 4;
left: 50%;
top: 50%;
width: 95%;
background: #fff;
padding: 10px;
transform: translate(-50%, -50%);
}
.coupons-container .coupon-box-title {
width: 100%;
display: block;
background: #fff;
padding: 0 10px 5px;
font-size: 14px;
border-bottom: 1px solid #d0d0d0;
}
.coupons-container .coupon-box-title:after {
content: '';
display: block;
clear: both;
}
.coupons-container .coupon-box-title > .title {
float: left;
display: block;
color: #0BB20C;
}
.coupons-container .coupon-box-title > #close-coupon-box {
color: #700;
float: right;
display: block;
cursor: pointer;
}
.actCharity-red {
color: #FB5252;
display: inline;
}
.actCharity {
display: inline;
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #000000;
letter-spacing: 0;
text-align: center;
}
.remark-textarea {
font-size: 18px;
-webkit-appearance: none;
width: calc(100% - 24px);
height: 78px;
border: 1px solid #EBE8E8;
padding: 14px 12px;
margin-bottom: 24px;
}
.remark-textarea::-webkit-input-placeholder {
font-size: 13px;
color: #BCBCBC;
}
.paynow-button {
width: 245px;
display: block;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
height: 48px;
line-height: 48px;
position: absolute;
bottom: -24px;
left: 50%;
transform: translateX(-50%);
background: #FF6600;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.10);
border-radius: 24px;
}
.bankpay-button {
border: 1px solid #FF6600;
border-radius: 3px;
font-size: 16px;
color: #FF6600;
letter-spacing: 0;
text-align: center;
display: block;
height: 48px;
line-height: 48px;
background-color: white;
}
#coupon-box-toggle.canUse-coupon {
padding: 0 30px;
margin-bottom: 10px;
text-align: right;
color: #FF6600;
font-size: 12px;
cursor: pointer;
margin: 11px;
}
.pay-center-ctn {
margin-top: 30px;
background: #FFFFFF;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.10);
border-radius: 2px;
padding: 20px;
position: relative;
}
.payment-input {
border-radius: 2px;
width: 54%;
height: 64px;
font-family: PingFang-SC-Heavy;
font-size: 25px;
color: #000000;
letter-spacing: 2.4px;
border-style:none;
}
.payment-input::-webkit-input-placeholder {
color: #000;
}
.paymengt-tips {
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #000000;
letter-spacing: 0;
margin: 15px 7px;
}
.payment-pro-input {
font-size: 17px;
-webkit-appearance: none;
border: 1px solid #EBE8E8;
width: calc(100% - 24px);
height: 30px;
margin-bottom: 15px;
padding: 14px 12px
}
.payment-pro-input::-webkit-input-placeholder {
font-size: 12px;
color: #BCBCBC;
}
.pay-center-img {
display: inline-block;
vertical-align: middle;
width: 81px;
}
.pay-center-title {
display: inline-block;
vertical-align: middle;
margin-left: 11px;
}
.pay-center-dropdown {
width: 100px;
height: 64px;
background: #FF6600;
text-align: center;
line-height: 64px;
position: absolute;
right: 0;
}
.dropdown-icon {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTYxMDgzNDM4ODM1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMzNDciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTQ2NS4wOTQyMDIgODExLjk1MDQ5IDY5LjY0OTgwMSAzOTguNjQwMTg2Yy0xNC4xNzg5MzEtMTMuNTU5ODMtMTQuMTc4OTMxLTM1LjU1Mzc1MSAwLTQ5LjExOTcyMSAxNC4xNjU2MjgtMTMuNTY1OTcgMzcuMTMzNzM1LTEzLjU2NTk3IDUxLjMwNTUwMyAwbDM3MS42MTQ2NjkgMzg4LjQwMzAzMSAzNzEuNjIxODMyLTM4OC40MDMwMzFjMTQuMTczODE0LTEzLjU2NTk3IDM3LjE0MDg5OC0xMy41NjU5NyA1MS4zMTM2ODkgMCAxNC4xNzE3NjggMTMuNTY1OTcgMTQuMTcxNzY4IDM1LjU1OTg5IDAgNDkuMTE5NzIxTDUyMC4wNDY3NjggODExLjk1MDQ5Yy03LjU1NjA5MyA3LjIzMDY4Mi0xNy41ODU1MTcgMTAuMzIyMDktMjcuNDc2Nzk1IDkuODI3ODMzQzQ4Mi42Nzg2OTYgODIyLjI3MjU3OSA0NzIuNjQ5MjcyIDgxOS4xODIxOTQgNDY1LjA5NDIwMiA4MTEuOTUwNDl6IiBwLWlkPSIzMzQ4IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+");
background-size: 13px 13px;
width: 13px;
height: 13px;
display: inline-block;
margin-left: 5px;
}
.rotate-180 {
transform: rotate(180deg);
}
.pay-center-dropdown-ctn {
display: none;
background: #FF6600;
color: #fff;
}
.currency{
padding-left: 6px;
height: 52px;
width: 30px;
font-family: PingFang-SC-Heavy;
font-size: 25px;
color: #000000;
letter-spacing: 2.4px;
text-align: center;
}
.logo-div {
max-width: 34%;
display: inline-block;
max-height: 60px;
padding-top: 10px;
}
.merchant-div{
display: inline-block;
padding-left: 10px;
padding-top: 20px;
}

@ -0,0 +1,89 @@
var num = function (obj) {
obj.value = obj.value.replace(/[^\d.]/g, "");
obj.value = obj.value.replace(/^\./g, "");
obj.value = obj.value.replace(/\.{2,}/g, ".");
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
if(obj.value.indexOf(".")< 0 && obj.value !==""){
obj.value= parseFloat(obj.value);
}
var surchargeData = calculateSurcharge(obj.value - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select_currency').val()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 === 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
function onChange(str,num) {
return str.length === num;
}
$(document).ready(function () {
$('.surcharge').hide();
$('#commit-btn').click(function () {
var currency = $('#select_currency option:selected').val();
var price = $('#price').val();
var product = $('#product').val();
var remark = $('#remark').val();
if (price == null || onChange(price, 0)) {
alert('请填写订单金额');
return;
}
if (price - 0 === 0) {
alert('金额不能为0');
return;
}
if (product == null || product.length === 0) {
alert('请填写真实的商品名称');
return;
}
$('#commit-btn').addClass('hidden');
$('#commit-btn-loading').removeClass('hidden');
var jsonData = {
user_id: window.customer_id,
price: price,
currency: currency,
gateway_type: 8,
description:remark,
product_name:product
};
$.ajax({
url: '/api/v1.0/lakala_pay/partners/' + window.client_moniker + '/submit',
method: 'put',
data: JSON.stringify(jsonData),
contentType: 'application/json',
dataType: 'json',
success: function (res) {
if(res.return_code !== 'SUCCESS'){
alert(res.message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}else {
location.href = res.pay_url+'?'+res.sign_url;
// const $form = $(res.formString);
// $('body').append($form);
// $form.submit();
// $('body').removeChildren($form);
}
},
error: function (jqXHR) {
alert(JSON.parse(jqXHR.responseText).message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}
})
});
});

@ -45,6 +45,11 @@ $(document).ready(function () {
return; return;
} }
if (product == null || product.length === 0) {
alert('请填写真实的商品名称');
return;
}
$('#commit-btn').addClass('hidden'); $('#commit-btn').addClass('hidden');
$('#commit-btn-loading').removeClass('hidden'); $('#commit-btn-loading').removeClass('hidden');

@ -0,0 +1,121 @@
var num = function (obj) {
obj.value = obj.value.replace(/[^\d.]/g, "");
obj.value = obj.value.replace(/^\./g, "");
obj.value = obj.value.replace(/\.{2,}/g, ".");
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
if(obj.value.indexOf(".")< 0 && obj.value !=""){
obj.value= parseFloat(obj.value);
}
var surchargeData = calculateSurcharge(obj.value - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select-display').text()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 == 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
var changeCurrencyCheckNum = function (obj) {
var surchargeData = calculateSurcharge(obj.val() - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select-display').text()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 == 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
function onChange(str,num) {
if (str.length == num) {
return true;
}
return false;
}
$(document).ready(function () {
$('.pay-center-dropdown-ctn').on('click', function () {
if ($('#select-change').text() == "CNY") {
$('#select-display').html("CNY");
$('#select-change').html("AUD");
$('.currency').html("¥");
changeCurrencyCheckNum($('#price'));
}else {
$('#select-display').html("AUD");
$('#select-change').html("CNY");
$('.currency').html("$");
changeCurrencyCheckNum($('#price'));
}
$('.pay-center-dropdown-ctn').toggle();
});
$('.surcharge').hide();
$('#commit-btn').click(function () {
var product = $('#product').val();
var price = $('#price').val();
var remark = $('#remark').val();
var currency = $('#select_currency option:selected').val();
if (price == null || onChange(price,0)) {
alert('请填写订单金额');
return;
}
if (price-0 ==0) {
alert('金额不能为0');
return;
}
if (product == null || product.length === 0) {
alert('请填写真实的商品名称');
return;
}
$('#commit-btn').addClass('hidden');
$('#commit-btn-loading').removeClass('hidden');
var jsonData = {
user_id: window.customer_id,
price: price,
currency: currency,
product_name:product,
description:remark
};
$.ajax({
url: '/api/v1.0/yeepay/partners/' + window.client_moniker + '/share',
method: 'put',
data: JSON.stringify(jsonData),
contentType: 'application/json',
dataType: 'json',
success: function (res) {
if(res.return_code != 'SUCCESS'){
alert(res.message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}else {
location.href = res.pay_url+'?'+res.sign_url;
}
},
error: function (jqXHR) {
alert(JSON.parse(jqXHR.responseText).message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}
})
});
});

@ -245,15 +245,13 @@ input.value:focus {
.logo-box .banner { .logo-box .banner {
width: 100%; width: 100%;
display: block;
} }
.logo { .logo {
margin: auto; margin: auto;
display: block; display: block;
margin-top: 20px;
max-height: 60px; max-height: 60px;
max-width: 80%; max-width: 100%;
} }
.logo-small { .logo-small {
@ -622,3 +620,16 @@ input::-webkit-input-placeholder{
line-height: 60px; line-height: 60px;
vertical-align: text-bottom; vertical-align: text-bottom;
} }
.logo-div {
max-width: 34%;
display: inline-block;
max-height: 60px;
padding-top: 10px;
}
.merchant-div{
display: inline-block;
padding-left: 10px;
padding-top: 20px;
}

Loading…
Cancel
Save