package com.hzu.labbooking.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzu.labbooking.mapper.OfficeMapper;
import com.hzu.labbooking.domain.Office;
import com.hzu.labbooking.service.IOfficeService;

/**
 * 教师信息Service业务层处理
 *
 * @author yezihao
 * @date 2021-04-29
 */
@Service
public class OfficeServiceImpl extends ServiceImpl<OfficeMapper, Office> implements IOfficeService {

    @Autowired
    private OfficeMapper officeMapper;

    /**
     * 查询教师信息
     *
     * @param id 教师信息ID
     * @return 教师信息
     */
    @Override
    public Office selectOfficeById(Long id) {
        return officeMapper.selectOfficeById(id);
    }

    /**
     * 新增教师信息
     *
     * @param office 教师信息
     * @return 结果
     */
    @Override
    public int insertOffice(Office office) {
        return officeMapper.insertOffice(office);
    }

    /**
     * 修改教师信息
     *
     * @param office 教师信息
     * @return 结果
     */
    @Override
    public int updateOffice(Office office) {
        return officeMapper.updateOffice(office);
    }

    /**
     * 批量删除教师信息
     *
     * @param ids 需要删除的教师信息ID
     * @return 结果
     */
    @Override
    public int deleteOfficeByIds(Long[] ids) {
        return officeMapper.deleteOfficeByIds(ids);
    }

}
