package com.meas.system.service.impl;

import java.util.List;
        import com.meas.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.meas.system.mapper.MeasAngleMapper;
import com.meas.system.domain.MeasAngle;
import com.meas.system.service.IMeasAngleService;

/**
 * 角度Service业务层处理
 *
 * @author Allen
 * @date 2024-07-24
 */
@Service
public class MeasAngleServiceImpl implements IMeasAngleService {
    @Autowired
    private MeasAngleMapper measAngleMapper;

    /**
     * 查询角度
     *
     * @param id 角度主键
     * @return 角度
     */
    @Override
    public MeasAngle selectMeasAngleById(Long id) {
        return measAngleMapper.selectMeasAngleById(id);
    }

    /**
     * 查询角度列表
     *
     * @param measAngle 角度
     * @return 角度
     */
    @Override
    public List<MeasAngle> selectMeasAngleList(MeasAngle measAngle) {
        return measAngleMapper.selectMeasAngleList(measAngle);
    }

    /**
     * 新增角度
     *
     * @param measAngle 角度
     * @return 结果
     */
    @Override
    public int insertMeasAngle(MeasAngle measAngle) {
                measAngle.setCreateTime(DateUtils.getNowDate());
            return measAngleMapper.insertMeasAngle(measAngle);
    }

    /**
     * 修改角度
     *
     * @param measAngle 角度
     * @return 结果
     */
    @Override
    public int updateMeasAngle(MeasAngle measAngle) {
                measAngle.setUpdateTime(DateUtils.getNowDate());
        return measAngleMapper.updateMeasAngle(measAngle);
    }

    /**
     * 批量删除角度
     *
     * @param ids 需要删除的角度主键
     * @return 结果
     */
    @Override
    public int deleteMeasAngleByIds(Long[] ids) {
        return measAngleMapper.deleteMeasAngleByIds(ids);
    }

    /**
     * 删除角度信息
     *
     * @param id 角度主键
     * @return 结果
     */
    @Override
    public int deleteMeasAngleById(Long id) {
        return measAngleMapper.deleteMeasAngleById(id);
    }

    @Override
    public List<Integer> getOption() {
        return measAngleMapper.getOption();
    }
}
