add app自助进件优化

master
luoyang 5 years ago
parent 515fc8ca91
commit bd6e58ee3b

@ -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;
} }

@ -57,22 +57,7 @@ public class ClientPreApplyBean {
private String client_pay_type = "2"; private String client_pay_type = "2";
private String client_pay_desc = "201"; private String client_pay_desc = "201";
private String contact_job;
private String representative_person;
private String representative_phone;
private String representative_email;
private String representative_job_title;
private String registered_address;
private String registered_suburb;
private String registered_state;
private String registered_postcode;
private String logo_url;
private String company_website;
private String company_photo;
private String alipayindustry;
private String wechatindustry;
private String store_photo;
private String contract_url;
public JSONObject insertObject() { public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this); JSONObject res = (JSONObject) JSON.toJSON(this);
@ -270,132 +255,4 @@ public class ClientPreApplyBean {
public String getClient_pay_desc() { public String getClient_pay_desc() {
return client_pay_desc; return client_pay_desc;
} }
public String getContact_job() {
return contact_job;
}
public void setContact_job(String contact_job) {
this.contact_job = contact_job;
}
public String getRepresentative_person() {
return representative_person;
}
public void setRepresentative_person(String representative_person) {
this.representative_person = representative_person;
}
public String getRepresentative_phone() {
return representative_phone;
}
public void setRepresentative_phone(String representative_phone) {
this.representative_phone = representative_phone;
}
public String getRepresentative_email() {
return representative_email;
}
public void setRepresentative_email(String representative_email) {
this.representative_email = representative_email;
}
public String getRepresentative_job_title() {
return representative_job_title;
}
public void setRepresentative_job_title(String representative_job_title) {
this.representative_job_title = representative_job_title;
}
public String getRegistered_address() {
return registered_address;
}
public void setRegistered_address(String registered_address) {
this.registered_address = registered_address;
}
public String getRegistered_suburb() {
return registered_suburb;
}
public void setRegistered_suburb(String registered_suburb) {
this.registered_suburb = registered_suburb;
}
public String getRegistered_state() {
return registered_state;
}
public void setRegistered_state(String registered_state) {
this.registered_state = registered_state;
}
public String getRegistered_postcode() {
return registered_postcode;
}
public void setRegistered_postcode(String registered_postcode) {
this.registered_postcode = registered_postcode;
}
public String getLogo_url() {
return logo_url;
}
public void setLogo_url(String logo_url) {
this.logo_url = logo_url;
}
public String getCompany_website() {
return company_website;
}
public void setCompany_website(String company_website) {
this.company_website = company_website;
}
public String getCompany_photo() {
return company_photo;
}
public void setCompany_photo(String company_photo) {
this.company_photo = company_photo;
}
public String getAlipayindustry() {
return alipayindustry;
}
public void setAlipayindustry(String alipayindustry) {
this.alipayindustry = alipayindustry;
}
public String getStore_photo() {
return store_photo;
}
public void setStore_photo(String store_photo) {
this.store_photo = store_photo;
}
public String getWechatindustry() {
return wechatindustry;
}
public void setWechatindustry(String wechatindustry) {
this.wechatindustry = wechatindustry;
}
public void setContract_url(String contract_url) {
this.contract_url = contract_url;
}
public String getContract_url() {
return contract_url;
}
} }

@ -57,18 +57,18 @@ public class ClientUpdateInfo {
private String country; private String country;
@Pattern(regexp = "^((Australia/West)|(Australia/Eucla)|(Australia/North)|(Australia/South)|(Australia/Brisbane)|(Australia/Melbourne)|(Australia/LHI))$", message = "error.payment.valid.invalid_timezone") @Pattern(regexp = "^((Australia/West)|(Australia/Eucla)|(Australia/North)|(Australia/South)|(Australia/Brisbane)|(Australia/Melbourne)|(Australia/LHI))$", message = "error.payment.valid.invalid_timezone")
private String timezone; private String timezone;
// private String jdindustry;
// private String royalpayindustry;
// private String referrer_id;
// private String referrer_name;
//
private String client_apply_id; private String client_apply_id;
// private String contact_job;
// private String business_hours; private String representative_person;
// private String merchant_introduction; private String representative_phone;
// private String merchant_tag; private String representative_email;
// private String merchant_video_url; private String representative_job_title;
private String registered_address;
private String registered_suburb;
private String registered_state;
private String registered_postcode;
private String logo_url;
public JSONObject insertObject() { public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this); JSONObject res = (JSONObject) JSON.toJSON(this);
@ -325,7 +325,85 @@ public class ClientUpdateInfo {
this.businessStructure = businessStructure; this.businessStructure = businessStructure;
} }
public String getContact_job() {
return contact_job;
}
public String getLogo_url() {
return logo_url;
}
public String getRegistered_address() {
return registered_address;
}
public String getRegistered_postcode() {
return registered_postcode;
}
public String getRegistered_state() {
return registered_state;
}
public String getRegistered_suburb() {
return registered_suburb;
}
public String getRepresentative_email() {
return representative_email;
}
public String getRepresentative_job_title() {
return representative_job_title;
}
public String getRepresentative_person() {
return representative_person;
}
public String getRepresentative_phone() {
return representative_phone;
}
public void setContact_job(String contact_job) {
this.contact_job = contact_job;
}
public void setLogo_url(String logo_url) {
this.logo_url = logo_url;
}
public void setRegistered_address(String registered_address) {
this.registered_address = registered_address;
}
public void setRegistered_postcode(String registered_postcode) {
this.registered_postcode = registered_postcode;
}
public void setRegistered_state(String registered_state) {
this.registered_state = registered_state;
}
public void setRegistered_suburb(String registered_suburb) {
this.registered_suburb = registered_suburb;
}
public void setRepresentative_email(String representative_email) {
this.representative_email = representative_email;
}
public void setRepresentative_job_title(String representative_job_title) {
this.representative_job_title = representative_job_title;
}
public void setRepresentative_person(String representative_person) {
this.representative_person = representative_person;
}
public void setRepresentative_phone(String representative_phone) {
this.representative_phone = representative_phone;
}
// public String getReferrer_id() { // public String getReferrer_id() {
// return referrer_id; // return referrer_id;

@ -906,6 +906,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
clientMapper.update(info); clientMapper.update(info);
if (StringUtils.isNotBlank(info.getString("representative_person"))) {
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
legal.put("job_title", info.getString("representative_job_title"));
legal.put("phone", info.getString("representative_phone"));
legal.put("email", info.getString("representative_email"));
legal.put("address", info.getString("registered_address"));
legal.put("suburb", info.getString("registered_suburb"));
legal.put("state", info.getString("registered_state"));
legal.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legal);
}
saveOrUpdateMailList(info, client); saveOrUpdateMailList(info, client);
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
} }

@ -10,7 +10,7 @@
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script> <script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
<meta content="#ffffff" name="msapplication-TileColor" /> <meta content="#ffffff" name="msapplication-TileColor" />
<script type="text/javascript" data-th-inline="javascript"> <script type="text/javascript" data-th-inline="javascript">
window.email = /*[[*{_client.contact_email}]]*/''; window.email = /*[[*{client.contact_email}]]*/'';
window.id = /*[[*{client.client_id}]]*/''; window.id = /*[[*{client.client_id}]]*/'';
window.name = /*[[*{client.contact_person}]]*/''; window.name = /*[[*{client.contact_person}]]*/'';
window.country = /*[[*{client.country}]]*/''; window.country = /*[[*{client.country}]]*/'';

Loading…
Cancel
Save