[Y] update upay

master
taylor.dang 5 years ago
parent 540fa49575
commit d42a6fdcf6

@ -5,14 +5,14 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.1.41</version>
<version>2.1.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.3.1</version>
<version>2.3.2</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>
<jib-maven-plugin.version>2.2.0</jib-maven-plugin.version>
<docker-image.version>${project.version}</docker-image.version>
</properties>
@ -247,9 +247,11 @@
<tag>${docker-image.version}</tag>
</tags>
</to>
<extraDirectory>
<path>extra/</path>
</extraDirectory>
<extraDirectories>
<paths>
<path>extra/</path>
</paths>
</extraDirectories>
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
@ -277,11 +279,14 @@
<image>hkccr.ccs.tencentyun.com/rpay/serverjre:openj9</image>
</from>
<to>
<image>hkccr.ccs.tencentyun.com/cross-payment-dev/manage-dev:${docker-image.version}</image>
<image>hkccr.ccs.tencentyun.com/cross-payment-dev/manage-dev:${docker-image.version}
</image>
</to>
<extraDirectory>
<path>extra/</path>
</extraDirectory>
<extraDirectories>
<paths>
<path>extra/</path>
</paths>
</extraDirectories>
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
@ -311,9 +316,11 @@
<to>
<image>hkccr.ccs.tencentyun.com/rpay/manage:${docker-image.version}</image>
</to>
<extraDirectory>
<path>extra/</path>
</extraDirectory>
<extraDirectories>
<paths>
<path>extra/</path>
</paths>
</extraDirectories>
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>

@ -20,6 +20,9 @@ public interface ClientRateMapper {
List<JSONObject> listClientRates(@Param("client_id") int clientId, @Param("rate_name") String rateName);
@AutoSql(SqlType.SELECT)
JSONObject findRateByRateId(@Param("client_rate_id") String rateId);
@AutoSql(SqlType.INSERT)
void saveRate(JSONObject rateConfig);
@ -39,23 +42,22 @@ public interface ClientRateMapper {
@Param("clean_days") Integer cleanDays, @Param("rate_name") String rateName);
List<JSONObject> latestConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);
List<JSONObject> latestConfig(@Param("client_id") int client_id, @Param("rate_name") String rate_name);
//Task
List<JSONObject> maxChannelExpiryTime(@Param("client_id")int client_id,@Param("rate_name")String rate_name);
List<JSONObject> maxChannelExpiryTime(@Param("client_id") int client_id, @Param("rate_name") String rate_name);
List<JSONObject> getAllExpiry(@Param("expiry_date")Date expiry_date);
List<JSONObject> getAllExpiry(@Param("expiry_date") Date expiry_date);
List<JSONObject> getAllClientRateExpiryMerchants();
void postponeMerchantRateByClientId(int clientId);
JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestChannelCleanDays(@Param("rate_name") String rate_name, @Param("client_id") int client_id);
JSONObject latestCardChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestCardChannelCleanDays(@Param("rate_name") String rate_name, @Param("client_id") int client_id);
JSONObject latestExpiryConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);
JSONObject latestExpiryConfig(@Param("client_id") int client_id, @Param("rate_name") String rate_name);
}

@ -86,16 +86,11 @@ public interface ClientManager {
void checkAndSendInitEmail(JSONObject manager, String clientMoniker);
void sendOpenEmail(final JSONObject client, String username, String pwd);
// void sendInitEmail(JSONObject account,JSONObject client, String username, String pwd);
void markApproveEmailSendStatus(String clientMoniker, JSONObject manager);
void checkEmailStatus();
void newCheckEmailStatus();
@Transactional
void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow);
@ -397,7 +392,7 @@ public interface ClientManager {
void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String promotionalEffectiveDate, int promotionalPeriod) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String rateid,HttpServletResponse httpResponse);
void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;

