diff --git a/pom.xml b/pom.xml
index cbb0cfb8b..f23809de6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 2.2.26
+ 2.2.27
UTF-8
1.8.0
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
index e7764f981..1ef0b6c83 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
@@ -25,13 +25,13 @@ public class ClientRegisterInfo {
private String businessName;
@JSONField(name = "business_structure")
private String businessStructure;
-// @NotEmpty(message = "error.payment.valid.param_missing")
+ // @NotEmpty(message = "error.payment.valid.param_missing")
private String abn;
private String acn;
-// @NotEmpty(message = "error.payment.valid.param_missing")
+ // @NotEmpty(message = "error.payment.valid.param_missing")
private String industry;
@JSONField(name = "alipayindustry")
- /* @NotEmpty(message = "error.payment.valid.param_missing")*/
+ /* @NotEmpty(message = "error.payment.valid.param_missing")*/
private String alipayIndustry;
@JSONField(name = "company_photo")
private String companyPhoto;
@@ -60,7 +60,7 @@ public class ClientRegisterInfo {
private String postcode;
private String state;
@JSONField(name = "legal_representative_person")
- private String representativePerson ;
+ private String representativePerson;
@JSONField(name = "legal_representative_phone")
private String representativePhone;
@JSONField(name = "legal_representative_email")
@@ -68,7 +68,7 @@ public class ClientRegisterInfo {
@JSONField(name = "legal_representative_job")
private String representativeJobTitle;
@JSONField(name = "marketing_person")
- private String marketingPerson ;
+ private String marketingPerson;
@JSONField(name = "marketing_phone")
private String marketingPhone;
@JSONField(name = "marketing_email")
@@ -125,16 +125,16 @@ public class ClientRegisterInfo {
@JSONField(name = "enable_international_card")
private boolean enableInternaltionCard;
@JSONField(name = "enable_cross_payment")
- private boolean enableCrossPayment;
+ private boolean enableCrossPayment = true;
@JSONField(name = "enable_card_payment")
- private boolean enableCardPayment;
+ private boolean enableCardPayment = false;
public JSONObject insertObject() {
if (industry == null) {
setIndustry("331");
}
JSONObject res = (JSONObject) JSON.toJSON(this);
- if (client_apply_id==null){
+ if (client_apply_id == null) {
res.remove("client_apply_id");
}
return res;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
index bede05b1b..79d7e2d61 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
@@ -346,9 +346,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private static final String CLIENT_APPLY_FILE = "client_apply_file";
//卡支付合同文件
- private static final String LETTER_OF_OFFER_FILE="letter_of_offer_file";
- private static final String PROMOTIONAL_OFFER_FILE="promotional_offer_file";
- private static final String TERMS_AND_CONDITIONS_FILE="terms_and_conditions_file";
+ private static final String LETTER_OF_OFFER_FILE = "letter_of_offer_file";
+ private static final String PROMOTIONAL_OFFER_FILE = "promotional_offer_file";
+ private static final String TERMS_AND_CONDITIONS_FILE = "terms_and_conditions_file";
private static final List tags = new ArrayList<>();
@@ -441,11 +441,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
JSONObject clientConfig = clientConfigService.find(client.getIntValue("client_id"));
- if(client.containsKey("enable_presettle")){
- clientConfig.put("enable_presettle",client.getBoolean("enable_presettle"));
+ if (client.containsKey("enable_presettle")) {
+ clientConfig.put("enable_presettle", client.getBoolean("enable_presettle"));
}
- if(client.containsKey("ext_params")){
- clientConfig.put("ext_params",client.getString("ext_params"));
+ if (client.containsKey("ext_params")) {
+ clientConfig.put("ext_params", client.getString("ext_params"));
}
client.putAll(clientConfig);
JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(client.getIntValue("client_id"));
@@ -470,7 +470,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("rate_editable", bdRateEditable);
boolean bdCardRateEditable = (clientConfig.getBoolean("enable_card_payment") && !client.containsKey("upay_approve_result"));
client.put("card_rate_editable", bdCardRateEditable);
- }else {
+ } else {
client.put("company_phone", "******");
client.put("contact_person", "******");
client.put("contact_phone", "******");
@@ -508,13 +508,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
// 商户跨境支付审核过程日志
- PageList audit_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"),1,
+ PageList audit_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"), 1,
new PageBounds(Order.formString("create_time")));
if (audit_logs != null && !audit_logs.isEmpty()) {
client.put("audit_logs", audit_logs);
}
//商户卡支付审核过程日志
- PageList audit_card_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"),2,
+ PageList audit_card_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"), 2,
new PageBounds(Order.formString("create_time")));
if (audit_card_logs != null && !audit_card_logs.isEmpty()) {
client.put("audit_card_logs", audit_card_logs);
@@ -826,11 +826,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (clientMapper.findClientByMoniker(registery.getClientMoniker()) != null) {
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
}
- //2018-09-10,新建商户不检查是否在系统黑名单
- //isRiskyMerchant(partner, null);
+ clientMapper.save(partner);
try {
- clientMapper.save(partner);
JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id", partner.getIntValue("client_id"));
clientConfig.put("client_moniker", partner.getString("client_moniker"));
@@ -838,16 +836,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientConfig.put("client_pay_desc", partner.get("client_pay_desc"));
clientConfig.put("enable_cross_payment", partner.get("enable_cross_payment"));
clientConfig.put("enable_card_payment", partner.get("enable_card_payment"));
-
clientConfigService.save(clientConfig);
permissionPartnerManagerImpl.permissionClientModuleSave(partner.getIntValue("client_id"), partner.getString("client_moniker"));
+ } catch (Exception e) {
+ throw new ServerErrorException("商户配置信息初始化失败");
+ }
+ try {
saveLegalAndMarketingInfo(partner);
if (registery.isEnableCardPayment()) {
sysClientUpayProfileMapper.save(partner);
}
} catch (Exception e) {
- throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
+ throw new ServerErrorException("商户初始化法人信息失败");
}
+
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
JSONObject client_bd = new JSONObject();
client_bd.put("client_id", partner.getIntValue("client_id"));
@@ -925,7 +927,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (upay == null) {
updateInfo.put("client_moniker", clientMoniker);
sysClientUpayProfileMapper.save(updateInfo);
- }else {
+ } else {
upay.putAll(updateInfo);
sysClientUpayProfileMapper.update(upay);
}
@@ -990,7 +992,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(info);
if (StringUtils.isNotBlank(info.getString("representative_person"))) {
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
- if(legalInfo != null){
+ if (legalInfo != null) {
legalInfo.put("client_id", client.getIntValue("client_id"));
legalInfo.put("representative_person", info.getString("representative_person"));
legalInfo.put("job_title", info.getString("representative_job_title"));
@@ -1001,7 +1003,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
legalInfo.put("state", info.getString("registered_state"));
legalInfo.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legalInfo);
- }else{
+ } else {
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
@@ -1197,17 +1199,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject account = accounts.get(0);
sendInitEmail(client, account.getString("username"), "*****", false);
// sendInitEmail(manager, client, account.getString("username"), "*****");
- saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager, 1);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "common_sub_merchant_id", false));
gatewayMerchantApply.notifyOrgMerchantStatus(client);
} else if (checkGreenChannel && client.getIntValue("open_status") == 5) {
// 绿色通道通过后不发邮件
logger.info("PASS 绿色通道:" + clientMoniker);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager, 1);
} else {
initAdminUserAndSendEmail(manager, clientMoniker, client, false);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager, 1);
}
}
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
@@ -1225,9 +1227,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
- Integer open_status_to = cardFlowInfo != null? cardFlowInfo.getIntValue("upay_open_status") : null;
- cardFlowInfo.put("upay_open_status",5);
- cardFlowInfo.put("upay_approve_result",1);
+ Integer open_status_to = cardFlowInfo != null ? cardFlowInfo.getIntValue("upay_open_status") : null;
+ cardFlowInfo.put("upay_open_status", 5);
+ cardFlowInfo.put("upay_approve_result", 1);
sysClientUpayProfileMapper.update(cardFlowInfo);
sendCardCommissionWechatMessage(client);// wxMessage
if (pass == 1) {
@@ -1236,10 +1238,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
List accounts = clientAccountMapper.listAdminAccounts(clientId);
if (accounts != null && accounts.size() > 0) {
sendInitEmail(client, accounts.get(0).getString("username"), "*******", true);
- }else {
+ } else {
initAdminUserAndSendEmail(manager, clientMoniker, client, true);
}
- saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager, 2);
}
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
@@ -1287,12 +1289,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("该商户未设置微信 Sub Merchant ID!");
}
clientModifySupport.processClientModify(new GreenChannelModify(manager, clientMoniker, manager.getString("manager_id")));
- saveClientAuditProcess(client.getIntValue("client_id"), 10, 1, "绿色通道申请通过", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), 10, 1, "绿色通道申请通过", manager, 1);
sendCommissionWechatMessage(client);
initAdminUserAndSendEmail(manager, clientMoniker, client, false);
}
- private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client,boolean isUpayEmail) {
+ private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client, boolean isUpayEmail) {
String username = clientMoniker;
boolean duplicated = true;
String pwd = RandomStringUtils.random(8, true, true);
@@ -1416,7 +1418,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}.start();
}
- public void sendInitEmail(final JSONObject client, String username, String pwd,boolean isUpayAuditPass) {
+ public void sendInitEmail(final JSONObject client, String username, String pwd, boolean isUpayAuditPass) {
logger.debug("sending email after comply");
JSONObject model = new JSONObject();
model.put("username", username);
@@ -1471,7 +1473,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientUpdate.put("upay_approve_email_send", 3);
clientUpdate.put("upay_approve_email_id", emailId);
sysClientUpayProfileMapper.update(clientUpdate);
- }else {
+ } else {
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 3);
clientUpdate.put("approve_email_id", emailId);
@@ -1484,7 +1486,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientUpdate.put("upay_approve_email_send", 0);
clientUpdate.put("upay_approve_email_id", null);
sysClientUpayProfileMapper.update(clientUpdate);
- }else {
+ } else {
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 0);
clientUpdate.put("approve_email_id", null);
@@ -1664,7 +1666,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
- upayProfileInfo.put(permissionKey,allow);
+ upayProfileInfo.put(permissionKey, allow);
sysClientUpayProfileMapper.update(upayProfileInfo);
}
@@ -2809,7 +2811,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client_ids != null) {
params.put("client_ids", Arrays.asList(client_ids));
params.remove("client_id");
- }else {
+ } else {
queryModifyClientIds(client.getIntValue("client_id"), params);
}
PageList devices = clientDeviceMapper.listClientDevices(params, new PageBounds(page, limit, Order.formString("create_time.desc")));
@@ -3190,31 +3192,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
- public void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal){
+ public void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
- exportLetterOfferPDF(clientMoniker,manager);
- exportTermsConditionsPDF(clientMoniker,manager);
+ exportLetterOfferPDF(clientMoniker, manager);
+ exportTermsConditionsPDF(clientMoniker, manager);
if (!renewal) {
JSONObject cardFlow = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
- cardFlow.put("upay_open_status",2);
+ cardFlow.put("upay_open_status", 2);
sysClientUpayProfileMapper.update(cardFlow);
}
if (manager != null) {
- saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager, 2);
}
}
+
@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 promotionalEffectiveDate, int promotionalPeriod) throws ParseException {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
- exportPromotionalOfferPDF(clientMoniker,manager,promotionalEffectiveDate,promotionalPeriod);
+ exportPromotionalOfferPDF(clientMoniker, manager, promotionalEffectiveDate, promotionalPeriod);
}
@Override
@@ -3414,7 +3417,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
if (manager != null) {
- saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager, 1);
}
}
}
@@ -3431,7 +3434,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.put("open_status", 3);
clientModifySupport.processClientModify(new OpenStatusModify(manager, clientMoniker, 3));
- saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成,等待BD处理", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成,等待BD处理", manager, 1);
// sendAgreeFileMsgToBD(client,null);
sendCommissionWechatMessage(client);
}
@@ -3450,7 +3453,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
cardFlowInfo.put("upay_open_status", 3);
sysClientUpayProfileMapper.update(cardFlowInfo);
- saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成,等待BD处理", manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成,等待BD处理", manager, 2);
sendCardCommissionWechatMessage(client);
}
@@ -3710,7 +3713,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(clientId);
if (upayInfo == null) {
sysClientUpayProfileMapper.save(params);
- }else {
+ } else {
sysClientUpayProfileMapper.update(params);
}
}
@@ -3791,12 +3794,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
- public JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName){
+ public JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
- JSONObject sourceFile = clientFilesMapper.getSourceCardAgreeFilesByClientId(client.getIntValue("client_id"),fileName);
+ JSONObject sourceFile = clientFilesMapper.getSourceCardAgreeFilesByClientId(client.getIntValue("client_id"), fileName);
if (sourceFile != null) {
sourceFile.put(sourceFile.getString("file_name"), sourceFile.getString("file_value"));
}
@@ -3844,7 +3847,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
String[] fileKeys = UPayAuthFileEnum.ALL.getFileNameArrays();
- List clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1,999999, Order.formString("last_update_date.asc")));
+ List clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1, 999999, Order.formString("last_update_date.asc")));
JSONObject fileJson = new JSONObject();
if (clientFiles != null && clientFiles.size() > 0) {
for (String fileKey : fileKeys) {
@@ -4091,9 +4094,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
try {
- updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info(),fileResult);
- updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info(),fileResult);
- updateSysClientFilesForWaitCompliance(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info(),fileResult);
+ updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info(), fileResult);
+ updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info(), fileResult);
+ updateSysClientFilesForWaitCompliance(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info(), fileResult);
} catch (Exception e) {
logger.error("上传KYC文件失败", e);
throw new BadRequestException("上传KYC文件失败" + e.getMessage());
@@ -4462,7 +4465,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject dataItem = logs.get(i);
HSSFRichTextString text0 = new HSSFRichTextString(client.getString("short_name"));
HSSFRichTextString text1 = new HSSFRichTextString(client.getString("client_moniker"));
- HSSFRichTextString text2 = new HSSFRichTextString(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format( dataItem.getDate("report_date")));
+ HSSFRichTextString text2 = new HSSFRichTextString(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dataItem.getDate("report_date")));
HSSFRichTextString text3 = new HSSFRichTextString(dataItem.getBigDecimal("total").setScale(2, BigDecimal.ROUND_HALF_DOWN).toString());
HSSFRichTextString text4 = new HSSFRichTextString(dataItem.getBigDecimal("income").setScale(2, BigDecimal.ROUND_HALF_DOWN).toString());
HSSFRichTextString text5 = new HSSFRichTextString(dataItem.getBigDecimal("fee").setScale(2, BigDecimal.ROUND_HALF_DOWN).toString());
@@ -4505,7 +4508,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
public void updateSysClientFilesWithoutRepeat(JSONObject manager, int clientId, String fileType, String fileValue) {
- List repetitiveFiles = clientFilesMapper.findRepetitiveFilesForDelete(clientId,fileType);
+ List repetitiveFiles = clientFilesMapper.findRepetitiveFilesForDelete(clientId, fileType);
if (fileValue != null) {
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
@@ -4517,8 +4520,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的fileType文件上传成功");
- if(repetitiveFiles != null){
- for(JSONObject repetitiveFile : repetitiveFiles){
+ if (repetitiveFiles != null) {
+ for (JSONObject repetitiveFile : repetitiveFiles) {
clientFilesMapper.deleteByClientAndFileId(repetitiveFile.getString("file_id"));
}
}
@@ -4552,7 +4555,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void updateFilesForWaitAuditWithoutRepeat(JSONObject manager, int clientId, String fileType, String fileValue, List fileResult) {
if (fileValue != null) {
String[] values = fileValue.split(",");
- List repetitiveFiles = clientFilesMapper.findRepetitiveFiles(clientId,fileType);
+ List repetitiveFiles = clientFilesMapper.findRepetitiveFiles(clientId, fileType);
for (String value : values) {
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
@@ -4569,8 +4572,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
file.put("file_value", fileJson.getString("file_value"));
fileResult.add(file);
}
- if(repetitiveFiles != null){
- for(JSONObject repetitiveFile : repetitiveFiles){
+ if (repetitiveFiles != null) {
+ for (JSONObject repetitiveFile : repetitiveFiles) {
clientFilesMapper.deleteByClientAndFileId(repetitiveFile.getString("file_id"));
}
}
@@ -4581,7 +4584,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void updateFilesForWaitAuditWithoutRepeatForApp(JSONObject account, int clientId, String fileType, String fileValue, List fileResult) {
if (fileValue != null) {
String[] values = fileValue.split(",");
- List repetitiveFiles = clientFilesMapper.findRepetitiveFiles(clientId,fileType);
+ List repetitiveFiles = clientFilesMapper.findRepetitiveFiles(clientId, fileType);
for (String value : values) {
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
@@ -4598,8 +4601,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
file.put("file_value", fileJson.getString("file_value"));
fileResult.add(file);
}
- if(repetitiveFiles != null){
- for(JSONObject repetitiveFile : repetitiveFiles){
+ if (repetitiveFiles != null) {
+ for (JSONObject repetitiveFile : repetitiveFiles) {
clientFilesMapper.deleteByClientAndFileId(repetitiveFile.getString("file_id"));
}
}
@@ -4607,7 +4610,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
-
public void updateAggregateFilesForWaitCompliance(JSONObject manager, int clientId, String fileType, String fileValue, List fileResult) {
if (fileValue != null) {
List passAggregateFiles = clientFilesMapper.findClientPassAggreeFile(clientId);
@@ -4698,7 +4700,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager, 1);
if (manager != null) {
// sendMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
@@ -4734,17 +4736,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
int open_status_from = cardFlowInfo.getIntValue("upay_open_status");
- cardFlowInfo.put("upay_approve_time",new Date());
- cardFlowInfo.put("upay_approve_result",4);
+ cardFlowInfo.put("upay_approve_time", new Date());
+ cardFlowInfo.put("upay_approve_result", 4);
cardFlowInfo.put("upay_open_status", 4);
sysClientUpayProfileMapper.update(cardFlowInfo);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager, 2);
if (manager != null) {
sendCardCommissionWechatMessage(client);
}
}
- private void saveClientAuditProcess(int client_id, Integer open_status_form, Integer open_status_to, String remark, JSONObject manager,int type) {
+ private void saveClientAuditProcess(int client_id, Integer open_status_form, Integer open_status_to, String remark, JSONObject manager, int type) {
JSONObject log = new JSONObject();
try {
log.put("client_id", client_id);
@@ -4755,7 +4757,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
log.put("operator_id", StringUtils.isNotEmpty(manager.getString("manager_id")) ? manager.getString("manager_id") : manager.getString("account_id"));
log.put("operator", manager.getString("display_name"));
log.put("create_time", new Date());
- log.put("type",type);
+ log.put("type", type);
log.put("remark", remark);
clientAuditProcessMapper.save(log);
} catch (Exception e) {
@@ -4772,13 +4774,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
- beforeCommitToDoAgreeValid(client, manager,"Wechat");
+ beforeCommitToDoAgreeValid(client, manager, "Wechat");
OpenStatusModify openStatusModify = new OpenStatusModify(manager, clientMoniker, 1);
openStatusModify.setApprove_result(4);
openStatusModify.setApprove_time(new Date());
clientModifySupport.processClientModify(openStatusModify);
- saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Card Payment Compliance制作合同", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Card Payment Compliance制作合同", manager, 1);
if (manager != null) {
// sendAgreeFileMsgtoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
@@ -4794,7 +4796,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
client.putAll(clientConfigService.find(clientId));
- beforeCommitToDoAgreeValid(client, manager,"rpaypmt_card");
+ beforeCommitToDoAgreeValid(client, manager, "rpaypmt_card");
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (surCharge == null || surCharge.size() <= 0) {
@@ -4802,14 +4804,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
- JSONObject cardFlow = new JSONObject(){{
- put("client_id",clientId);
- put("upay_approve_result",4);
- put("upay_open_status",1);
- put("upay_approve_time",new Date());
+ JSONObject cardFlow = new JSONObject() {{
+ put("client_id", clientId);
+ put("upay_approve_result", 4);
+ put("upay_open_status", 1);
+ put("upay_approve_time", new Date());
}};
sysClientUpayProfileMapper.update(cardFlow);
- saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Compliance制作合同", manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Compliance制作合同", manager, 2);
}
private void beforeCommitToDoAgreeValid(JSONObject client, JSONObject manager, String channel) {
@@ -4860,7 +4862,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
openStatusModify.setApprove_result(4);
openStatusModify.setApprove_time(new Date());
clientModifySupport.processClientModify(openStatusModify);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 10, "提交绿色通道申请Compliance审核", manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 10, "提交绿色通道申请Compliance审核", manager, 1);
if (manager != null) {
// sendGreenChannelMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
@@ -5150,7 +5152,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (refuse_remark != null && !refuse_remark.isEmpty()) {
auditModify.setRefuse_remark(refuse_remark);
}
- saveClientAuditProcess(client.getIntValue("client_id"), open_status, client.getInteger("open_status"), "打回," + refuse_remark, manager,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status, client.getInteger("open_status"), "打回," + refuse_remark, manager, 1);
clientModifySupport.processClientModify(auditModify);
try {
@@ -5184,23 +5186,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
Integer clientId = client.getInteger("client_id");
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
Integer open_status = null;
- if(null != cardFlowInfo){
+ if (null != cardFlowInfo) {
open_status = cardFlowInfo.getIntValue("upay_open_status");
if (open_status == 1) {
- cardFlowInfo.put("upay_open_status",null);
+ cardFlowInfo.put("upay_open_status", null);
} else {
- cardFlowInfo.put("upay_open_status",open_status - 1);
+ cardFlowInfo.put("upay_open_status", open_status - 1);
}
- if ( cardFlowInfo.getIntValue("upay_approve_result") == 4 || client.getIntValue("source") == 4) {
- cardFlowInfo.put("upay_approve_result",5);
+ if (cardFlowInfo.getIntValue("upay_approve_result") == 4 || client.getIntValue("source") == 4) {
+ cardFlowInfo.put("upay_approve_result", 5);
}
if (refuse_remark != null && !refuse_remark.isEmpty()) {
- cardFlowInfo.put("upay_refuse_remark",refuse_remark);
+ cardFlowInfo.put("upay_refuse_remark", refuse_remark);
}
- }else{
- cardFlowInfo.put("upay_open_status",null);
+ } else {
+ cardFlowInfo.put("upay_open_status", null);
}
- saveClientAuditProcess(client.getIntValue("client_id"), open_status, cardFlowInfo.getIntValue("open_status"), "打回," + refuse_remark, manager,2);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status, cardFlowInfo.getIntValue("open_status"), "打回," + refuse_remark, manager, 2);
sysClientUpayProfileMapper.update(cardFlowInfo);
try {
@@ -5746,7 +5748,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String client_moniker = "[" + client.getString("client_moniker") + "]";
String short_name = client.getString("short_name");
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
- if(null == cardFlowInfo){
+ if (null == cardFlowInfo) {
return;
}
if (cardFlowInfo.getIntValue("upay_open_status") == 1) {
@@ -6435,7 +6437,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify);
- saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account,1);
+ saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account, 1);
if (params != null) {
params.put("display_name", client_account.getString("display_name"));
@@ -7367,11 +7369,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
- private void exportLetterOfferPDF(String clientMoniker,JSONObject manage) {
+ private void exportLetterOfferPDF(String clientMoniker, JSONObject manage) {
JSONObject info = convertClientLetterOfferInfo(clientMoniker);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf";
String fileName = clientMoniker + "_Letter_of_Offer.pdf";
- publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, info,LETTER_OF_OFFER_FILE);
+ publishExcelCardPDFFile(clientMoniker, manage, fileName, pdfPath, info, LETTER_OF_OFFER_FILE);
}
private JSONObject convertClientLetterOfferInfo(String clientMoniker) {
@@ -7396,15 +7398,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
//装在数据
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
- info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " "+client.getString("abn"));//商圈类型
+ 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"));//国家
info.put("partner_state", client.getString("state"));//洲
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("clean_days", clientRate.getInteger("clean_days"));//T+规则清算天数
info.put("partner_industry_mcc", upayProfileInfo.getString("mw_industry"));//信用卡注册商户行业编码
- 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("annual_rate",cardAnnualRate);//年费率
+ 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("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", cardRate.getString("overseas_rate_value"));//国际服务费
@@ -7418,15 +7420,15 @@ 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);
+ 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";
String fileName = clientMoniker + "_Promotional_Offer.pdf";
- publishExcelCardPDFFile(clientMoniker,manager,fileName, pdfPath, info,PROMOTIONAL_OFFER_FILE);
+ publishExcelCardPDFFile(clientMoniker, manager, fileName, pdfPath, info, PROMOTIONAL_OFFER_FILE);
}
- private JSONObject convertPromotionalOfferInfo(String clientMoniker,String promotionalEffectiveDate,int promotionalPeriod) {
+ private JSONObject convertPromotionalOfferInfo(String clientMoniker, String promotionalEffectiveDate, int promotionalPeriod) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@@ -7445,12 +7447,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
- info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " "+client.getString("abn"));//商圈类型
+ 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"));//国家
info.put("partner_state", client.getString("state"));//洲
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("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", cardRate.getString("overseas_rate_value"));//国际服务费
info.put("promotional_effective_date", promotionalEffectiveDate);
@@ -7458,7 +7460,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return info;
}
- private void exportTermsConditionsPDF(String clientMoniker,JSONObject manage) {
+ private void exportTermsConditionsPDF(String clientMoniker, JSONObject manage) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@@ -7468,10 +7470,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/terms_and_conditions.pdf";
String fileName = clientMoniker + "_Terms_And_Conditions.pdf";
- publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, new JSONObject(),TERMS_AND_CONDITIONS_FILE);
+ publishExcelCardPDFFile(clientMoniker, manage, fileName, pdfPath, new JSONObject(), TERMS_AND_CONDITIONS_FILE);
}
- private void publishExcelCardPDFFile(String clientMoniker,JSONObject manager, String fileName, String pdfPath, JSONObject info, String fileLabel) {
+ private void publishExcelCardPDFFile(String clientMoniker, JSONObject manager, String fileName, String pdfPath, JSONObject info, String fileLabel) {
try {
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(pdfPath);