|
|
@ -778,7 +778,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
|
|
|
|
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
|
|
|
|
if (client.getIntValue("source") == 4) {
|
|
|
|
if (client.getIntValue("source") == 4) {
|
|
|
|
sendAuthInitEmail(manager, client);
|
|
|
|
JSONObject account = accounts.get(0);
|
|
|
|
|
|
|
|
sendInitEmail(manager, client, account.getString("username"), "*****");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (accounts.size() == 0) {
|
|
|
|
if (accounts.size() == 0) {
|
|
|
|
initAdminUserAndSendEmail(manager, clientMoniker, client);
|
|
|
|
initAdminUserAndSendEmail(manager, clientMoniker, client);
|
|
|
@ -3149,6 +3150,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (client.getIntValue("open_status") == 4) {
|
|
|
|
if (client.getIntValue("open_status") == 4) {
|
|
|
|
|
|
|
|
if (client.getIntValue("source")==4 && !StringUtils.isNotEmpty(bd_user_name)){
|
|
|
|
|
|
|
|
bd_user_name = "自助开通商户";
|
|
|
|
|
|
|
|
}
|
|
|
|
List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
|
|
|
|
List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
|
|
|
|
if (complianceList != null && complianceList.size() > 0) {
|
|
|
|
if (complianceList != null && complianceList.size() > 0) {
|
|
|
|
for (JSONObject compliance : complianceList) {
|
|
|
|
for (JSONObject compliance : complianceList) {
|
|
|
@ -3156,7 +3160,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
|
|
|
|
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
|
|
|
|
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "合规材料已提交",
|
|
|
|
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "合规材料已提交",
|
|
|
|
bd_user_name, "审核材料", "BD已提交合规材料,等待审核");
|
|
|
|
bd_user_name, "审核材料", "已提交合规材料,等待审核");
|
|
|
|
paymentApi.sendTemplateMessage(msg);
|
|
|
|
paymentApi.sendTemplateMessage(msg);
|
|
|
|
} catch (WechatException e) {
|
|
|
|
} catch (WechatException e) {
|
|
|
|
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
|
|
|
|
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
|
|
|
@ -3391,4 +3395,48 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
|
|
|
|
return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void applyToCompliance(String client_moniker, JSONObject client_account) {
|
|
|
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(client_moniker);
|
|
|
|
|
|
|
|
if (client == null) {
|
|
|
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
|
|
|
|
|
|
|
|
if (client.getInteger("open_status") == null) {
|
|
|
|
|
|
|
|
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
|
|
|
|
|
|
|
|
if (countProduct <= 0) {
|
|
|
|
|
|
|
|
throw new BadRequestException("The Merchant's Product is empty!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
|
|
|
|
|
|
|
|
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
|
|
|
|
|
|
|
|
if (rate == null) {
|
|
|
|
|
|
|
|
throw new BadRequestException("The Partner's Rate is not config!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (clientFiles == null || clientFiles.equals("")) {
|
|
|
|
|
|
|
|
throw new BadRequestException("The Compliance File Must Be Uploaded!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject account = getBankAccountByClientId(client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (account == null) {
|
|
|
|
|
|
|
|
throw new BadRequestException("The Partner's Bank Account is not config!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int open_status_from = client.getIntValue("open_status");
|
|
|
|
|
|
|
|
OpenStatusModify openStatusModify = new OpenStatusModify(client_account, client_moniker, 4);
|
|
|
|
|
|
|
|
if ((client.getIntValue("source") == 1 || client.getIntValue("source") == 2) && client.getIntValue("approve_result") == 2) {
|
|
|
|
|
|
|
|
openStatusModify.setApprove_time(new Date());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
openStatusModify.setApprove_time(new Date());
|
|
|
|
|
|
|
|
openStatusModify.setApprove_result(3);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put("open_status", 4);
|
|
|
|
|
|
|
|
clientModifySupport.processClientModify(openStatusModify);
|
|
|
|
|
|
|
|
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account);
|
|
|
|
|
|
|
|
if (client_account != null) {
|
|
|
|
|
|
|
|
// sendMessagetoCompliance(client, manager.getString("display_name"));
|
|
|
|
|
|
|
|
sendCommissionWechatMessage(client);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|