Przeglądaj źródła

客户管理 姓名模糊查询 下拉表功能

xgb 1 dzień temu
rodzic
commit
74f650a457

+ 13 - 0
fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerController.java

@@ -59,6 +59,19 @@ public class CrmCustomerController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * @Description: 模糊查询客户姓名
+     * @Param:
+     * @Return:
+     * @Author xgb
+     * @Date 2025/9/22 16:04
+     */
+    @GetMapping("/getCustName")
+    public List<String> getCustName(CrmCustomer crmCustomer){
+        startPage();
+        return crmCustomerService.getCustName(crmCustomer);
+    }
+
     @PreAuthorize("@ss.hasPermi('crm:customer:addLine')")
     @Log(title = "创建线索客户", businessType = BusinessType.INSERT)
     @PostMapping("/addLine")

+ 1 - 0
fs-service/src/main/java/com/fs/crm/mapper/CrmCustomerMapper.java

@@ -972,4 +972,5 @@ public interface CrmCustomerMapper extends BaseMapper<CrmCustomer> {
      */
     List<Long> selectCustomerIdByCompanyUserId(@Param("companyUserId") Long companyUserId);
 
+    List<String> getCustName(CrmCustomer crmCustomer);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/crm/service/ICrmCustomerService.java

@@ -165,4 +165,6 @@ public interface ICrmCustomerService
     void computePayMoney();
 
     List<CrmMyCustomerListQueryVO> selectCrmMyAssistListQuery(CrmMyCustomerListQueryParam param);
+
+    List<String> getCustName(CrmCustomer crmCustomer);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/crm/service/impl/CrmCustomerServiceImpl.java

@@ -1031,4 +1031,9 @@ public class CrmCustomerServiceImpl extends ServiceImpl<CrmCustomerMapper, CrmCu
         return vos;
     }
 
+    @Override
+    public List<String> getCustName(CrmCustomer crmCustomer) {
+        return crmCustomerMapper.getCustName(crmCustomer);
+    }
+
 }

+ 7 - 0
fs-service/src/main/resources/mapper/crm/CrmCustomerMapper.xml

@@ -437,4 +437,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         order by cu.customer_user_id desc
     </select>
+
+    <select id="getCustName" parameterType="CrmCustomer" resultType="java.lang.String">
+        select distinct customer_name from crm_customer where 1=1
+        <if test="customerName != null">
+            and customer_name like CONCAT('%',#{customerName},'%')
+        </if>
+    </select>
 </mapper>