yaowanxin
2025-12-29 c2bb9c768d5214ae7b61de22e352a23f598200c1
添加客户分类字段,零售客户和进销商客户
已修改2个文件
8 ■■■■■ 文件已修改
src/main/java/com/ruoyi/basic/pojo/Customer.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/pojo/Customer.java
@@ -31,6 +31,10 @@
     */
    @Excel(name = "客户名称")
    private String customerName;
    /** 客户分类:零售客户,进销商客户 */
    @Excel(name = "客户分类")
    private String customerType;
    /**
     * 纳税人识别号
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -74,9 +74,13 @@
        // 2. 构建查询条件(增强空值安全)
        LambdaQueryWrapper<Customer> queryWrapper = new LambdaQueryWrapper<>();
        String customerName = customer.getCustomerName();
        String customerType = customer.getCustomerType();
        if (StringUtils.isNotBlank(customerName)) {
            queryWrapper.like(Customer::getCustomerName, customerName);
        }
        if (StringUtils.isNotBlank(customerType)) {
            queryWrapper.like(Customer::getCustomerType, customerType);
        }
        // 3. 执行分页查询(保留分页元数据)
        IPage<Customer> customerPage = customerMapper.selectPage(page, queryWrapper);