Commit 628db9e1 authored by ='s avatar =

hungtt-commit get data combobox field

parent c15a89e0
...@@ -1888,7 +1888,6 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1888,7 +1888,6 @@ 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();
...@@ -2017,6 +2016,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -2017,6 +2016,7 @@ public class CustomerServiceImpl implements CustomerService {
} }
Pageable pageable = PageRequest.of(campaignCustomerDTO.getPage(), campaignCustomerDTO.getPageSize()); Pageable pageable = PageRequest.of(campaignCustomerDTO.getPage(), campaignCustomerDTO.getPageSize());
if (pageable != null) { if (pageable != null) {
query.setFirstResult(pageable.getPageNumber() * pageable.getPageSize()); query.setFirstResult(pageable.getPageNumber() * pageable.getPageSize());
query.setMaxResults(pageable.getPageSize()); query.setMaxResults(pageable.getPageSize());
...@@ -2025,6 +2025,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -2025,6 +2025,7 @@ public class CustomerServiceImpl implements CustomerService {
List<CustomerDTO>data = query.list(); List<CustomerDTO>data = query.list();
Page<CustomerDTO> dataPage = new PageImpl<>(data, pageable, count); Page<CustomerDTO> dataPage = new PageImpl<>(data, pageable, count);
resultDTO.setData(dataPage); resultDTO.setData(dataPage);
resultDTO.setTotalRow(count);
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) {
......
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