package com.thhy.mobile.modules.biz.checkreason.service.impl;
|
|
import com.thhy.mobile.modules.biz.checkreason.entity.CheckReason;
|
import com.thhy.mobile.modules.biz.checkreason.mapper.CheckReasonMapper;
|
import com.thhy.mobile.modules.biz.checkreason.service.CheckReasonService;
|
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.HashMap;
|
import java.util.List;
|
|
/**
|
* 服务实现类
|
* @author zhang_xiao_bo
|
* @since 2023-05-06 10:02:37
|
*/
|
@Service
|
public class CheckReasonServiceImpl implements CheckReasonService {
|
|
|
|
@Autowired
|
private CheckReasonMapper checkReasonMapper;
|
|
public CheckReason get(Serializable id){
|
return checkReasonMapper.queryById(id);
|
}
|
|
public List<CheckReason> findList(CheckReason checkReason){
|
return checkReasonMapper.findList(checkReason);
|
}
|
|
/**
|
* 增加和修改
|
* @param checkReason
|
*/
|
@Transactional
|
public void addCheckReason(CheckReason checkReason){
|
if(checkReason.getId() == null){
|
//增加操作
|
checkReasonMapper.insert(checkReason);
|
}else{
|
//修改操作
|
checkReasonMapper.update(checkReason);
|
}
|
|
}
|
|
/**
|
* 修改
|
* @param checkReason
|
*/
|
public void update(CheckReason checkReason){
|
checkReasonMapper.update(checkReason);
|
}
|
|
/**
|
* 删除
|
* @param id
|
*/
|
public void delete(Serializable id){
|
checkReasonMapper.deletelogic(id);
|
}
|
|
@Override
|
public List<HashMap<String, Object>> querySteelReasons() {
|
return checkReasonMapper.querySteelReasons();
|
}
|
|
@Override
|
public List<CheckReason> queryPipeReasons() {
|
return checkReasonMapper.queryPipeReasons();
|
}
|
}
|