|
|
@ -47,6 +47,7 @@ import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* account service for sign in Created by yixian on 2016-06-29.
|
|
|
|
* account service for sign in Created by yixian on 2016-06-29.
|
|
|
@ -84,6 +85,8 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ClientFilesMapper clientFilesMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private SmsSender smsSender;
|
|
|
|
private SmsSender smsSender;
|
|
|
|
private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT";
|
|
|
|
private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT";
|
|
|
|
private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT";
|
|
|
|
private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT";
|
|
|
@ -159,6 +162,32 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
|
|
|
|
}
|
|
|
|
}
|
|
|
|
client.putAll(clientConfigService.find(client_id));
|
|
|
|
client.putAll(clientConfigService.find(client_id));
|
|
|
|
client = clientInfoWithNoSecretInfo(client);
|
|
|
|
client = clientInfoWithNoSecretInfo(client);
|
|
|
|
|
|
|
|
if (client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) {
|
|
|
|
|
|
|
|
List<JSONObject> resultFiles = new ArrayList<>();
|
|
|
|
|
|
|
|
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"};
|
|
|
|
|
|
|
|
String[] putKeys = {"file_bank_info", "file_company_info", "file_id_info", "file_agreement_info", "file_apply_info"};
|
|
|
|
|
|
|
|
String[] fileNames = {"* bank statement", "* Certificate of Registration", "* ID", "* Agreement" ,"Application Form(optional)"};
|
|
|
|
|
|
|
|
boolean clientFilesIsLess = false;
|
|
|
|
|
|
|
|
for (int i = 0; i < fileKeys.length; i++) {
|
|
|
|
|
|
|
|
String fileKey = fileKeys[i];
|
|
|
|
|
|
|
|
if (clientFiles.stream().noneMatch(fileJson -> fileKey.equals(fileJson.getString("file_name")))) {
|
|
|
|
|
|
|
|
JSONObject fileJson = new JSONObject();
|
|
|
|
|
|
|
|
fileJson.put("key", putKeys[i]);
|
|
|
|
|
|
|
|
fileJson.put("name", fileNames[i]);
|
|
|
|
|
|
|
|
fileJson.put("file_value", "not Configure");
|
|
|
|
|
|
|
|
resultFiles.add(fileJson);
|
|
|
|
|
|
|
|
if (!"client_apply_file".equals(fileKey)) {
|
|
|
|
|
|
|
|
clientFilesIsLess = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put("greenChannel", 1);
|
|
|
|
|
|
|
|
client.put("client_less_file", clientFilesIsLess);
|
|
|
|
|
|
|
|
if (clientFilesIsLess) {
|
|
|
|
|
|
|
|
client.put("client_files", resultFiles);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (client.getInteger("parent_client_id") != null) {
|
|
|
|
if (client.getInteger("parent_client_id") != null) {
|
|
|
|
JSONObject rootPartner = clientManager.getClientInfoIgnoreInvalid(client.getIntValue("parent_client_id"));
|
|
|
|
JSONObject rootPartner = clientManager.getClientInfoIgnoreInvalid(client.getIntValue("parent_client_id"));
|
|
|
|
rootPartner.putAll(clientConfigService.find(client.getIntValue("parent_client_id")));
|
|
|
|
rootPartner.putAll(clientConfigService.find(client.getIntValue("parent_client_id")));
|
|
|
@ -442,7 +471,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
|
|
|
|
String[] columns = { "client_id", "client_moniker", "parent_client_id", "company_name", "address", "business_name", "business_structure", "abn", "acn",
|
|
|
|
String[] columns = { "client_id", "client_moniker", "parent_client_id", "company_name", "address", "business_name", "business_structure", "abn", "acn",
|
|
|
|
"company_phone", "suburb", "postcode", "state", "contact_person", "contact_phone", "contact_email", "short_name", "logo_url", "enable_refund",
|
|
|
|
"company_phone", "suburb", "postcode", "state", "contact_person", "contact_phone", "contact_email", "short_name", "logo_url", "enable_refund",
|
|
|
|
"enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark", "logo_thumbnail", "creator", "create_time", "approver",
|
|
|
|
"enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark", "logo_thumbnail", "creator", "create_time", "approver",
|
|
|
|
"approve_result", "approve_time", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat",
|
|
|
|
"approve_result", "approve_time", "open_status", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat",
|
|
|
|
"enable_bestpay", "manual_settle", "skip_clearing" ,"mail_confirm","surcharge_mode"};
|
|
|
|
"enable_bestpay", "manual_settle", "skip_clearing" ,"mail_confirm","surcharge_mode"};
|
|
|
|
for (String col : columns) {
|
|
|
|
for (String col : columns) {
|
|
|
|
simpleClient.put(col, client.get(col));
|
|
|
|
simpleClient.put(col, client.get(col));
|
|
|
|