package com.patzn.lims.online.service.impl;

import com.patzn.lims.online.entity.PtOnlFormField;
import com.patzn.lims.online.mapper.PtOnlFormFieldMapper;
import com.patzn.lims.online.service.IPtOnlFormFieldService;
import com.patzn.lims.core.web.BaseServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 字段表 服务实现类
 * </p>
 *
 * @author wwd
 * @since 2020-05-13
 */
@Service
public class PtOnlFormFieldServiceImpl extends BaseServiceImpl<PtOnlFormFieldMapper, PtOnlFormField> implements IPtOnlFormFieldService {

    @Override
    public Page<PtOnlFormField> page(Page<PtOnlFormField> page, PtOnlFormField ptOnlFormField) {
        QueryWrapper<PtOnlFormField> wrapper = Wrappers.<PtOnlFormField>query(ptOnlFormField);
        return this.page(page, wrapper);
    }
    @Override
    public List<PtOnlFormField> listByHeadId(Long id) {
        return list(Wrappers.<PtOnlFormField>query().eq("form_head_id",id));
    }
}
