Commit 744ddebd authored by đinh thị đầm's avatar đinh thị đầm
parents 985bcd08 f7378f37
......@@ -489,16 +489,8 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
List<CampaignCustomer> lst = null;//campaignCustomerRepository.getCustomerRecallDate(dto.getCampaignId(), dto.getAgentId(), dto.getCompanySiteId(), );
if (lst != null) {
result.setErrorCode(Constants.ApiErrorCode.SUCCESS);
result.setDescription(Constants.ApiErrorDesc.SUCCESS);
//result.setTotalRow(count);
//result.setListData(campaignExecuteRepository.searchCampaignExecute(requestDto, SQLBuilder.buildPageable(requestDto)));
//result.setData(data);
} else {
result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR);
}
result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR);
return result;
}
......
......@@ -253,6 +253,7 @@ public class ScenarioServiceImpl implements ScenarioService {
StringBuilder sb = new StringBuilder();
boolean isValid = true;
XSSFWorkbook workbook = null;
FileInputStream fis = null;
try {
List<String> fileHeaderList = new ArrayList<>();
fileHeaderList.add(BundleUtils.getLangString("scenario.template.questionCode", locale));
......@@ -265,7 +266,7 @@ public class ScenarioServiceImpl implements ScenarioService {
fileHeaderList.add(BundleUtils.getLangString("scenario.template.mappingQuestion", locale));
File file = new File(path);
FileInputStream fis = new FileInputStream(file);
fis = new FileInputStream(file);
workbook = new XSSFWorkbook(fis);
ByteArrayOutputStream os = new ByteArrayOutputStream();
Sheet sheet = workbook.getSheetAt(0);
......@@ -447,6 +448,7 @@ public class ScenarioServiceImpl implements ScenarioService {
result.put("message", BundleUtils.getLangString("customer.errorValidate", locale));
}finally {
if (workbook != null) workbook.close();
if(fis != null) fis.close();
}
return result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment