liding
2 天以前 733b9e6837365d2817d7e8a0005b2c167c18f77e
main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.business.mapper.PurchaseRegistrationMapper;
import com.ruoyi.business.service.PurchaseRegistrationService;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@@ -49,6 +50,13 @@
    @Override
    public IPage<PurchaseRegistration> selectPurchaseRegistrationList(Page page, PurchaseRegistrationDto purchaseRegistrationDto) {
        LambdaQueryWrapper<PurchaseRegistration> queryWrapper = new LambdaQueryWrapper<>();
        if (StringUtils.isNotBlank(purchaseRegistrationDto.getSearchAll())){
            queryWrapper.and(wrapper -> wrapper
                    .like(PurchaseRegistration::getCoal, purchaseRegistrationDto.getSearchAll())
                    .or()
                    .like(PurchaseRegistration::getSupplierName, purchaseRegistrationDto.getSearchAll())
            );
        }
        queryWrapper.orderByDesc(PurchaseRegistration::getCreateTime);
        return purchaseRegistrationMapper.selectPage(page, queryWrapper);
    }