@ -33,14 +33,20 @@ import au.com.royalpay.payment.manage.gateway.core.GatewayMerchantApply;
import au.com.royalpay.payment.manage.kyc.enums.FilesAuthEnum;
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.log.*;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogClientSubMerchantIdMapper;
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.redpack.ActClientInvitationCodeMapper;
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.core.*;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
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.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.entity.impls.*;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum;
import au.com.royalpay.payment.manage.notice.core.MailService;
@ -102,6 +108,9 @@ import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.dom4j.Element;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@ -109,13 +118,11 @@ import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.context.MessageSource;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
@ -138,7 +145,6 @@ import java.security.InvalidParameterException;
import java.security.KeyPair;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.*;
@ -195,16 +201,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private OrgMapper orgMapper;
@Resource
private LogSettleMailMapper logSettleMailMapper;
@Resource
private CommoditiesMapper commoditiesMapper;
@Resource
private ActClientInvitationCodeMapper actClientInvitationCodeMapper;
@Resource
private MailService mailService;
// todo 作用
@Resource
private ClientComplyValidator[] validators;
@Resource
private ClientModifySupport clientModifySupport;
@ -260,8 +259,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientContractService clientContractService;
@Resource
private MessageSource messageSource;
@Resource
private ClientsOperationLogMapper clientsOperationLogMapper;
@Resource
private LogClientSubMerchantIdMapper logClientSubMerchantIdMapper;
@ -321,6 +318,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RPayMerchantMapper rPayMerchantMapper;
@Resource
private SysClientUpayProfileMapper sysClientUpayProfileMapper;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@Resource
@ -1310,73 +1308,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
public void sendOpenEmail(final JSONObject client, String username, String pwd) {
JSONObject model = new JSONObject();
model.put("username", username);
model.put("password", pwd);
model.put("client_moniker", client.getString("client_moniker"));
model.put("contact_person", client.getString("contact_person"));
model.put("credential_code", client.getString("credential_code"));
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
// todo Velocity
Context ctx = new Context();
ctx.setVariable("bds", bds);
ctx.setVariable("short_name", client.getString("short_name"));
ctx.setVariable("password", pwd);
ctx.setVariable("username", username);
ctx.setVariable("client_moniker", client.getString("client_moniker"));
ctx.setVariable("contact_person", client.getString("contact_person"));
ctx.setVariable("credential_code", client.getString("credential_code"));
final String content = thymeleaf.process("mail/new_client_notice", ctx);
// final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/new_client_notice.vm",
// "utf-8", model);
ctx.setVariable("password", "*****");
final String contentBd = thymeleaf.process("mail/new_client_notice", ctx);
final List<String> mailTos = new ArrayList<>();
String mailTo = client.getString("contact_email");
if (StringUtils.isEmpty(mailTo)) {
throw new EmailException("Client Contact Email is invalid");
}
mailTos.add(mailTo);
JSONObject clientLegal = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id"));
if (clientLegal != null && StringUtils.isNotBlank(clientLegal.getString("email"))) {
mailTos.add(clientLegal.getString("email"));
}
final List<String> emails = new ArrayList<>();
for (JSONObject bd : bds) {
String email = bd.getString("email");
if (StringUtils.isNotEmpty(email)) {
emails.add(email);
}
}
new Thread() {
@Override
public void run() {
try {
String emailId = mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", StringUtils.join(mailTos, ","), "", content);
mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", emails.isEmpty() ? "" : StringUtils.join(emails, ","),
"", contentBd);
JSONObject clientUpdate = new JSONObject();
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 3);
clientUpdate.put("approve_email_id", emailId);
clientMapper.update(clientUpdate);
} catch (Exception e) {
JSONObject clientUpdate = new JSONObject();
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 0);
clientUpdate.put("approve_email_id", null);
clientMapper.update(clientUpdate);
throw new EmailException("Email Sending Failed", e);
}
}
}.start();
}
public void sendInitEmail(final JSONObject client, String username, String pwd, boolean isUpayAuditPass) {
logger.debug("sending email after comply");
JSONObject model = new JSONObject();
@ -1386,7 +1317,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
model.put("contact_person", client.getString("contact_person"));
model.put("credential_code", client.getString("credential_code"));
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
// todo Velocity
Context ctx = new Context();
ctx.setVariable("bds", bds);
ctx.setVariable("short_name", client.getString("short_name"));
@ -1395,10 +1325,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
ctx.setVariable("client_moniker", client.getString("client_moniker"));
ctx.setVariable("contact_person", client.getString("contact_person"));
ctx.setVariable("credential_code", client.getString("credential_code"));
ctx.setVariable("card_approving", isUpayAuditPass);
final String content = thymeleaf.process("mail/new_client_notice", ctx);
// final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/new_client_notice.vm",
// "utf-8", model);
ctx.setVariable("password", "*****");
final String contentBd = thymeleaf.process("mail/new_client_notice", ctx);
final List<String> mailTos = new ArrayList<>();
@ -1457,32 +1386,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}.start();
}
/**
* public void sendInitEmail(JSONObject account, final JSONObject client, String username, String pwd) {
* logger.debug("sending email after comply"); JSONObject model = new JSONObject(); model.put("username", username);
* model.put("password", pwd); model.put("client_moniker", client.getString("client_moniker"));
* model.put("contact_person", client.getString("contact_person")); model.put("credential_code",
* client.getString("credential_code")); List<JSONObject> bds =
* clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date()); // todo Velocity Context
* ctx = new Context(); ctx.setVariable("bds", bds); ctx.setVariable("password", pwd); ctx.setVariable("username",
* username); ctx.setVariable("client_moniker", client.getString("client_moniker"));
* ctx.setVariable("contact_person", client.getString("contact_person")); ctx.setVariable("credential_code",
* client.getString("credential_code")); ctx.setVariable("short_name", client.getString("short_name")); final String
* content = thymeleaf.process("mail/new_client_notice", ctx); // final String content =
* VelocityEngineUtils.mergeTemplateIntoString(null, "mail/new_client_notice.vm", // "utf-8", model); final String
* mailTo = client.getString("contact_email"); if (StringUtils.isEmpty(mailTo)) { throw new EmailException("Client
* Contact Email is invalid"); } final Set<String> emails = new HashSet<>(); for (JSONObject bd : bds) { String
* email = bd.getString("email"); if (StringUtils.isNotEmpty(email)) { emails.add(email); } } new Thread() {
*
* @Override public void run() { try { SendMail sendMail = new SendMail(); Set<String> to = new HashSet<>();
* to.add(mailTo); sendMail.setFrom("info@mail.royalpay.com.au"); sendMail.setMailTos(to);
* sendMail.setMailCcs(emails); sendMail.setTitle("Your RoyalPay Cross-border Payment has been set up");
* sendMail.setContent(content); sendMail.setTags(tags); JSONObject mailResult =
* mailGunService.sendMail(sendMail); clientModifySupport.processClientModify(new EmailModify(account,
* client.getString("client_moniker"), 3, mailResult.getString("mail_id"))); } catch (Exception e) {
* clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 0,
* null)); throw new EmailException("Email Sending Failed", e); } } }.start(); }
*/
public void sendAuthInitEmail(JSONObject account, final JSONObject client) {
logger.debug("sending email after comply about a new partner opening by quick access");
@ -1587,37 +1490,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
public void newCheckEmailStatus() {
List<JSONObject> clients = clientMapper.listClientsWithEmailNotVerify();
for (JSONObject client : clients) {
try {
String emailId = client.getString("approve_email_id");
JSONObject status = mailSendMapper.find(emailId, client.getString("contact_email"));
if (status != null) {
int statusNo = status.getIntValue("status");
logger.debug("get mail status:" + emailId + "--" + statusNo);
int mailStatus = 3;
switch (statusNo) {
case 1:
mailStatus = 1;
break;
case 2:
mailStatus = 2;
break;
}
updateClientApproveEmailStatus(mailStatus, null, client.getString("client_moniker"));
} else {
logger.debug("get mail status:" + emailId + "-- none");
// updateClientApproveEmailStatus(client.getIntValue("client_id"), 0);
}
} catch (Exception e) {
logger.error("check email status failed", e);
}
}
}
@Override
public void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -1740,7 +1612,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject account = clientAccountMapper.findById(accountId);
if (clientMoniker != null) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
Assert.notNull(client);
//父商户全局管理子商户时候,跳过
if (account.getIntValue("client_id") != client.getIntValue("client_id")) {
//登录用户所属商户
@ -1863,7 +1734,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void togglePayNotice(JSONObject account, String clientMoniker, boolean enable) {
JSONObject partner = getClientInfoByMoniker(clientMoniker);
Assert.notNull(partner);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "enable_pay_notice", enable));
clientInfoCacheSupport.clearClientCache(partner.getIntValue("client_id"));
}
@ -2075,11 +1945,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
config.getDoubleValue("rate_value"), config.getInteger("clean_days"), channel).isEmpty()) {
return;
}
List<JSONObject> existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel);
for (JSONObject rateLog : existRate) {
rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1));
clientRateMapper.updateConfig(rateLog);
}
if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))) {
JSONObject extRateParams = new JSONObject() {{
put("domestic_rate_value", config.getBigDecimal("rate_value"));
@ -3112,12 +2977,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String promotionalEffectiveDate, int promotionalPeriod) throws ParseException {
public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String rateid, HttpServletResponse httpResponse) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
exportPromotionalOfferPDF(clientMoniker, manager, promotionalEffectiveDate, promotionalPeriod);
exportPromotionalOfferPDF(clientMoniker, manager, rateid, httpResponse);
}
@Override
@ -7137,7 +7002,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
//装在数据
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("down_date", formatter.print(new DateTime()));//下载文件日期
info.put("bussiness_name", (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " " + client.getString("abn"));//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
@ -7149,7 +7014,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
info.put("annual_rate", cardAnnualRate);//年费率
info.put("cost_per_transaction", clientRate.getString("transaction_fee"));//每次交易成本
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", upayProfileInfo.getBoolean("enable_international_card")?cardRate.getString("overseas_rate_value"):"-");//国际服务费
info.put("international_fee", upayProfileInfo.getBoolean("enable_international_card") ? cardRate.getString("overseas_rate_value") : "-");//国际服务费
BigDecimal reserve = (upayProfileInfo.getBigDecimal("expected_card_revenue").multiply(new BigDecimal(0.005)).setScale(0, RoundingMode.HALF_UP));
info.put("account_reserve", reserve.compareTo(new BigDecimal(200)) <= 0 ? new BigDecimal(200).toPlainString() : reserve.toPlainString());//账户储备金
//银行账号信息
@ -7160,15 +7025,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return info;
}
private void exportPromotionalOfferPDF(String clientMoniker, JSONObject manager, String promotionalEffectiveDate, int promotionalPeriod) throws ParseException {
Date date = DateUtils.parseDate(promotionalEffectiveDate, "yyyy-MM-dd");
JSONObject info = convertPromotionalOfferInfo(clientMoniker, convertDateEnglish(date), promotionalPeriod);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/promotional_offer.pdf";
private void exportPromotionalOfferPDF(String clientMoniker, JSONObject manager, String rateid, HttpServletResponse httpResponse) {
httpResponse.setContentType("application/pdf");
httpResponse.setHeader("content-disposition", "attachment;filename=" + clientMoniker + "_PROMOTIONAL_OFFER_" + new Date() + ".pdf");
JSONObject info = convertPromotionalOfferInfo(clientMoniker, rateid);
String pdfPath = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath() + "templates/pdf/promotional_offer.pdf";
String fileName = clientMoniker + "_Promotional_Offer.pdf";
publishExcelCardPDFFile(clientMoniker, manager, fileName, pdfPath, info, PROMOTIONAL_OFFER_FILE);
try (ServletOutputStream sos = httpResponse.getOutputStream()) {
File file = new File(fileName);
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(pdfPath);
pdu.setPdfTemplate(info);
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
sos.write(bos.toByteArray());
} catch (Exception e) {
throw new ServerErrorException();
}
}
private JSONObject convertPromotionalOfferInfo(String clientMoniker, String promotionalEffectiveDate, int promotionalPeriod) {
private JSONObject convertPromotionalOfferInfo(String clientMoniker, String rateid) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -7178,16 +7053,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The merchant failed the audit!");
}
int clientId = client.getInteger("client_id");
JSONObject clientRate = merchantInfoProvider.clientCurrentRate(clientId, new Date(), "rpaypmt_card");
if (clientRate == null) {
JSONObject currentRate = clientRateMapper.findRateByRateId(rateid);
if (currentRate == null) {
throw new BadRequestException("rpaypmt_card rate Not configured");
}
JSONObject cardRate = clientRate.getJSONObject("ext_rates");
JSONObject cardRate = currentRate.getJSONObject("ext_rates");
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(clientId);
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("down_date", formatter.print(new DateTime()));//下载文件日期
info.put("bussiness_name", (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " " + client.getString("abn"));//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
@ -7195,9 +7069,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("legal_bussiness", legalInfo.getString("representative_person") + " AS " + (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", upayProfileInfo.getBoolean("enable_international_card")?cardRate.getString("overseas_rate_value"):"-");//国际服务费
info.put("promotional_effective_date", promotionalEffectiveDate);
info.put("promotional_period", promotionalPeriod);
info.put("international_fee", upayProfileInfo.getBoolean("enable_international_card") ? cardRate.getString("overseas_rate_value") : "-");//国际服务费
info.put("promotional_effective_date", formatter.print(currentRate.getDate("active_time").getTime()));
info.put("promotional_period", formatter.print(currentRate.getDate("expiry_time").getTime()));
return info;
}
@ -7236,16 +7110,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
private String convertDateEnglish(Date date) {
String[] months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Spt", "Oct", "Nov", "Dec"};
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
return day + " " + months[month] + " " + year;
}
private void importCardAgreeFile(String clientMoniker, JSONObject manager, String sourceFile, String fileLabel) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {

@ -56,7 +56,7 @@ public class PartnerManageController {
}
@RequestMapping(value = "/init/merchant_code", method = RequestMethod.GET,produces = "application/json")
@RequestMapping(value = "/init/merchant_code", method = RequestMethod.GET, produces = "application/json")
public JSONObject initMerchantCode() {
JSONObject result = new JSONObject();
result.put("partner_code", clientManager.initMerchantCode());
@ -311,7 +311,7 @@ public class PartnerManageController {
@ManagerMapping(value = "/{clientMoniker}/selectBillVersion", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void selectBillVersion(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.selectBillCodeVersion(manager, clientMoniker, pass.getString("version"));
clientManager.selectBillCodeVersion(manager, clientMoniker, pass.getString("version"));
}
/**
@ -527,10 +527,10 @@ public class PartnerManageController {
}
@ManagerMapping(value = "/{clientMoniker}/sub_clients/page", method = RequestMethod.GET)
public JSONObject listSubClientsByPage(@PathVariable String clientMoniker,@RequestParam(defaultValue = "1") int page,
public JSONObject listSubClientsByPage(@PathVariable String clientMoniker, @RequestParam(defaultValue = "1") int page,
@RequestParam(required = false) String searchText,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listSubClientsByPage(manager, clientMoniker,searchText,page);
return clientManager.listSubClientsByPage(manager, clientMoniker, searchText, page);
}
//创建子商户
@ -596,8 +596,8 @@ public class PartnerManageController {
*/
@ManagerMapping(value = "/{clientMoniker}/file/source_card_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT})
public JSONObject getSourceCardAgreeAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("fileName") String fileName){
return clientManager.getSourceCardAgreeFiles(clientMoniker,manager,fileName);
@RequestParam("fileName") String fileName) {
return clientManager.getSourceCardAgreeFiles(clientMoniker, manager, fileName);
}
@ManagerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
@ -618,13 +618,13 @@ public class PartnerManageController {
@ManagerMapping(value = "/{clientMoniker}/mw_file", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void uploadMWAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientMWAuthFilesInfo filesInfo,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.uploadMWAuthFilesManager(manager, clientMoniker, filesInfo);
}
@ManagerMapping(value = "/{clientMoniker}/kycFile", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void uploadKycFiles(@PathVariable String clientMoniker, @RequestBody ClientKycFilesInfo filesInfo,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.uploadKycFiles(manager, clientMoniker, filesInfo);
}
@ -646,6 +646,7 @@ public class PartnerManageController {
/**
* BD
*
* @param clientMoniker
* @param manager
*/
@ -661,6 +662,7 @@ public class PartnerManageController {
/**
*
*
* @param clientMoniker
* @param manager
*/
@ -686,6 +688,7 @@ public class PartnerManageController {
/**
*
*
* @param clientMoniker
* @param manager
* @throws Exception
@ -697,14 +700,18 @@ public class PartnerManageController {
/**
*
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_promotiona_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardPromotionaAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("date") String promotionalEffectiveDate,@RequestParam("period") int promotionalPeriod) throws Exception {
clientManager.getAggregateCardPromotionaAgreeFile(clientMoniker, manager, false,promotionalEffectiveDate,promotionalPeriod);
@GetMapping(value = "/{clientMoniker}/export/aggregate/card_promotion_agree_pdf")
public void exportAggregateCardPromotionaAgreeFile(@PathVariable String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("rateid") String rateid,
HttpServletResponse httpResponse
) {
clientManager.getAggregateCardPromotionaAgreeFile(clientMoniker, manager, false, rateid, httpResponse);
}
@ManagerMapping(value = "/{clientMoniker}/temp/export/pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
@ -724,6 +731,7 @@ public class PartnerManageController {
/**
* BD
*
* @param clientMoniker
* @param manager
*/
@ -755,8 +763,8 @@ public class PartnerManageController {
@GetMapping(value = "/{clientMoniker}/lists_settlements/excel")
@ReadOnlyConnection
public void excelSettlements(@PathVariable String clientMoniker, TradeLogQuery query, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,HttpServletResponse response){
clientManager.excelSettlementLog(manager, clientMoniker, query,response);
public void excelSettlements(@PathVariable String clientMoniker, TradeLogQuery query, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse response) {
clientManager.excelSettlementLog(manager, clientMoniker, query, response);
}
@ManagerMapping(value = "/{clientMoniker}/requireCustinfo", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
@ -805,6 +813,7 @@ public class PartnerManageController {
public List<JSONObject> listRpaySubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listRpaySubMerchantIdApplys(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);
@ -932,51 +941,54 @@ public class PartnerManageController {
/**
*
*
* @param clientMoniker
* @return
*/
@ManagerMapping(value = "/{clientMoniker}/incremental_service", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public JSONObject getClientIncrementalService(@PathVariable String clientMoniker){
return clientManager.partnerIncrementalService(clientMoniker);
public JSONObject getClientIncrementalService(@PathVariable String clientMoniker) {
return clientManager.partnerIncrementalService(clientMoniker);
}
/**
* /
*
* @param clientMoniker
* @param incrementalService
*/
@ManagerMapping(value = "/{clientMoniker}/incremental_service", method = RequestMethod.POST, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void updateClientIncrementalService(@PathVariable("clientMoniker") String clientMoniker,@RequestBody JSONObject incrementalService, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
clientManager.changePartnerIncrementalService(clientMoniker,incrementalService,manager);
public void updateClientIncrementalService(@PathVariable("clientMoniker") String clientMoniker, @RequestBody JSONObject incrementalService, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changePartnerIncrementalService(clientMoniker, incrementalService, manager);
}
/**
* /
*
* @param clientMoniker
* @param incrementalService
*/
@ManagerMapping(value = "/{clientMoniker}/incremental_service/status", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchClientIncrementalService(@PathVariable("clientMoniker") String clientMoniker,@RequestBody JSONObject incrementalService, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
clientManager.changeSwitchIncrementalService(clientMoniker,incrementalService,manager);
public void switchClientIncrementalService(@PathVariable("clientMoniker") String clientMoniker, @RequestBody JSONObject incrementalService, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changeSwitchIncrementalService(clientMoniker, incrementalService, manager);
}
@ManagerMapping(value = "/{clientMoniker}/ext_config", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void changeClientExtConfigs(@PathVariable("clientMoniker")String clientMoniker,
public void changeClientExtConfigs(@PathVariable("clientMoniker") String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestBody JSONObject params){
clientManager.changeExtParams(clientMoniker,manager,params);
@RequestBody JSONObject params) {
clientManager.changeExtParams(clientMoniker, manager, params);
}
@ManagerMapping(value = "/{clientMoniker}/applyMWMerchantId",method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public RPayMerchantEntity applyMWMerchantId(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.applyMWMerchantId(clientMoniker,manager);
@ManagerMapping(value = "/{clientMoniker}/applyMWMerchantId", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public RPayMerchantEntity applyMWMerchantId(@PathVariable("clientMoniker") String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.applyMWMerchantId(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/queryMWMerchantIdStatus",method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public RPayMerchantEntity queryMWMerchantIdStatus(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.queryMWMerchantIdStatus(clientMoniker,manager);
@ManagerMapping(value = "/{clientMoniker}/queryMWMerchantIdStatus", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public RPayMerchantEntity queryMWMerchantIdStatus(@PathVariable("clientMoniker") String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.queryMWMerchantIdStatus(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/query/mw_info", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@ -986,10 +998,11 @@ public class PartnerManageController {
/**
* /
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/payment_card_permission", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchInternationalCard(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
public void switchInternationalCard(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.modifyUPayProfile(manager, clientMoniker, "enable_international_card", pass.getBooleanValue("allow"));
}

@ -12,7 +12,10 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.mappers.client.ClientCustomersMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.payment.*;
import au.com.royalpay.payment.manage.mappers.payment.AustracDataMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
@ -56,7 +59,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
@ -88,8 +90,6 @@ public class TradeLogServiceImpl implements TradeLogService {
@Resource
private RefundMapper refundMapper;
@Resource
private RefundAuditionMapper refundAuditionMapper;
@Resource
private ClientAccountMapper clientAccountMapper;
@Resource
private ClientManager clientManager;
@ -116,8 +116,6 @@ public class TradeLogServiceImpl implements TradeLogService {
@Resource
private ClearingLogMapper clearingLogMapper;
@Resource
private StringRedisTemplate stringRedisTemplate;
@Resource
private OrgManager orgManager;
@Resource
private ClientMapper clientMapper;

@ -952,7 +952,7 @@
INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1
AND so.type = 0
AND so.citypartner = 1 AND so.commission = 1
AND year(t.transaction_time) = #{year} AND month(t.transaction_time) = #{month}
AND year(t.create_time) = #{year} AND month(t.create_time) = #{month}
AND t.channel != 'Settlement' AND t.channel != 'System' AND t.system_generate = 0
ORDER BY t.client_id asc
]]>

@ -5,6 +5,14 @@
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">I'm happy to let you know
that your RoyalPay Cross-border Payment account has been set up.<br>
很高兴通知您贵司RoyalPay跨境全支付已经开通</p>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;" th:if="${card_approving}">I'm
happy to let you know
Congratulations, you have passed the compliance review and be granted a RoyalPay account.
You can start to do IT integration. At the same time, please contact BD regarding the invoice of security
deposit. We will set up your account live in the production environment after receiving the security deposit
from your company.
<br>
恭喜您已通过 CardPayment 合规审核,您可开始做IT对接. 请联系BD沟通支付保证金事宜。我司会在收到贵司提交的保证金后开启您的 CardPayment 权限。</p>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">Please kindly log on the
website below to manage your accounts and transactions:<br>
@ -94,7 +102,7 @@
Store to download APP for IOSwhich helps check your payment receiving records.</p>
<p style="font-family: PingFang-SC-Medium;font-size: 1rem;color: #000000;letter-spacing: 0;">
您可以在APP Store里搜索"<a style="color: #FF6600;text-decoration: none"
href="https://itunes.apple.com/app/royalpay/id1049566852?l=en&mt=8">RoyalPay</a>"下载royalpay的app来进行收款和接收到账提醒等。
href="https://itunes.apple.com/app/royalpay/id1049566852?l=en&mt=8">RoyalPay</a>"下载royalpay的app来进行收款和接收到账提醒等。
</p>
<p><img style="width: 100%" src="https://mpay.royalpay.com.au/static/images/App_banner.png"> <br>
</p>
@ -154,7 +162,8 @@
<div style="display: flex;justify-content: space-around">
<div style="font-family: Avenir-Medium;font-size: 1rem;color: #888888;">
<div style="">Email:<br/><a style="color: #888888;text-decoration: none" href="mailto:info@royalpay.com.au">info@royalpay.com.au</a></div>
<div style="">Email:<br/><a style="color: #888888;text-decoration: none" href="mailto:info@royalpay.com.au">info@royalpay.com.au</a>
</div>
<div style="margin-top: 1rem;">Tel:<br/>1300 10 77 50</div>
<div style="margin-top: 1rem;">Level 14, 383 Kent Street, Sydney NSW 2000</div>
<div style="margin-top: 1rem;">Tunnel Show Pty Ltd trading as RoyalPay</div>
@ -173,10 +182,7 @@
</div>
<div style="width: 100%;height: 0.1rem;background: #F9E6D8;margin-top: 2rem;margin-bottom: 2rem;"></div>
</div>
</html>
</html>

File diff suppressed because it is too large Load Diff

@ -1317,13 +1317,13 @@
<label>
<input type="checkbox" checked disabled
id="approving-check">
Australia Credit Card Payment|澳大利亚信用卡支付
AU Credit Card | AU 信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="partner.enable_international_card">
International Credit Card Payment|国际信用卡支付
Intl Credit Card|国际信用卡
</label>
</span>
</div>

@ -1,5 +1,5 @@
<style>
.bank-input{
.bank-input {
width: 95%;
float: left;
}
@ -17,7 +17,9 @@
<div class="form-group" ng-if="partner.surcharge_mode=='distributed'">
<label class="col-sm-4">手续费账户余额</label>
<div class="col-sm-6" style="font-size: 25px">
<p>{{surcharge.balance|currency:'AUD'}}<i class="fa fa-bars" style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px" ng-click="surchargeAccountDetail()"></i></p>
<p>{{surcharge.balance|currency:'AUD'}}<i class="fa fa-bars"
style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px"
ng-click="surchargeAccountDetail()"></i></p>
</div>
</div>
<div class="form-group" ng-if="partner.surcharge_mode=='distributed'">
@ -32,10 +34,12 @@
<div class="col-sm-6">
<p>
<span ng-if="partner.surcharge_mode=='balance'">balance
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer" ng-click="switchSurchargeMode()"></i>
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer"
ng-click="switchSurchargeMode()"></i>
</span>
<span ng-if="partner.surcharge_mode=='distributed'">distributed
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer" ng-click="switchSurchargeMode()"></i>
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer"
ng-click="switchSurchargeMode()"></i>
</span>
<p class="text-info">
<i class="fa fa-info"></i>启用到收支分离(distributed)模式,将使消费者支付手续费模式失效<br>
@ -87,33 +91,38 @@
<label class="col-sm-4">Settle Hour</label>
<div class="col-sm-6">
<select ng-model="partner.settle_hour" class="form-control"
ng-options="hour.value as hour.label for hour in settleHours" ng-change="settleHourConfig()"></select>
ng-options="hour.value as hour.label for hour in settleHours"
ng-change="settleHourConfig()"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="swiftcode_input">Swift Code</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.swift_code" id="swiftcode_input" required
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.swift_code" id="swiftcode_input"
required
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="bsb_no_input">BSB No</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true" ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.bsb_no" id="bsb_no_input" required
ng-readonly="!bankCtrl.edit">
</div>
<div class="col-sm-2" ng-if="bankCtrl.edit">
<a class="btn btn-success" role="button" ng-click="getBankInfo(bankaccount.bsb_no)"><i
class="fa fa-eye"ng-if="$root.complianceCheck.bankAccount"></i>search</a>
class="fa fa-eye" ng-if="$root.complianceCheck.bankAccount"></i>search</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="bank_input">Bank</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.bank" id="bank_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -121,7 +130,8 @@
<div class="form-group">
<label class="col-sm-4" for="city_input">City</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.city" id="city_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -129,7 +139,8 @@
<div class="form-group">
<label class="col-sm-4" for="address_input">Address</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.address" id="address_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -137,7 +148,8 @@
<div class="form-group">
<label class="col-sm-4" for="system_input">System</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.system" id="system_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -145,7 +157,8 @@
<div class="form-group">
<label class="col-sm-4" for="postcode_input">Postcode</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.postcode" id="postcode_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -153,7 +166,8 @@
<div class="form-group">
<label class="col-sm-4" for="state_input">State</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.state" id="state_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -161,7 +175,8 @@
<div class="form-group">
<label class="col-sm-4" for="branch_input">Branch</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.branch" id="branch_input" required
ng-readonly="!bankCtrl.edit">
</div>
@ -169,15 +184,18 @@
<div class="form-group">
<label class="col-sm-4" for="account_no_input">Account No</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.account_no" id="account_no_input" required
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.account_no" id="account_no_input"
required
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="account_name_input">Account Name</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"ng-if="$root.complianceCheck.bankAccount"></i>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" maxlength="50" ng-model="bankaccount.account_name"
id="account_name_input" required ng-readonly="!bankCtrl.edit">
</div>
@ -203,18 +221,39 @@
<i class="fa fa-plus"></i></a>
</h3>
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Wechat'}"><a role="button" ng-click="bankCtrl.rate_name='Wechat'">Wechat</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Alipay'}"><a role="button" ng-click="bankCtrl.rate_name='Alipay'">Alipay(Retail)</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayOnline'}"><a role="button" ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}"><a role="button" ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='jd'}"><a role="button" ng-click="bankCtrl.rate_name='jd'">JDpay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Wechat'}"><a role="button"
ng-click="bankCtrl.rate_name='Wechat'">Wechat</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Alipay'}"><a role="button"
ng-click="bankCtrl.rate_name='Alipay'">Alipay(Retail)</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayOnline'}"><a role="button"
ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}"><a role="button"
ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='jd'}"><a role="button"
ng-click="bankCtrl.rate_name='jd'">JDpay</a>
</li>
<!--<li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}"><a role="button" ng-click="bankCtrl.rate_name='hf'">HFpay</a></li>-->
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button" ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button"
ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a>
</li>
<!--<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Yeepay'}"><a role="button" ng-click="bankCtrl.rate_name='Yeepay'">Yeepay</a></li>-->
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_card'">Card Payment</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct Debit</a></li>
<a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="(partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole)" >
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button"
ng-click="bankCtrl.rate_name='CB_BankPay'"
ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button"
ng-click="bankCtrl.rate_name='rpaypmt_card'">Card
Payment</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button"
ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct
Debit</a></li>
<a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button"
ng-click="newCardPaymentRates()"
ng-if="(partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole)">
Add Card Payment Rates
</a>
</ul>
@ -229,11 +268,13 @@
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th ng-if="bankCtrl.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">Clean Days</th>
<th ng-if="bankCtrl.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">
Clean Days
</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th>Operation</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
@ -242,21 +283,32 @@
<td ng-bind="rate.rate_name"></td>
<td ng-if="bankCtrl.rate_name!='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'" ng-bind="rate.ext_rates.overseas_rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'"
ng-bind="rate.ext_rates.overseas_rate_value + ' %'"></td>
<td ng-bind="'$ '+rate.transaction_fee"></td>
<td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td>
<td ng-if="rate.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">T+{{rate.clean_days}}</td>
<td ng-if="rate.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">
T+{{rate.clean_days}}
</td>
<td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.operator_name||'系统生成'"></td>
<td ng-bind="rate.remark|limitTo:20" title="{{rate.remark}}"></td>
<td><a role="button" ng-click="editRate(rate)" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="rate.active=='1' && rate.current=='1' && (bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd')">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td>
</tr>
</tbody>
</table>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope"
ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div>
</div>

@ -120,7 +120,8 @@
<!--Organization-->
<div class="form-group col-sm-6" ng-if="orgs">
<label class="control-label col-xs-4 col-sm-4" for="bd-select">Organization</label>
<label class="control-label col-xs-4 col-sm-4"
for="bd-select">Organization</label>
<div class="col-xs-6 col-sm-6">
<select id="org-select" class="form-control" ng-model="params.org_id"
ng-options="org.org_id as org.name group by org.org_type for org in orgs"
@ -130,9 +131,12 @@
</div>
</div>
<div class="form-group col-sm-6" ng-if="(params.org_id && orgs_child.length>1) || (currentUser.org_id && !currentUser.parent_org_id && orgs_child.length>1)">
<label class="control-label col-xs-4 col-sm-4" for="org-clild" ng-if="!currentUser.org_id">Sub Organization</label>
<label class="control-label col-xs-4 col-sm-4" for="org-clild" ng-if="currentUser.org_id">Organization</label>
<div class="form-group col-sm-6"
ng-if="(params.org_id && orgs_child.length>1) || (currentUser.org_id && !currentUser.parent_org_id && orgs_child.length>1)">
<label class="control-label col-xs-4 col-sm-4" for="org-clild"
ng-if="!currentUser.org_id">Sub Organization</label>
<label class="control-label col-xs-4 col-sm-4" for="org-clild"
ng-if="currentUser.org_id">Organization</label>
<div class="col-xs-6 col-sm-6">
<select id="org-clild" class="form-control" ng-model="params.org_ids"
ng-options="org.org_id as org.name group by org.type for org in orgs_child"
@ -184,10 +188,21 @@
<!--<div class="col-xs-8 col-sm-4">-->
<span class="col-xs-8 col-sm-10">
<span class="checkbox-inline">
<label>
<label style="color: #f06010">
<input type="checkbox" ng-model="params.approving"
id="approving-check">
等待合规
<img height="20px" src="/static/images/royalpay_sign_s.png">
Cross-Board Payment 等待合规
</label>
</span>
<span class="checkbox-inline">
<label style="color: blue">
<input type="checkbox" ng-model="params.card_approving"
id="card_approving-check">
<img height="20px"
src="/static/images/card_payment_sign.png">
Card Payment等待合规
</label>
</span>
<span class="checkbox-inline">
@ -195,13 +210,26 @@
<input type="checkbox" ng-model="params.tempMchId"> 使用通用子商户号
</label>
</span>
<span class="checkbox-inline">
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.bd_upload_material"> 等待BD上传材料审核
</label>
</span>
</span>
<!--</div>-->
</div>
<div class="form-group col-sm-12" ng-if="'10'|withRole">
<label class="control-label col-xs-4 col-sm-2"></label>
<!--<div class="col-xs-8 col-sm-4">-->
<span class="col-xs-8 col-sm-10">
<span class="checkbox-inline warning">
<label style="color: yellowgreen" >
<input type="checkbox" ng-model="params.quickPass"> 自助开通
</label>
</span>
<span class="checkbox-inline">
<label>
<label style="color: green">
<input type="checkbox" ng-model="params.greenChannel"> 绿色通道
</label>
</span>
@ -217,17 +245,12 @@
</label>
</span>
<span class="checkbox-inline">
<label>
<label style="color: yellow">
<input type="checkbox" ng-model="params.apply_to_back"> 申请打回
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.bd_upload_material"> 等待BD上传材料审核
</label>
</span>
<span class="checkbox-inline">
<label>
<label style="color: red">
<input type="checkbox" ng-model="params.is_valid"> 禁用
</label>
</span>

@ -265,9 +265,7 @@
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<a ng-if="partner.upay_open_status != 5 && partner.upay_open_status" role="button" type="button" class="btn btn-success" ng-click="exportCardAgreegatePDF()">
制作信用卡支付合同</a>
<a ng-if="partner.upay_open_status != 5 &&letterOfOfferFileManager.letter_of_offer_file" role="button" type="button" class="btn btn-success" ng-click="exportCardPromotionaAgreegatePDF()">
制作促销合同</a>
制作Card Payment合同</a>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" ng-if="partner.upay_open_status==1 && partner.upay_approve_result>1 || partner.upay_open_status==4"
class="btn btn-success" ng-click="passCardClient()">Pass
@ -282,9 +280,6 @@
<a ng-if="termsAndConditionsFile.terms_and_conditions_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<span style="margin-top: 5px"ng-if="partner.upay_open_status != 5">
<a ng-if="partner.upay_open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="cardNotifyBD()">
@ -348,23 +343,9 @@
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.upay_approve_result!=1" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.upay_approve_result!=1" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<div ng-if="partner.upay_open_status==3" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCardCompliance()">Commit to Compliance</button>
</div>
<!--<div>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Promotional Offer合同</a>
</div>-->
<div ng-if="!partner.upay_open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeCardAgreeFile()">
<i class="fa fa-paper-plane"></i>
@ -1285,14 +1266,14 @@
<label>
<input type="checkbox" checked disabled ng-if="partner.mw_industry">
<input type="checkbox" disabled ng-if="!partner.mw_industry">
Australia Credit Card Payment|澳大利亚信用卡支付
AU Credit Card | AU 信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-if="partner.enable_international_card" checked disabled>
<input type="checkbox" ng-if="!partner.enable_international_card" disabled>
International Credit Card Payment|国际信用卡支付
Intl Credit Card|国际信用卡
</label>
</span>
</div>

@ -1228,13 +1228,13 @@
<label>
<input type="checkbox" checked disabled
id="approving-check">
Australia Credit Card Payment|澳大利亚信用卡支付
AU Credit Card | AU 信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="partner.enable_international_card">
International Credit Card Payment|国际信用卡支付
Intl Credit Card|国际信用卡
</label>
</span>
</div>

@ -379,23 +379,6 @@
<label class="control-label col-xs-4 col-sm-2">Status</label>
<!--<div class="col-xs-8 col-sm-4">-->
<span class="col-xs-8 col-sm-10">
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.approving"
id="approving-check">
<img height="20px" src="/static/images/royalpay_sign_s.png">
等待合规
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.card_approving"
id="card_approving-check">
<img height="20px" src="/static/images/card_payment_sign.png">
等待合规
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.tempMchId"> 使用通用子商户号

@ -2,14 +2,14 @@ package au.com.royalpay.payment.manage.valid;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVPrinter;
import org.apache.commons.csv.QuoteMode;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.junit.Test;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
/**
* Create by davep at 2019-12-24 15:15
@ -26,4 +26,11 @@ public class CSVTest {
writer.flush();
System.out.println(file.getAbsolutePath());
}
@Test
public void tesat(){
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
String dateStr = formatter.print(new DateTime());
System.err.println(dateStr);
}
}

Loading…
Cancel
Save