package com.dy.pipIrrProject.mqtt.soil; 
 | 
  
 | 
import com.dy.pipIrrGlobal.daoPr.PrStSoilMapper; 
 | 
import com.dy.pipIrrGlobal.pojoPr.PrStSoil; 
 | 
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; 
 | 
  
 | 
/** 
 | 
 * @Author: liurunyu 
 | 
 * @Date: 2025/6/18 15:14 
 | 
 * @Description 
 | 
 */ 
 | 
@Slf4j 
 | 
@Service 
 | 
public class SoilSv { 
 | 
  
 | 
    @Autowired 
 | 
    private PrStSoilMapper dao; 
 | 
  
 | 
    public List<VoMqttSimple> allSimple(){ 
 | 
        return this.dao.selectAllSimple() ; 
 | 
    } 
 | 
  
 | 
  
 | 
    /** 
 | 
     * 得到一个实体 
 | 
     * @param id 实体ID 
 | 
     * @return 实体 
 | 
     */ 
 | 
    public PrStSoil selectById(Long id){ 
 | 
        return this.dao.selectById(id) ; 
 | 
    } 
 | 
    /** 
 | 
     * 保存(添加)视频监控点 
 | 
     * @param po 
 | 
     * @return 
 | 
     */ 
 | 
    @Transactional 
 | 
    Integer save(PrStSoil po) { 
 | 
        return dao.insert(po); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 修改实体 
 | 
     * @param po 实体 
 | 
     * @return 数量 
 | 
     */ 
 | 
    @Transactional 
 | 
    public int update(PrStSoil po) { 
 | 
        return this.dao.updateByPrimaryKeySelective(po); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 保存修改实体 
 | 
     * @param id 实体ID 
 | 
     * @return 影响记录数量 
 | 
     */ 
 | 
    @Transactional 
 | 
    public int delete(Long id){ 
 | 
        return this.dao.deleteLogicById(id) ; 
 | 
    } 
 | 
} 
 |