package com.openhis.administration.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.administration.domain.Frequency;
import com.openhis.administration.mapper.FrequencyMapper;
import com.openhis.administration.service.IFrequencyService;
import com.openhis.common.utils.HisPageUtils;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
* @author 47826
* @description 针对表【adm_frequency(频次配置表，用于频次、周期和相关信息)】的数据库操作Service实现
* @createDate 2025-08-21 14:22:11
*/
@Service
public class FrequencyServiceImpl extends ServiceImpl<FrequencyMapper, Frequency>
    implements IFrequencyService {

    @Override
    public Page<Frequency> getPageList(Integer pageNo, Integer pageSize, String code, HttpServletRequest request) {

        Page<Frequency> page = new Page<>(pageNo, pageSize);
       QueryWrapper<Frequency> queryWrapper = new QueryWrapper<Frequency>();
       queryWrapper.eq("rate_code", code);
        return  HisPageUtils.selectPage(this.baseMapper, queryWrapper, pageNo, pageSize, Frequency.class);
    }
}




