|
|
|
@ -421,27 +421,31 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
public JSONObject getClientInfo(JSONObject device) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
JSONObject clientWithConfig = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject clientWithConfig = clientMapper.findClient(device.getIntValue("client_id"));
|
|
|
|
|
clientWithConfig.putAll(clientConfigService.find(device.getIntValue("client_id")));
|
|
|
|
|
JSONObject res = SignInAccountServiceImpl.clientInfoWithNoSecretInfo(clientWithConfig);
|
|
|
|
|
res.put("is_skip_clearing", res.getBoolean("skip_clearing"));
|
|
|
|
|
if (clientType.equals("iphone")) {
|
|
|
|
|
res.put("skip_clearing", !res.getBoolean("skip_clearing"));
|
|
|
|
|
}
|
|
|
|
|
if("4".equals(clientWithConfig.getString("source"))) {
|
|
|
|
|
res.put("refuse_remark", clientWithConfig.getString("refuse_remark"));
|
|
|
|
|
res.put("base_info_lack", false);
|
|
|
|
|
res.put("compliance_info_lack", false);
|
|
|
|
|
if (StringUtils.isEmpty(clientWithConfig.getString("business_structure")) ||
|
|
|
|
|
StringUtils.isEmpty(clientWithConfig.getString("logo_url")) ||
|
|
|
|
|
StringUtils.isEmpty(clientWithConfig.getString("description")) ||
|
|
|
|
|
("Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("acn"))) ||
|
|
|
|
|
(!"Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("abn"))) ||
|
|
|
|
|
(StringUtils.isEmpty(clientWithConfig.getString("company_website")) && StringUtils.isEmpty(clientWithConfig.getString("company_photo")) && StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) {
|
|
|
|
|
res.put("base_info_lack", true);
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(clientWithConfig.getString("business_structure"))||
|
|
|
|
|
StringUtils.isEmpty(clientWithConfig.getString("logo_url"))||
|
|
|
|
|
StringUtils.isEmpty(clientWithConfig.getString("description")) ||
|
|
|
|
|
("Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("acn")))||
|
|
|
|
|
(!"Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("abn")))||
|
|
|
|
|
(StringUtils.isEmpty(clientWithConfig.getString("company_website")) && StringUtils.isEmpty(clientWithConfig.getString("company_photo")) &&StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) {
|
|
|
|
|
res.put("base_info_lack", true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, clientWithConfig.getString("client_moniker"));
|
|
|
|
|
for (String s : fileName) {
|
|
|
|
|
if (file.getString(s) == null) {
|
|
|
|
|
res.put("compliance_info_lack", true);
|
|
|
|
|
}
|
|
|
|
|
JSONObject file = clientManager.getAuthFiles(null, clientWithConfig.getString("client_moniker"));
|
|
|
|
|
for (String s : fileName) {
|
|
|
|
|
if (file.getString(s) == null) {
|
|
|
|
|
res.put("compliance_info_lack", true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return res;
|
|
|
|
|