package com.boman.gen.service;

import com.boman.domain.GenTableRelation;
import com.boman.gen.mapper.GenTableRelationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tjf
 * @Date: 2021/03/25/16:14
 */
@Service
public class GenTableRelationServiceImpl implements IGenTableRelationService {

    @Autowired
    private GenTableRelationMapper genTableRelationMapper;

    /**
     * 查询列表
     *
     * @param genTableRelation
     * @return
     */
    @Override
    public List<GenTableRelation> selectGenTableRelationList(GenTableRelation genTableRelation) {
        List<GenTableRelation> genTableRelations = genTableRelationMapper.selectGenTableRelationList(genTableRelation);
        return genTableRelations;
    }

    /**
     * 根据id查询详情
     *
     * @param id
     * @return
     */
    @Override
    public GenTableRelation selectGenTableRelationById(Long id) {
        GenTableRelation genTableRelation = genTableRelationMapper.selectGenTableRelationById(id);
        return genTableRelation;
    }

    /**
     * 新增
     *
     * @param genTableRelation
     * @return
     */
    @Override
    public int insertGenTableRelation(GenTableRelation genTableRelation) {
        return genTableRelationMapper.insertGenTableRelation(genTableRelation);
    }

    /**
     * 修改
     *
     * @param genTableRelation
     * @return
     */
    @Override
    public int updateGenTableRelation(GenTableRelation genTableRelation) {
        return genTableRelationMapper.updateGenTableRelation(genTableRelation);
    }

    /**
     * 删除
     *
     * @param ids
     * @return
     */
    @Override
    public int deleteGenTableRelation(Long[] ids) {
        return genTableRelationMapper.deleteGenTableRelation(ids);
    }
}
