| 对比新文件 |
| | |
| | | package com.ruoyi.customervisits.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.customervisits.mapper.CustomerVisitsMapper; |
| | | import com.ruoyi.customervisits.pojo.CustomerVisits; |
| | | import com.ruoyi.customervisits.service.CustomerVisitsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/8/29 10:27 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class CustomerVisitsServiceImpl extends ServiceImpl<CustomerVisitsMapper, CustomerVisits> implements CustomerVisitsService { |
| | | |
| | | @Autowired |
| | | private CustomerVisitsMapper customerVisitsMapper; |
| | | |
| | | @Override |
| | | public IPage<CustomerVisits> listPage(Page page, CustomerVisits customerVisits) { |
| | | LambdaQueryWrapper<CustomerVisits> customerVisitsLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(customerVisits != null && !StringUtils.isEmpty(customerVisits.getCustomerName())){ |
| | | customerVisitsLambdaQueryWrapper.like(CustomerVisits::getCustomerName, customerVisits.getCustomerName()); |
| | | } |
| | | Page page1 = customerVisitsMapper.selectPage(page, customerVisitsLambdaQueryWrapper); |
| | | return page1; |
| | | } |
| | | } |