|
|
@ -239,6 +239,7 @@ public class TenantService extends BaseService{ |
|
|
|
if (PropertyUtils.getResUploadStartupState()){ |
|
|
|
if (PropertyUtils.getResUploadStartupState()){ |
|
|
|
String tenantPath = HadoopUtils.getHdfsDataBasePath() + "/" + tenant.getTenantCode(); |
|
|
|
String tenantPath = HadoopUtils.getHdfsDataBasePath() + "/" + tenant.getTenantCode(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (HadoopUtils.getInstance().exists(tenantPath)){ |
|
|
|
String resourcePath = HadoopUtils.getHdfsDir(tenant.getTenantCode()); |
|
|
|
String resourcePath = HadoopUtils.getHdfsDir(tenant.getTenantCode()); |
|
|
|
FileStatus[] fileStatus = HadoopUtils.getInstance().listFileStatus(resourcePath); |
|
|
|
FileStatus[] fileStatus = HadoopUtils.getInstance().listFileStatus(resourcePath); |
|
|
|
if (fileStatus.length > 0) { |
|
|
|
if (fileStatus.length > 0) { |
|
|
@ -253,10 +254,10 @@ public class TenantService extends BaseService{ |
|
|
|
|
|
|
|
|
|
|
|
HadoopUtils.getInstance().delete(tenantPath, true); |
|
|
|
HadoopUtils.getInstance().delete(tenantPath, true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tenantMapper.deleteById(id); |
|
|
|
tenantMapper.deleteById(id); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -269,9 +270,6 @@ public class TenantService extends BaseService{ |
|
|
|
public Map<String, Object> queryTenantList(User loginUser) { |
|
|
|
public Map<String, Object> queryTenantList(User loginUser) { |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
// if (checkAdmin(loginUser, result)) {
|
|
|
|
|
|
|
|
// return result;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Tenant> resourceList = tenantMapper.queryAllTenant(); |
|
|
|
List<Tenant> resourceList = tenantMapper.queryAllTenant(); |
|
|
|
result.put(Constants.DATA_LIST, resourceList); |
|
|
|
result.put(Constants.DATA_LIST, resourceList); |
|
|
|