package com.jeethink.system.service.impl;

import java.util.List;

import com.jeethink.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jeethink.system.mapper.CeshiInfoMapper;
import com.jeethink.system.domain.CeshiInfo;
import com.jeethink.system.service.ICeshiInfoService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 测试Service业务层处理
 * 
 * @author sh
 * @date 2022-03-01
 */
@Service
public class CeshiInfoServiceImpl implements ICeshiInfoService 
{
    @Autowired
    private CeshiInfoMapper ceshiInfoMapper;

    /**
     * 查询测试
     * 
     * @param ceshiId 测试ID
     * @return 测试
     */
    @Override
    public CeshiInfo selectCeshiInfoById(String sql)
    {

        return ceshiInfoMapper.selectCeshiInfoById(sql);
    }

    /**
     * 查询测试列表
     * 
     * @param ceshiInfo 测试
     * @return 测试
     */
    @Override
    public List<CeshiInfo> selectCeshiInfoList(CeshiInfo ceshiInfo)
    {
        return ceshiInfoMapper.selectCeshiInfoList(ceshiInfo);
    }

    /**
     * 新增测试
     * 
     * @param ceshiInfo 测试
     * @return 结果
     */
    @Transactional
    @Override
    public int insertCeshiInfo(CeshiInfo ceshiInfo)
    {
        ceshiInfo.setCeshiId(IdUtils.simpleUUID());
        return ceshiInfoMapper.insertCeshiInfo(ceshiInfo);
    }

    /**
     * 修改测试
     * 
     * @param ceshiInfo 测试
     * @return 结果
     */
    @Override
    public int updateCeshiInfo(CeshiInfo ceshiInfo)
    {
        return ceshiInfoMapper.updateCeshiInfo(ceshiInfo);
    }

    /**
     * 批量删除测试
     * 
     * @param ceshiIds 需要删除的测试ID
     * @return 结果
     */
    @Override
    public int deleteCeshiInfoByIds(String[] ceshiIds)
    {
        return ceshiInfoMapper.deleteCeshiInfoByIds(ceshiIds);
    }

    /**
     * 删除测试信息
     * 
     * @param ceshiId 测试ID
     * @return 结果
     */
    @Override
    public int deleteCeshiInfoById(String ceshiId)
    {
        return ceshiInfoMapper.deleteCeshiInfoById(ceshiId);
    }
}
