@Override public Response<Integer> bulkImportSupplier(String excelPath) { Response<Integer> result = new Response<Integer>(); if (Strings.isNullOrEmpty(excelPath)) { log.error("excel path can not be null"); result.setError("excel.path.not.null.fail"); return result; } try { List<SupplierImportDto> supplierImportDtos = excelTransform.getSupplier(excelPath); if (supplierImportDtos == null) { log.error("suppliers not found"); result.setError("suppliers.not.found"); return result; } Integer count = accountManager.bulkCreateSupplier(supplierImportDtos); result.setResult(count); return result; } catch (Exception e) { log.error( "fail to import supplier where excel path={},cause:{}", excelPath, Throwables.getStackTraceAsString(e)); result.setError("import.supplier.fail"); return result; } }