From b042d6a5ae1959ad79b489e1d0b01c057b68d5f6 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 19 六月 2025 10:45:44 +0800 Subject: [PATCH] 水肥机、墒情站、气象站增、改、查、删功能实现 --- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java index 8562ac4..afcf207 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java @@ -1,10 +1,12 @@ package com.dy.pipIrrProject.mqtt.manure; import com.dy.pipIrrGlobal.daoPr.PrStManureMapper; +import com.dy.pipIrrGlobal.pojoPr.PrStManure; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -23,4 +25,42 @@ public List<VoMqttSimple> allSimple(){ return this.dao.selectAllSimple() ; } + + /** + * 寰楀埌涓�涓疄浣� + * @param id 瀹炰綋ID + * @return 瀹炰綋 + */ + public PrStManure selectById(Long id){ + return this.dao.selectById(id) ; + } + /** + * 淇濆瓨锛堟坊鍔狅級瑙嗛鐩戞帶鐐� + * @param po + * @return + */ + @Transactional + Integer save(PrStManure po) { + return dao.insert(po); + } + + /** + * 淇敼瀹炰綋 + * @param po 瀹炰綋 + * @return 鏁伴噺 + */ + @Transactional + public int update(PrStManure po) { + return this.dao.updateByPrimaryKeySelective(po); + } + + /** + * 淇濆瓨淇敼瀹炰綋 + * @param id 瀹炰綋ID + * @return 褰卞搷璁板綍鏁伴噺 + */ + @Transactional + public int delete(Long id){ + return this.dao.deleteLogicById(id) ; + } } -- Gitblit v1.8.0