package com.thhy.mobile.modules.biz.mouldcheck.service.impl;
|
|
import com.thhy.mobile.modules.biz.mouldcheck.entity.MouldCheck;
|
import com.thhy.mobile.modules.biz.mouldcheck.mapper.MouldCheckMapper;
|
import com.thhy.mobile.modules.biz.mouldcheck.service.MouldCheckService;
|
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-05-08 10:00:18
|
*/
|
@Service
|
public class MouldCheckServiceImpl implements MouldCheckService {
|
|
|
|
@Autowired
|
private MouldCheckMapper mouldCheckMapper;
|
|
public MouldCheck get(Serializable id){
|
return mouldCheckMapper.queryById(id);
|
}
|
|
public List<MouldCheck> findList(MouldCheck mouldCheck){
|
return mouldCheckMapper.findList(mouldCheck);
|
}
|
|
/**
|
* 增加和修改
|
* @param mouldCheck
|
*/
|
@Transactional
|
public void addMouldCheck(MouldCheck mouldCheck){
|
if(mouldCheck.getModCheckId() == null){
|
//增加操作
|
mouldCheckMapper.insert(mouldCheck);
|
}else{
|
//修改操作
|
mouldCheckMapper.update(mouldCheck);
|
}
|
|
}
|
|
/**
|
* 修改
|
* @param mouldCheck
|
*/
|
public void update(MouldCheck mouldCheck){
|
mouldCheckMapper.update(mouldCheck);
|
}
|
|
/**
|
* 删除
|
* @param modCheckId
|
*/
|
public void delete(Serializable modCheckId){
|
mouldCheckMapper.deletelogic(modCheckId);
|
}
|
}
|