gaoluyang
2026-11-02 ae2892132b50a1796941fb8d8aa82927d8ae1fcf
yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/dal/mysql/SrmSupplierMapper.java
@@ -20,12 +20,17 @@
                .likeIfPresent(SrmSupplierDO::getName, reqVO.getName())
                .eqIfPresent(SrmSupplierDO::getType, reqVO.getType())
                .eqIfPresent(SrmSupplierDO::getStatus, reqVO.getStatus())
                .eqIfPresent(SrmSupplierDO::getOnlineStatus, reqVO.getOnlineStatus())
                .eqIfPresent(SrmSupplierDO::getPurchaseCategory, reqVO.getPurchaseCategory())
                .likeIfPresent(SrmSupplierDO::getContactName, reqVO.getContactName())
                .likeIfPresent(SrmSupplierDO::getContactMobile, reqVO.getContactMobile())
                .orderByDesc(SrmSupplierDO::getId);
        if (Boolean.TRUE.equals(reqVO.getApproved())) {
            wrapper.apply("id IN (SELECT supplier_id FROM srm_supplier_apply WHERE apply_status = 40 AND supplier_id IS NOT NULL AND deleted = 0)");
        }
        if (Boolean.TRUE.equals(reqVO.getExcludeApproved())) {
            wrapper.apply("id NOT IN (SELECT supplier_id FROM srm_supplier_apply WHERE apply_status = 40 AND supplier_id IS NOT NULL AND deleted = 0)");
        }
        return selectPage(reqVO, wrapper);
    }