package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.sys.entity.TRegexRule;
import com.jwipc.sys.mapper.TRegexRuleMapper;
import com.jwipc.sys.model.po.TRegexRulePO;
import com.jwipc.sys.model.query.TRegexRuleQuery;
import com.jwipc.sys.service.ITRegexRuleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 正则校验规则表(TRegexRules)表服务实现类
 *
 * @author Chen Tianshi
 * @since 2025-08-27 16:45
 */
@Service
public class TRegexRuleServiceImpl extends ServiceImpl<TRegexRuleMapper, TRegexRule> implements ITRegexRuleService {

    @Override
    public List<TRegexRulePO> queryByPage(Page<TRegexRule> dbPage, TRegexRuleQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
}
