Commit 094b34c7 authored by Phạm Duy Phi's avatar Phạm Duy Phi

phipd commit

parent 0136cb05
...@@ -284,7 +284,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -284,7 +284,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("_", "\\_")
+ "%"); + "%");
...@@ -292,7 +292,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -292,7 +292,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("_", "\\_")
+ "%"); + "%");
...@@ -300,7 +300,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -300,7 +300,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("_", "\\_")
+ "%"); + "%");
...@@ -668,9 +668,9 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -668,9 +668,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());
......
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