package com.dy.pipIrrProject.flowMonitoring; import com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper; import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author ZhuBaoMin * @date 2024-01-05 9:20 * @LastEditTime 2024-01-05 9:20 * @Description */ @Slf4j @Service public class FlowmeterSv { @Autowired private PrFlowmeterMapper prFlowmeterMapper; /** * 添加流量计 * @param prFlowmeter * @return */ public Integer addFlowmeter(PrFlowmeter prFlowmeter) { return prFlowmeterMapper.insert(prFlowmeter); } /** * 删除流量计 * @param flowmeterId * @return */ public Integer deleteFlowmeter(Long flowmeterId) { return prFlowmeterMapper.deleteFlowmeterById(flowmeterId); } /** * 根据流量计编号获取未删除的流量计数量 * @param flowmeterId * @return */ public Integer getRecordCountOfFlowmeter(Long flowmeterId) { return prFlowmeterMapper.getRecordCountOfFlowmeter(flowmeterId); } }