Commit c15a89e0 authored by đinh thị đầm's avatar đinh thị đầm

searchIndividualCustomer edit

parent 59972098
...@@ -1888,6 +1888,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1888,6 +1888,7 @@ public class CustomerServiceImpl implements CustomerService {
@Transactional(DataSourceQualify.CCMS_FULL) @Transactional(DataSourceQualify.CCMS_FULL)
public ResultDTO searchCustomizeFields(CampaignCustomerDTO campaignCustomerDTO) { public ResultDTO searchCustomizeFields(CampaignCustomerDTO campaignCustomerDTO) {
ResultDTO resultDTO = new ResultDTO(); ResultDTO resultDTO = new ResultDTO();
CustomerDTO customerDTO = new CustomerDTO();
SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession(); Session session = sessionFactory.openSession();
...@@ -2021,8 +2022,8 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -2021,8 +2022,8 @@ public class CustomerServiceImpl implements CustomerService {
query.setMaxResults(pageable.getPageSize()); query.setMaxResults(pageable.getPageSize());
} }
List<CampaignCustomerDTO> data = query.list(); List<CustomerDTO>data = query.list();
Page<CampaignCustomerDTO> dataPage = new PageImpl<>(data, pageable, count); Page<CustomerDTO> dataPage = new PageImpl<>(data, pageable, count);
resultDTO.setData(dataPage); resultDTO.setData(dataPage);
resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS); resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS);
resultDTO.setDescription(Constants.ApiErrorDesc.SUCCESS); resultDTO.setDescription(Constants.ApiErrorDesc.SUCCESS);
......
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