Commit 00df32e5 authored by Nguyen Ha's avatar Nguyen Ha

Merge remote-tracking branch 'origin/master'

parents bd05e47b 2f4944a3
...@@ -11,23 +11,16 @@ import java.util.List; ...@@ -11,23 +11,16 @@ import java.util.List;
public interface CustomerListMappingRepository extends JpaRepository<CustomerListMapping, Long> { public interface CustomerListMappingRepository extends JpaRepository<CustomerListMapping, Long> {
// ----------- customer ------------ // // ----------- customer ------------ //
@Query("select c from CustomerListMapping c where c.customerId in (:p_ids) and c.customerListId =:p_customer_list_id and c.companySiteId=:p_company_site_id") @Query("select c from CustomerListMapping c where c.customerId in (:p_ids) and c.customerListId =:p_customer_list_id and c.companySiteId=:p_company_site_id")
List<CustomerListMapping> findAllCustomerListMapping(@Param("p_ids") List<Long> p_ids, @Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id); List<CustomerListMapping> findAllCustomerListMapping(@Param("p_ids") List<Long> p_ids, @Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id);
@Modifying
@Query("delete from CustomerListMapping c where c.customerId=:p_customer_id and c.customerListId=:p_customer_list_id and c.companySiteId=:p_company_site_id")
int deleteMappingByCustomerId(@Param("p_customer_id") Long p_customer_id, @Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id);
@Modifying @Modifying
@Query("delete from CustomerListMapping c where c.customerId in (:p_ids) and c.customerListId =:p_customer_list_id and c.companySiteId=:p_company_site_id") @Query("delete from CustomerListMapping c where c.customerId in (:p_ids) and c.customerListId =:p_customer_list_id and c.companySiteId=:p_company_site_id")
int deleteMappingByCustomerIds(@Param("p_ids") List<Long> p_ids, @Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id); int deleteMappingByCustomerIds(@Param("p_ids") List<Long> p_ids, @Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id);
// ----------- customer list --------------- // // ----------- customer list --------------- //
@Modifying
@Query("delete from CustomerListMapping c where c.customerListId=:p_customer_list_id and c.companySiteId=:p_company_site_id")
int deleteMappingByCustomerListId(@Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id);
@Modifying @Modifying
@Query("delete from CustomerListMapping c where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id") @Query("delete from CustomerListMapping c where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id")
int deleteMappingByCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id); int deleteMappingByCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id);
......
...@@ -17,14 +17,7 @@ public interface CustomerListRepository extends JpaRepository<CustomerList, Long ...@@ -17,14 +17,7 @@ public interface CustomerListRepository extends JpaRepository<CustomerList, Long
@Query("select c from CustomerList c where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id and c.status = 1") @Query("select c from CustomerList c where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id and c.status = 1")
List<CustomerList> findAllCustomerList(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id); List<CustomerList> findAllCustomerList(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id);
@Modifying
@Query("update CustomerList c set c.status = 0 where c.customerListId=:p_customer_list_id and c.companySiteId=:p_company_site_id")
int deleteCustomerList(@Param("p_customer_list_id") Long p_customer_list_id, @Param("p_company_site_id") Long p_company_site_id);
@Modifying @Modifying
@Query("update CustomerList c set c.status = 0 where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id") @Query("update CustomerList c set c.status = 0 where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id")
int deleteCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id); int deleteCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id);
@Query(value = "SELECT * FROM (SELECT c.*, MAX(c.CREATE_AT) OVER() AS LATEST_CREATED FROM CUSTOMER_LIST c) WHERE CREATE_AT = LATEST_CREATED AND COMPANY_SITE_ID =:p_company_site_id", nativeQuery = true)
CustomerList latestCreated(@Param("p_company_site_id") Long p_company_site_id);
} }
...@@ -19,6 +19,8 @@ public interface CustomerRepository extends JpaRepository<Customer, Long>, Custo ...@@ -19,6 +19,8 @@ public interface CustomerRepository extends JpaRepository<Customer, Long>, Custo
Page<Customer> findAll(Pageable pageable); Page<Customer> findAll(Pageable pageable);
Customer getByCustomerId(Long customerId);
List<Customer> findByCustomerId(Long customerId); List<Customer> findByCustomerId(Long customerId);
@Query("FROM Customer WHERE name = ?1") @Query("FROM Customer WHERE name = ?1")
......
package com.viettel.campaign.repository.ccms_full; package com.viettel.campaign.repository.ccms_full;
import com.viettel.campaign.web.dto.CustomerCustomDTO; import com.viettel.campaign.web.dto.*;
import com.viettel.campaign.web.dto.request_dto.CustomerDetailRequestDTO; import com.viettel.campaign.web.dto.request_dto.CustomerDetailRequestDTO;
import com.viettel.campaign.web.dto.request_dto.SearchCustomerRequestDTO; import com.viettel.campaign.web.dto.request_dto.SearchCustomerRequestDTO;
import com.viettel.econtact.filter.UserSession;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
...@@ -12,4 +13,12 @@ public interface CustomerRepositoryCustom { ...@@ -12,4 +13,12 @@ public interface CustomerRepositoryCustom {
List<CustomerDetailRequestDTO> getCustomerDetailById(Long companySiteId, Long customerListId, Long customerId); List<CustomerDetailRequestDTO> getCustomerDetailById(Long companySiteId, Long customerListId, Long customerId);
List<CustomerCustomDTO> getAllCustomerByParams(SearchCustomerRequestDTO searchCustomerRequestDTO, Pageable pageable); List<CustomerCustomDTO> getAllCustomerByParams(SearchCustomerRequestDTO searchCustomerRequestDTO, Pageable pageable);
List<CampaignInformationDTO> getCampaignInformation(CampaignCustomerDTO campaignCustomerDTO);
List<CustomerDTO> getIndividualCustomerInfo(CampaignCustomerDTO campaignCustomerDTO);
List<CustomerListDTO> getCustomerListInfo(CampaignCustomerDTO campaignCustomerDTO);
List<CustomerDTO> getCustomizeFields(CampaignCustomerDTO campaignCustomerDTO, UserSession userSession, Pageable pageable);
} }
...@@ -15,4 +15,6 @@ import java.util.List; ...@@ -15,4 +15,6 @@ import java.util.List;
public interface CustomerTimeRepository extends JpaRepository<CustomerTime, Long> { public interface CustomerTimeRepository extends JpaRepository<CustomerTime, Long> {
List<CustomerTime> findByCustomerId(Long customerId); List<CustomerTime> findByCustomerId(Long customerId);
CustomerTime findByCompanySiteIdAndCustomerId(Long companySiteId, Long customerId);
} }
...@@ -4,4 +4,5 @@ import com.viettel.campaign.model.ccms_full.ReceiveCustLog; ...@@ -4,4 +4,5 @@ import com.viettel.campaign.model.ccms_full.ReceiveCustLog;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface ReceiveCustLogRepository extends JpaRepository<ReceiveCustLog, Long> { public interface ReceiveCustLogRepository extends JpaRepository<ReceiveCustLog, Long> {
ReceiveCustLog getByReceiveCustLogId(Long receiveCustLogId);
} }
...@@ -105,6 +105,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -105,6 +105,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
public List<ContactCustResultDTO> getInteractiveResult(CampaignRequestDTO dto, Pageable pageable) { public List<ContactCustResultDTO> getInteractiveResult(CampaignRequestDTO dto, Pageable pageable) {
ResultDTO resultDTO = new ResultDTO(); ResultDTO resultDTO = new ResultDTO();
List<ContactCustResultDTO> list = new ArrayList<>(); List<ContactCustResultDTO> list = new ArrayList<>();
TimeZone tzClient = TimeZoneUtils.getZoneMinutes(dto.getTimezone());
SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession(); Session session = sessionFactory.openSession();
...@@ -125,7 +126,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -125,7 +126,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
sql.append(" CC2.COMPLETE_NAME AS surveyStatus, "); sql.append(" CC2.COMPLETE_NAME AS surveyStatus, ");
sql.append(" C.STATUS AS status, "); sql.append(" C.STATUS AS status, ");
sql.append(" CCR.STATUS AS recordStatus, "); sql.append(" CCR.STATUS AS recordStatus, ");
sql.append(" (( CCR.END_TIME - CCR.START_CALL ) * 24 * 60 * 60) AS callTime, "); sql.append(" ROUND(( CCR.END_TIME - CCR.START_CALL ) * 24 * 60 * 60) AS callTime, ");
sql.append(" C.CAMPAIGN_ID AS campaignId, "); sql.append(" C.CAMPAIGN_ID AS campaignId, ");
sql.append(" CUS.CUSTOMER_ID AS customerId "); sql.append(" CUS.CUSTOMER_ID AS customerId ");
sql.append("FROM CONTACT_CUST_RESULT CCR "); sql.append("FROM CONTACT_CUST_RESULT CCR ");
...@@ -133,11 +134,11 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -133,11 +134,11 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
sql.append(" INNER JOIN VSA_USERS VU ON CCR.AGENT_ID = VU.USER_ID "); sql.append(" INNER JOIN VSA_USERS VU ON CCR.AGENT_ID = VU.USER_ID ");
sql.append(" INNER JOIN CUSTOMER CUS ON CCR.CUSTOMER_ID = CUS.CUSTOMER_ID "); sql.append(" INNER JOIN CUSTOMER CUS ON CCR.CUSTOMER_ID = CUS.CUSTOMER_ID ");
sql.append(" INNER JOIN CAMPAIGN_COMPLETE_CODE CC1 ON CCR.CONTACT_STATUS = CC1.COMPLETE_VALUE "); sql.append(" INNER JOIN CAMPAIGN_COMPLETE_CODE CC1 ON CCR.CONTACT_STATUS = CC1.COMPLETE_VALUE ");
sql.append(" LEFT JOIN CAMPAIGN_COMPLETE_CODE CC2 ON CCR.CALL_STATUS = CC2.COMPLETE_VALUE "); sql.append(" LEFT JOIN CAMPAIGN_COMPLETE_CODE CC2 ON CCR.CALL_STATUS = CC2.COMPLETE_VALUE ");
sql.append("WHERE CCR.STATUS <> 0 "); sql.append("WHERE CCR.STATUS <> 0 ");
sql.append(" AND CCR.COMPANY_SITE_ID = :p_company_site_id "); sql.append(" AND CCR.COMPANY_SITE_ID = :p_company_site_id ");
sql.append(" AND to_date(CCR.CREATE_TIME, 'DD/MM/RR') >= to_date(:p_date_from, 'DD/MM/RR') "); sql.append(" AND to_date(CCR.CREATE_TIME, 'DD/MM/RR') >= to_date(:p_date_from, 'DD/MM/YYYY HH24:MI:SS') ");
sql.append(" AND to_date(CCR.CREATE_TIME, 'DD/MM/RR') <= to_date(:p_date_to, 'DD/MM/RR') "); sql.append(" AND to_date(CCR.CREATE_TIME, 'DD/MM/RR') <= to_date(:p_date_to, 'DD/MM/YYYY HH24:MI:SS') ");
if (!DataUtil.isNullOrEmpty(dto.getCustomerId())) { if (!DataUtil.isNullOrEmpty(dto.getCustomerId())) {
sql.append(" AND CCR.CUSTOMER_ID LIKE (:p_customer_id) "); sql.append(" AND CCR.CUSTOMER_ID LIKE (:p_customer_id) ");
...@@ -185,8 +186,10 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -185,8 +186,10 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
SQLQuery query = session.createSQLQuery(sql.toString()); SQLQuery query = session.createSQLQuery(sql.toString());
query.setParameter("p_company_site_id", dto.getCompanySiteId()); query.setParameter("p_company_site_id", dto.getCompanySiteId());
query.setParameter("p_date_from", dto.getFromDate()); //query.setParameter("p_date_from", dto.getFromDate());
query.setParameter("p_date_to", dto.getToDate()); query.setParameter("p_date_from", TimeZoneUtils.toDateStringWithTimeZone(DateTimeUtil.parseDate("dd/MM/yyyy", dto.getFromDate()), tzClient));
//query.setParameter("p_date_to", dto.getToDate());
query.setParameter("p_date_to", TimeZoneUtils.toDateStringWithTimeZone(DateTimeUtil.parseDate("dd/MM/yyyy", dto.getToDate()), tzClient));
if (!DataUtil.isNullOrEmpty(dto.getCustomerId())) { if (!DataUtil.isNullOrEmpty(dto.getCustomerId())) {
query.setParameter("p_customer_id", "%" + query.setParameter("p_customer_id", "%" +
...@@ -523,8 +526,8 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -523,8 +526,8 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
query.setParameter("pCampaignName", "%" + query.setParameter("pCampaignName", "%" +
campaignRequestDto.getCampaignName().toUpperCase() campaignRequestDto.getCampaignName().toUpperCase()
.replace("\\", "\\\\") .replace("\\", "\\\\")
.replaceAll("%", "\\\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\\\_") .replaceAll("_", "\\_")
+ "%"); + "%");
} }
......
...@@ -35,14 +35,10 @@ public interface CustomerService { ...@@ -35,14 +35,10 @@ public interface CustomerService {
ResultDTO updateCustomerList(CustomerListDTO customerListDTO, String userName); ResultDTO updateCustomerList(CustomerListDTO customerListDTO, String userName);
ResultDTO deleteCustomerList(CustomerListDTO customerListDTO);
ResultDTO deleteCustomerListIds(CustomerRequestDTO customerRequestDTO); ResultDTO deleteCustomerListIds(CustomerRequestDTO customerRequestDTO);
ResultDTO searchCustomerList(SearchCustomerListRequestDTO searchCustomerListRequestDTO); ResultDTO searchCustomerList(SearchCustomerListRequestDTO searchCustomerListRequestDTO);
CustomerList getLatestCreated(Long companySiteId);
// ------------ customer contact ------------ // // ------------ customer contact ------------ //
ResultDTO getCustomerContact(CustomerContactDTO customer); ResultDTO getCustomerContact(CustomerContactDTO customer);
......
...@@ -28,7 +28,7 @@ public interface ScenarioService { ...@@ -28,7 +28,7 @@ public interface ScenarioService {
XSSFWorkbook buildTemplate() throws IOException; XSSFWorkbook buildTemplate() throws IOException;
Map<String, Object> readAndValidateCustomer(String path, Long scenarioId, Long campaignId, Long companySiteId) throws IOException; Map<String, Object> readAndValidateScenario(String path, Long scenarioId, Long campaignId, Long companySiteId) throws IOException;
List<ContactQuestResult> getContactQuestResult(Long companySiteId, Long campaignId, Long customerId); List<ContactQuestResult> getContactQuestResult(Long companySiteId, Long campaignId, Long customerId);
} }
...@@ -383,14 +383,18 @@ public class CampaignCfgServiceImpl implements CampaignCfgService { ...@@ -383,14 +383,18 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
public ResultDTO getListStatus(String completeValue, Short completeType, Long companySiteId) { public ResultDTO getListStatus(String completeValue, Short completeType, Long companySiteId) {
ResultDTO resultDTO = new ResultDTO(); ResultDTO resultDTO = new ResultDTO();
List<CampaignCfg> list = new ArrayList<>(); List<CampaignCfg> list = new ArrayList<>();
CampaignCfg cfg = new CampaignCfg();
try { try {
if (completeValue == null || completeValue.equalsIgnoreCase("null")) if (completeValue == null || completeValue.equalsIgnoreCase("null"))
list = completeCodeRepository.getCustomerStatusByType(completeType, companySiteId); list = completeCodeRepository.getCustomerStatusByType(completeType, companySiteId);
else if (completeType == null)
cfg = completeCodeRepository.findByCompanySiteIdAndCompleteValue(companySiteId, completeValue);
else else
list = completeCodeRepository.getCustomerStatus(completeValue, completeType, companySiteId); list = completeCodeRepository.getCustomerStatus(completeValue, completeType, companySiteId);
resultDTO.setListData(list); resultDTO.setListData(list);
resultDTO.setData(cfg);
resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS); resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS);
resultDTO.setDescription(Constants.ApiErrorDesc.SUCCESS); resultDTO.setDescription(Constants.ApiErrorDesc.SUCCESS);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -80,7 +80,6 @@ public class ScenarioQuestionServiceImpl implements ScenarioQuestionService { ...@@ -80,7 +80,6 @@ public class ScenarioQuestionServiceImpl implements ScenarioQuestionService {
if (scenarioQuestionDTO.getLstAnswers().size() > 0) { if (scenarioQuestionDTO.getLstAnswers().size() > 0) {
lstAnswers = scenarioQuestionDTO.getLstAnswers(); lstAnswers = scenarioQuestionDTO.getLstAnswers();
lstAnswers.forEach(item -> { lstAnswers.forEach(item -> {
item.setCode(scenarioQuestion.getCode() + "_" + item.getOrderIndex());
item.setScenarioQuestionId(scenarioQuestion.getScenarioQuestionId()); item.setScenarioQuestionId(scenarioQuestion.getScenarioQuestionId());
item.setCreateTime(new Date()); item.setCreateTime(new Date());
item.setStatus((short) 1); item.setStatus((short) 1);
......
...@@ -254,7 +254,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -254,7 +254,7 @@ public class ScenarioServiceImpl implements ScenarioService {
@Override @Override
@Transactional(DataSourceQualify.CCMS_FULL) @Transactional(DataSourceQualify.CCMS_FULL)
public Map<String, Object> readAndValidateCustomer (String path, Long scenarioId, Long campaignId, Long companySiteId) throws IOException{ public Map<String, Object> readAndValidateScenario (String path, Long scenarioId, Long campaignId, Long companySiteId) throws IOException{
Locale locale = new Locale("vi", "VN"); Locale locale = new Locale("vi", "VN");
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
...@@ -551,6 +551,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -551,6 +551,7 @@ public class ScenarioServiceImpl implements ScenarioService {
lstQuestions.forEach(q2 -> { lstQuestions.forEach(q2 -> {
List<ScenarioAnswerDTO> lstAnswers = q2.getLstAnswers(); List<ScenarioAnswerDTO> lstAnswers = q2.getLstAnswers();
lstAnswers.forEach(a2 -> { lstAnswers.forEach(a2 -> {
a2.setCode(q2.getCode() + "_" + a2.getOrderIndex());
ScenarioQuestionDTO mappingQuestion = lstQuestions.stream().filter(mq -> mq.getImportCode().equals(a2.getMappingQuestionCode())).findFirst().orElse(null); ScenarioQuestionDTO mappingQuestion = lstQuestions.stream().filter(mq -> mq.getImportCode().equals(a2.getMappingQuestionCode())).findFirst().orElse(null);
if (mappingQuestion != null) { if (mappingQuestion != null) {
a2.setMappingQuestionCode(mappingQuestion.getCode()); a2.setMappingQuestionCode(mappingQuestion.getCode());
......
...@@ -18,6 +18,7 @@ public class CampaignCustomerDTO extends BaseDTO{ ...@@ -18,6 +18,7 @@ public class CampaignCustomerDTO extends BaseDTO{
private Date recallTime; private Date recallTime;
private Long recallCount = 0L; private Long recallCount = 0L;
private Date callTime; private Date callTime;
private Long callTimeL;
private Long customerListId; private Long customerListId;
private Short inCampaignStatus; private Short inCampaignStatus;
private Date sendTime; private Date sendTime;
......
...@@ -40,7 +40,8 @@ public class ContactCustResultDTO extends BaseDTO { ...@@ -40,7 +40,8 @@ public class ContactCustResultDTO extends BaseDTO {
private Short isFinalRecall; private Short isFinalRecall;
private Short isSendEmail = 0; private Short isSendEmail = 0;
private Long saledOnTpin; private Long saledOnTpin;
private Long endTime; // api get call return Long private Long endTimeL; // api get call return Long
private Date endTime;
// private Date endTime; // private Date endTime;
private Long waitTime; private Long waitTime;
private String dialMode; private String dialMode;
...@@ -59,4 +60,5 @@ public class ContactCustResultDTO extends BaseDTO { ...@@ -59,4 +60,5 @@ public class ContactCustResultDTO extends BaseDTO {
private Integer totalRow; private Integer totalRow;
private String eventCall; private String eventCall;
private Boolean checkUpdate = false;
} }
...@@ -107,14 +107,6 @@ public class CustomerController { ...@@ -107,14 +107,6 @@ public class CustomerController {
return customerService.updateCustomerList(customerListDTO, userSession.getUserName()); return customerService.updateCustomerList(customerListDTO, userSession.getUserName());
} }
@PostMapping("/deleteCustomerList")
@ResponseBody
public ResultDTO deleteCustomerList(@RequestBody @Valid CustomerListDTO customerListDTO) {
ResultDTO result = new ResultDTO();
result = customerService.deleteCustomerList(customerListDTO);
return result;
}
@PostMapping("/deleteCustomerListIds") @PostMapping("/deleteCustomerListIds")
@ResponseBody @ResponseBody
public ResultDTO deleteCustomerListIds(@RequestBody @Valid CustomerRequestDTO customerRequestDTO) { public ResultDTO deleteCustomerListIds(@RequestBody @Valid CustomerRequestDTO customerRequestDTO) {
...@@ -129,14 +121,6 @@ public class CustomerController { ...@@ -129,14 +121,6 @@ public class CustomerController {
return new ResponseEntity<>(result, HttpStatus.OK); return new ResponseEntity<>(result, HttpStatus.OK);
} }
@GetMapping("/latestCreated")
@ResponseBody
public ResponseEntity getLatestCreated(@RequestParam("companySiteId") Long companySiteId) {
ResultDTO result = new ResultDTO();
result.setData(customerService.getLatestCreated(companySiteId));
return new ResponseEntity<>(result, HttpStatus.OK);
}
@PostMapping("/findCustomerContact") @PostMapping("/findCustomerContact")
@ResponseBody @ResponseBody
public ResponseEntity<ResultDTO> findAllCustomerContact(@RequestBody CustomerContactDTO customerContactDTO) { public ResponseEntity<ResultDTO> findAllCustomerContact(@RequestBody CustomerContactDTO customerContactDTO) {
......
...@@ -118,7 +118,7 @@ public class ScenarioController { ...@@ -118,7 +118,7 @@ public class ScenarioController {
return new ResponseEntity<>(BundleUtils.getLangString("common.fileInvalidFormat", locale), HttpStatus.OK); return new ResponseEntity<>(BundleUtils.getLangString("common.fileInvalidFormat", locale), HttpStatus.OK);
} }
String path = saveUploadFile(file); String path = saveUploadFile(file);
Map<String, Object> map = scenarioService.readAndValidateCustomer(path, scenarioId, campaignId, userSession.getCompanySiteId()); Map<String, Object> map = scenarioService.readAndValidateScenario(path, scenarioId, campaignId, userSession.getCompanySiteId());
String code = (String) map.get("code"); String code = (String) map.get("code");
byte[] content = (byte[]) map.get("content"); byte[] content = (byte[]) map.get("content");
return ResponseEntity.ok() return ResponseEntity.ok()
......
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