package com.huimv.environ.eco.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huimv.common.utils.Result;
import com.huimv.common.utils.ResultCode;
import com.huimv.environ.eco.entity.SysMonthWater;
import com.huimv.environ.eco.entity.dto.AllDayWater;
import com.huimv.environ.eco.mapper.BaseRoomMapper;
import com.huimv.environ.eco.mapper.SysMonthWaterMapper;
import com.huimv.environ.eco.service.ISysMonthWaterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-11-12
 */
@Service
public class SysMonthWaterServiceImpl extends ServiceImpl<SysMonthWaterMapper, SysMonthWater> implements ISysMonthWaterService {

    @Autowired
    private BaseRoomMapper baseRoomMapper;

    @Override
    public Result getAllDayWater(Integer farmId) {
       List<AllDayWater> list =  baseRoomMapper.getAllDayWater(farmId);
        return new Result(ResultCode.SUCCESS,list);
    }
}
