소스 검색

问题处理

yzc 1 년 전
부모
커밋
c94d866fe8
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

+ 4 - 2
hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

@@ -108,8 +108,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
         IWrapper<CustomerVo> wrapper = IWrapper.getWrapper();
 
         // 客户来源查询
-//        wrapper.eq("c", Customer::getSource, dto.getSource());
-        wrapper.apply("FIND_IN_SET( {0}, c.source )", dto.getSource());
+        String source = dto.getSource();
+        if (ObjectUtil.isNotEmpty(source)) {
+            wrapper.apply("FIND_IN_SET( {0}, c.source )", source);
+        }
         // 客户类型查询
         wrapper.eq("c", Customer::getStatus, dto.getStatus());
         // 国家ID查询