package com.ruoyi.mall.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallSchoolStatusMapper;
import com.ruoyi.mall.domain.MallSchoolStatus;
import com.ruoyi.mall.service.IMallSchoolStatusService;

/**
 * 学校新招等状态Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-16
 */
@Service
public class MallSchoolStatusServiceImpl implements IMallSchoolStatusService
{
    @Autowired
    private MallSchoolStatusMapper mallSchoolStatusMapper;

    /**
     * 查询学校新招等状态
     *
     * @param schoolStatusId 学校新招等状态主键
     * @return 学校新招等状态
     */
    @Override
    public MallSchoolStatus selectMallSchoolStatusBySchoolStatusId(Long schoolStatusId)
    {
        return mallSchoolStatusMapper.selectMallSchoolStatusBySchoolStatusId(schoolStatusId);
    }

    /**
     * 查询学校新招等状态列表
     *
     * @param mallSchoolStatus 学校新招等状态
     * @return 学校新招等状态
     */
    @Override
    public List<MallSchoolStatus> selectMallSchoolStatusList(MallSchoolStatus mallSchoolStatus)
    {
        return mallSchoolStatusMapper.selectMallSchoolStatusList(mallSchoolStatus);
    }

    /**
     * 新增学校新招等状态
     *
     * @param mallSchoolStatus 学校新招等状态
     * @return 结果
     */
    @Override
    public int insertMallSchoolStatus(MallSchoolStatus mallSchoolStatus)
    {
        mallSchoolStatus.setCreateTime(DateUtils.getNowDate());
        return mallSchoolStatusMapper.insertMallSchoolStatus(mallSchoolStatus);
    }

    /**
     * 修改学校新招等状态
     *
     * @param mallSchoolStatus 学校新招等状态
     * @return 结果
     */
    @Override
    public int updateMallSchoolStatus(MallSchoolStatus mallSchoolStatus)
    {
        mallSchoolStatus.setUpdateTime(DateUtils.getNowDate());
        return mallSchoolStatusMapper.updateMallSchoolStatus(mallSchoolStatus);
    }

    /**
     * 批量删除学校新招等状态
     *
     * @param schoolStatusIds 需要删除的学校新招等状态主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolStatusBySchoolStatusIds(Long[] schoolStatusIds)
    {
        return mallSchoolStatusMapper.deleteMallSchoolStatusBySchoolStatusIds(schoolStatusIds);
    }

    /**
     * 删除学校新招等状态信息
     *
     * @param schoolStatusId 学校新招等状态主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolStatusBySchoolStatusId(Long schoolStatusId)
    {
        return mallSchoolStatusMapper.deleteMallSchoolStatusBySchoolStatusId(schoolStatusId);
    }
}
