Commit ce797e37 authored by đinh thị đầm's avatar đinh thị đầm
parents 742705a8 4f525c8d
...@@ -282,7 +282,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -282,7 +282,7 @@ public class CustomerServiceImpl implements CustomerService {
if (!DataUtil.isNullOrEmpty(name)) { if (!DataUtil.isNullOrEmpty(name)) {
query.setParameter("p_name", "%" + query.setParameter("p_name", "%" +
name.replace("\\", "\\\\") name.trim().replace("\\", "\\\\")
.replaceAll("%", "\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\_") .replaceAll("_", "\\_")
+ "%"); + "%");
...@@ -290,7 +290,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -290,7 +290,7 @@ public class CustomerServiceImpl implements CustomerService {
if (!DataUtil.isNullOrEmpty(mobileNumber)) { if (!DataUtil.isNullOrEmpty(mobileNumber)) {
query.setParameter("p_mobile_number", "%" + query.setParameter("p_mobile_number", "%" +
mobileNumber.replace("\\", "\\\\") mobileNumber.trim().replace("\\", "\\\\")
.replaceAll("%", "\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\_") .replaceAll("_", "\\_")
+ "%"); + "%");
...@@ -298,7 +298,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -298,7 +298,7 @@ public class CustomerServiceImpl implements CustomerService {
if (!DataUtil.isNullOrEmpty(email)) { if (!DataUtil.isNullOrEmpty(email)) {
query.setParameter("p_email", "%" + query.setParameter("p_email", "%" +
email.replace("\\", "\\\\") email.trim().replace("\\", "\\\\")
.replaceAll("%", "\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\_") .replaceAll("_", "\\_")
+ "%"); + "%");
...@@ -666,9 +666,9 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -666,9 +666,9 @@ public class CustomerServiceImpl implements CustomerService {
CustomerList customerList = customerListRepository.findByCustomerListIdAndCompanySiteId(customerListDTO.getCustomerListId(), customerListDTO.getCompanySiteId()); CustomerList customerList = customerListRepository.findByCustomerListIdAndCompanySiteId(customerListDTO.getCustomerListId(), customerListDTO.getCompanySiteId());
if (customerList != null) { if (customerList != null) {
customerList.setCreateBy(customerListDTO.getCreateBy()); // customerList.setCreateBy(customerListDTO.getCreateBy());
customerList.setCompanySiteId(customerListDTO.getCompanySiteId()); customerList.setCompanySiteId(customerListDTO.getCompanySiteId());
customerList.setCreateAt(customerListDTO.getCreateAt()); // customerList.setCreateAt(customerListDTO.getCreateAt());
customerList.setCustomerListCode(customerListDTO.getCustomerListCode()); customerList.setCustomerListCode(customerListDTO.getCustomerListCode());
customerList.setCustomerListName(customerListDTO.getCustomerListName()); customerList.setCustomerListName(customerListDTO.getCustomerListName());
customerList.setDeptCreate(customerListDTO.getDeptCreate()); customerList.setDeptCreate(customerListDTO.getDeptCreate());
...@@ -1595,10 +1595,10 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1595,10 +1595,10 @@ public class CustomerServiceImpl implements CustomerService {
sb.append(" ), datas as ("); sb.append(" ), datas as (");
sb.append(" select c.customer_id customerId,"); sb.append(" select c.customer_id customerId,");
sb.append(" c.name,"); sb.append(" c.name,");
sb.append(" cP.phone,"); sb.append(" cP.phone mobileNumber,");
sb.append(" cE.email,"); sb.append(" cE.email,");
sb.append(" c.customer_type cusType,"); sb.append(" c.customer_type customerType,");
sb.append(" c.company_name compName,"); sb.append(" c.company_name companyName,");
sb.append(" c.current_address currentAddress,"); sb.append(" c.current_address currentAddress,");
sb.append(" c.description,"); sb.append(" c.description,");
sb.append(" c.ipcc_status ipccStatus,"); sb.append(" c.ipcc_status ipccStatus,");
......
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