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.MoldForm;
import com.jwipc.sys.mapper.MoldFormMapper;
import com.jwipc.sys.model.po.MoldFormPO;
import com.jwipc.sys.model.query.MoldFormQuery;
import com.jwipc.sys.service.IMoldFormService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author AL
 * @since 2024-01-31
 */
@Service
public class MoldFormServiceImpl extends ServiceImpl<MoldFormMapper, MoldForm> implements IMoldFormService {
    @Override
    public List<MoldFormPO> findPageByQuery(Page<MoldForm> dbPage, MoldFormQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
    @Override
    public MoldFormPO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }

    @Override
    public MoldForm findByCode(String moldCode) {
        return baseMapper.getDataByCode(moldCode);
    }
}
