package com.ruoyi.predict.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.predict.domain.Area;
import com.ruoyi.predict.mapper.AreaMapper;
import com.ruoyi.predict.service.IAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AreaService业务层处理
 *
 * @author hlf
 * @date 2022-01-10
 */
@Service
public class AreaServiceImpl implements IAreaService {
    @Autowired(required = false)
    private AreaMapper areaMapper;

    /**
     * 查询Area
     *
     * @param areaNo AreaID
     * @return Area
     */
    @Override
    public Area selectAreaById(Long areaNo) {
        return areaMapper.selectAreaById(areaNo);
    }

    /**
     * 查询Area列表
     *
     * @param area Area
     * @return Area
     */
    @Override
    public List<Area> selectAreaList(Area area) {
        return areaMapper.selectAreaList(area);
    }

    /**
     * 新增Area
     *
     * @param area Area
     * @return 结果
     */
    @Override
    public int insertArea(Area area) {
        return areaMapper.insertArea(area);
    }

    /**
     * 修改Area
     *
     * @param area Area
     * @return 结果
     */
    @Override
    public int updateArea(Area area) {
        return areaMapper.updateArea(area);
    }

    /**
     * 删除Area信息
     *
     * @param areaNo AreaID
     * @return 结果
     */
    @Override
    public int deleteAreaById(Long areaNo) {
        return areaMapper.deleteAreaById(areaNo);
    }

    @Override
    public Long selectNewData() {
        return areaMapper.selectNewData();
    }
}
