package com.srs.comprehensive.service.impl;

import java.util.List;

import com.srs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.CphLakeTypeMapper;
import com.srs.comprehensive.domain.CphLakeType;
import com.srs.comprehensive.service.ICphLakeTypeService;

/**
 * 静湖之星类别Service业务层处理
 *
 * @author srs
 * @date 2023-10-31
 */
@Service
public class CphLakeTypeServiceImpl extends ServiceImpl<CphLakeTypeMapper,CphLakeType> implements ICphLakeTypeService {
    @Autowired
    private CphLakeTypeMapper cphLakeTypeMapper;


    @Override
    public List<CphLakeType> listSelect(){
        return cphLakeTypeMapper.listSelect();
    }


    @Override
    public List<CphLakeType> listOneHundred(){
        return cphLakeTypeMapper.listOneHundred();
    }


    /**
     * 查询静湖之星类别
     *
     * @param id 静湖之星类别主键
     * @return 静湖之星类别
     */
    @Override
    public CphLakeType selectCphLakeTypeById(Long id) {
        return cphLakeTypeMapper.selectCphLakeTypeById(id);
    }

    /**
     * 查询静湖之星类别列表
     *
     * @param cphLakeType 静湖之星类别
     * @return 静湖之星类别
     */
    @Override
    public List<CphLakeType> selectCphLakeTypeList(CphLakeType cphLakeType) {
        return cphLakeTypeMapper.selectCphLakeTypeList(cphLakeType);
    }

    /**
     * 新增静湖之星类别
     *
     * @param cphLakeType 静湖之星类别
     * @return 结果
     */
    @Override
    public int insertCphLakeType(CphLakeType cphLakeType) {
                cphLakeType.setCreateTime(DateUtils.getNowDate());
            return cphLakeTypeMapper.insertCphLakeType(cphLakeType);
    }

    /**
     * 修改静湖之星类别
     *
     * @param cphLakeType 静湖之星类别
     * @return 结果
     */
    @Override
    public int updateCphLakeType(CphLakeType cphLakeType) {
                cphLakeType.setUpdateTime(DateUtils.getNowDate());
        return cphLakeTypeMapper.updateCphLakeType(cphLakeType);
    }

    /**
     * 批量删除静湖之星类别
     *
     * @param ids 需要删除的静湖之星类别主键
     * @return 结果
     */
    @Override
    public int deleteCphLakeTypeByIds(Long[] ids) {
        return cphLakeTypeMapper.deleteCphLakeTypeByIds(ids);
    }

    /**
     * 删除静湖之星类别信息
     *
     * @param id 静湖之星类别主键
     * @return 结果
     */
    @Override
    public int deleteCphLakeTypeById(Long id) {
        return cphLakeTypeMapper.deleteCphLakeTypeById(id);
    }
}
