package com.thhy.materials.modules.biz.pipeplanmonth.service.impl;
|
|
import com.thhy.materials.modules.biz.pipeplanmonth.entity.PipePlanMonth;
|
import com.thhy.materials.modules.biz.pipeplanmonth.mapper.PipePlanMonthMapper;
|
import com.thhy.materials.modules.biz.pipeplanmonth.service.PipePlanMonthService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.io.Serializable;
|
import java.util.List;
|
|
/**
|
* 服务实现类
|
* @author zhang_xiao_bo
|
* @since 2023-04-18 09:10:58
|
*/
|
@Service
|
public class PipePlanMonthServiceImpl implements PipePlanMonthService {
|
|
|
|
@Autowired
|
private PipePlanMonthMapper pipePlanMonthMapper;
|
|
public PipePlanMonth get(Serializable id){
|
return pipePlanMonthMapper.queryById(id);
|
}
|
|
public List<PipePlanMonth> findList(PipePlanMonth pipePlanMonth){
|
return pipePlanMonthMapper.findList(pipePlanMonth);
|
}
|
|
/**
|
* 增加和修改
|
* @param pipePlanMonth
|
*/
|
@Transactional
|
public void addPipePlanMonth(PipePlanMonth pipePlanMonth){
|
if(pipePlanMonth.getId() == null){
|
//增加操作
|
pipePlanMonthMapper.insert(pipePlanMonth);
|
}else{
|
//修改操作
|
pipePlanMonthMapper.update(pipePlanMonth);
|
}
|
|
}
|
|
/**
|
* 修改
|
* @param pipePlanMonth
|
*/
|
public void update(PipePlanMonth pipePlanMonth){
|
pipePlanMonthMapper.update(pipePlanMonth);
|
}
|
|
/**
|
* 删除
|
* @param id
|
*/
|
public void delete(Serializable id){
|
pipePlanMonthMapper.deletelogic(id);
|
}
|
}
|