|
|
@ -696,6 +696,17 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
public JSONObject getClientInfoRealtime(JSONObject device) {
|
|
|
|
public JSONObject getClientInfoRealtime(JSONObject device) {
|
|
|
|
JSONObject clientWithConfig = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
JSONObject clientWithConfig = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
clientWithConfig.putAll(clientConfigService.find(device.getIntValue("client_id")));
|
|
|
|
clientWithConfig.putAll(clientConfigService.find(device.getIntValue("client_id")));
|
|
|
|
|
|
|
|
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(device.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (legalInfo != null) {
|
|
|
|
|
|
|
|
clientWithConfig.put("representative_person", legalInfo.getString("representative_person"));
|
|
|
|
|
|
|
|
clientWithConfig.put("representative_phone", legalInfo.getString("phone"));
|
|
|
|
|
|
|
|
clientWithConfig.put("representative_email", legalInfo.getString("email"));
|
|
|
|
|
|
|
|
clientWithConfig.put("representative_job_title", legalInfo.getString("job_title"));
|
|
|
|
|
|
|
|
clientWithConfig.put("registered_address", legalInfo.getString("address"));
|
|
|
|
|
|
|
|
clientWithConfig.put("registered_suburb", legalInfo.getString("suburb"));
|
|
|
|
|
|
|
|
clientWithConfig.put("registered_state", legalInfo.getString("state"));
|
|
|
|
|
|
|
|
clientWithConfig.put("registered_postcode", legalInfo.getString("postcode"));
|
|
|
|
|
|
|
|
}
|
|
|
|
return clientWithConfig;
|
|
|
|
return clientWithConfig;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -719,6 +730,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
public JSONObject getClientInfoMe(JSONObject device) {
|
|
|
|
public JSONObject getClientInfoMe(JSONObject device) {
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
result.put("base_info_lack", false);
|
|
|
|
result.put("base_info_lack", false);
|
|
|
|
|
|
|
|
result.put("legal_info_lack", false);
|
|
|
|
result.put("compliance_info_lack", false);
|
|
|
|
result.put("compliance_info_lack", false);
|
|
|
|
JSONObject client = clientMapper.findClient(device.getIntValue("client_id"));
|
|
|
|
JSONObject client = clientMapper.findClient(device.getIntValue("client_id"));
|
|
|
|
if (StringUtils.isEmpty(client.getString("business_structure")) || StringUtils.isEmpty(client.getString("logo_url"))
|
|
|
|
if (StringUtils.isEmpty(client.getString("business_structure")) || StringUtils.isEmpty(client.getString("logo_url"))
|
|
|
@ -728,7 +740,16 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|| (StringUtils.isEmpty(client.getString("company_website")) && StringUtils.isEmpty(client.getString("company_photo"))
|
|
|
|
|| (StringUtils.isEmpty(client.getString("company_website")) && StringUtils.isEmpty(client.getString("company_photo"))
|
|
|
|
&& StringUtils.isEmpty(client.getString("store_photo")))) {
|
|
|
|
&& StringUtils.isEmpty(client.getString("store_photo")))) {
|
|
|
|
result.put("base_info_lack", true);
|
|
|
|
result.put("base_info_lack", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(device.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(legalInfo.getString("representative_person")) || StringUtils.isEmpty(legalInfo.getString("job_title"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("phone"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("email"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("address"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("suburb"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("state"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(legalInfo.getString("postcode"))) {
|
|
|
|
|
|
|
|
result.put("legal_info_lack", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, client.getString("client_moniker"));
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, client.getString("client_moniker"));
|
|
|
|
for (String s : fileName) {
|
|
|
|
for (String s : fileName) {
|
|
|
@ -2631,9 +2652,11 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
private JSONObject getClientBaseInfo(JSONObject clientWithConfig) {
|
|
|
|
private JSONObject getClientBaseInfo(JSONObject clientWithConfig) {
|
|
|
|
JSONObject res = SignInAccountServiceImpl.clientInfoWithNoSecretInfo(clientWithConfig);
|
|
|
|
JSONObject res = SignInAccountServiceImpl.clientInfoWithNoSecretInfo(clientWithConfig);
|
|
|
|
res.put("is_skip_clearing", res.getBoolean("skip_clearing"));
|
|
|
|
res.put("is_skip_clearing", res.getBoolean("skip_clearing"));
|
|
|
|
|
|
|
|
JSONObject clientLegalInfo = null;
|
|
|
|
if ("4".equals(clientWithConfig.getString("source"))) {
|
|
|
|
if ("4".equals(clientWithConfig.getString("source"))) {
|
|
|
|
res.put("refuse_remark", clientWithConfig.getString("refuse_remark"));
|
|
|
|
res.put("refuse_remark", clientWithConfig.getString("refuse_remark"));
|
|
|
|
res.put("base_info_lack", false);
|
|
|
|
res.put("base_info_lack", false);
|
|
|
|
|
|
|
|
res.put("legal_info_lack", false);
|
|
|
|
res.put("compliance_info_lack", false);
|
|
|
|
res.put("compliance_info_lack", false);
|
|
|
|
if (StringUtils.isEmpty(clientWithConfig.getString("business_structure")) || StringUtils.isEmpty(clientWithConfig.getString("logo_url"))
|
|
|
|
if (StringUtils.isEmpty(clientWithConfig.getString("business_structure")) || StringUtils.isEmpty(clientWithConfig.getString("logo_url"))
|
|
|
|
|| StringUtils.isEmpty(clientWithConfig.getString("description"))
|
|
|
|
|| StringUtils.isEmpty(clientWithConfig.getString("description"))
|
|
|
@ -2642,7 +2665,16 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|| (StringUtils.isEmpty(clientWithConfig.getString("company_website")) && StringUtils.isEmpty(clientWithConfig.getString("company_photo"))
|
|
|
|
|| (StringUtils.isEmpty(clientWithConfig.getString("company_website")) && StringUtils.isEmpty(clientWithConfig.getString("company_photo"))
|
|
|
|
&& StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) {
|
|
|
|
&& StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) {
|
|
|
|
res.put("base_info_lack", true);
|
|
|
|
res.put("base_info_lack", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
clientLegalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(res.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(clientLegalInfo.getString("representative_person")) || StringUtils.isEmpty(clientLegalInfo.getString("job_title"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("phone"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("email"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("address"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("suburb"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("state"))
|
|
|
|
|
|
|
|
|| StringUtils.isEmpty(clientLegalInfo.getString("postcode"))) {
|
|
|
|
|
|
|
|
res.put("legal_info_lack", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, clientWithConfig.getString("client_moniker"));
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, clientWithConfig.getString("client_moniker"));
|
|
|
|
for (String s : fileName) {
|
|
|
|
for (String s : fileName) {
|
|
|
@ -2651,12 +2683,11 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject clientLegal = sysClientLegalPersonMapper.findRepresentativeInfo(res.getIntValue("client_id"));
|
|
|
|
if (clientLegalInfo != null) {
|
|
|
|
if (clientLegal != null) {
|
|
|
|
res.put("legal_person", clientLegalInfo.getString("representative_person"));
|
|
|
|
res.put("legal_person", clientLegal.getString("representative_person"));
|
|
|
|
res.put("legal_job_title", clientLegalInfo.getString("job_title"));
|
|
|
|
res.put("legal_job_title", clientLegal.getString("job_title"));
|
|
|
|
res.put("legal_phone", clientLegalInfo.getString("phone"));
|
|
|
|
res.put("legal_phone", clientLegal.getString("phone"));
|
|
|
|
res.put("legal_email", clientLegalInfo.getString("email"));
|
|
|
|
res.put("legal_email", clientLegal.getString("email"));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|