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

searchIndividualCustomer edit

parent c22b9114
...@@ -1915,7 +1915,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1915,7 +1915,7 @@ public class CustomerServiceImpl implements CustomerService {
sb.append("select c.customer_id customerId,"); sb.append("select c.customer_id customerId,");
sb.append(" C.NAME name,"); sb.append(" C.NAME name,");
sb.append(" cc.contact mobile_phone,"); sb.append(" cc.contact mobileNumber,");
sb.append(" cc2.contact email,"); sb.append(" cc2.contact email,");
sb.append(" c.customer_type customerType,"); sb.append(" c.customer_type customerType,");
sb.append(" C.COMPANY_NAME companyName,"); sb.append(" C.COMPANY_NAME companyName,");
...@@ -1998,7 +1998,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1998,7 +1998,7 @@ public class CustomerServiceImpl implements CustomerService {
SQLQuery query = session.createSQLQuery(sb.toString()); SQLQuery query = session.createSQLQuery(sb.toString());
query.addScalar("name", new StringType()); query.addScalar("name", new StringType());
query.addScalar("customerId", new LongType()); query.addScalar("customerId", new LongType());
query.addScalar("mobile_phone", new StringType()); query.addScalar("mobileNumber", new StringType());
query.addScalar("email", new StringType()); query.addScalar("email", new StringType());
query.addScalar("customerType", new LongType()); query.addScalar("customerType", new LongType());
query.addScalar("companyName", new StringType()); query.addScalar("companyName", new StringType());
...@@ -2007,10 +2007,10 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -2007,10 +2007,10 @@ public class CustomerServiceImpl implements CustomerService {
query.setParameter("p_campaign_id", campaignCustomerDTO.getCampaignId()); query.setParameter("p_campaign_id", campaignCustomerDTO.getCampaignId());
query.setResultTransformer(Transformers.aliasToBean(CampaignCustomerDTO.class)); query.setResultTransformer(Transformers.aliasToBean(CustomerDTO.class));
int count = 0; int count = 0;
List<CampaignCustomerDTO> dtoList = query.list(); List<CustomerDTO> dtoList = query.list();
if (dtoList.size() > 0) { if (dtoList.size() > 0) {
count = query.list().size(); count = query.list().size();
} }
......
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