package com.goomood.phm.service.impl;

import java.util.List;
import com.goomood.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.goomood.phm.mapper.TechLingoMapper;
import com.goomood.phm.domain.TechLingo;
import com.goomood.phm.service.ITechLingoService;

/**
 * 专业术语Service业务层处理
 * 
 * @author goomood
 * @date 2024-11-16
 */
@Service
public class TechLingoServiceImpl implements ITechLingoService 
{
    @Autowired
    private TechLingoMapper techLingoMapper;

    /**
     * 查询专业术语
     * 
     * @param id 专业术语主键
     * @return 专业术语
     */
    @Override
    public TechLingo selectTechLingoById(Long id)
    {
        return techLingoMapper.selectTechLingoById(id);
    }

    /**
     * 查询专业术语列表
     * 
     * @param techLingo 专业术语
     * @return 专业术语
     */
    @Override
    public List<TechLingo> selectTechLingoList(TechLingo techLingo)
    {
        return techLingoMapper.selectTechLingoList(techLingo);
    }

    /**
     * 新增专业术语
     * 
     * @param techLingo 专业术语
     * @return 结果
     */
    @Override
    public int insertTechLingo(TechLingo techLingo)
    {
        techLingo.setCreateTime(DateUtils.getNowDate());
        return techLingoMapper.insertTechLingo(techLingo);
    }

    /**
     * 修改专业术语
     * 
     * @param techLingo 专业术语
     * @return 结果
     */
    @Override
    public int updateTechLingo(TechLingo techLingo)
    {
        techLingo.setUpdateTime(DateUtils.getNowDate());
        return techLingoMapper.updateTechLingo(techLingo);
    }

    /**
     * 批量删除专业术语
     * 
     * @param ids 需要删除的专业术语主键
     * @return 结果
     */
    @Override
    public int deleteTechLingoByIds(Long[] ids)
    {
        return techLingoMapper.deleteTechLingoByIds(ids);
    }

    /**
     * 删除专业术语信息
     * 
     * @param id 专业术语主键
     * @return 结果
     */
    @Override
    public int deleteTechLingoById(Long id)
    {
        return techLingoMapper.deleteTechLingoById(id);
    }
}
