package com.thhy.mobile.modules.biz.steelcheckrecord.service.impl;
|
|
import com.thhy.mobile.modules.biz.steelcheckrecord.entity.SteelCheckRecord;
|
import com.thhy.mobile.modules.biz.steelcheckrecord.mapper.SteelCheckRecordMapper;
|
import com.thhy.mobile.modules.biz.steelcheckrecord.service.SteelCheckRecordService;
|
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.Date;
|
import java.util.List;
|
|
/**
|
* 服务实现类
|
* @author zhang_xiao_bo
|
* @since 2023-05-06 10:49:33
|
*/
|
@Service
|
public class SteelCheckRecordServiceImpl implements SteelCheckRecordService {
|
|
|
|
@Autowired
|
private SteelCheckRecordMapper steelCheckRecordMapper;
|
|
public SteelCheckRecord get(Serializable id){
|
return steelCheckRecordMapper.queryById(id);
|
}
|
|
public List<SteelCheckRecord> findList(SteelCheckRecord steelCheckRecord){
|
return steelCheckRecordMapper.findList(steelCheckRecord);
|
}
|
|
/**
|
* 增加和修改
|
* @param steelCheckRecord
|
*/
|
@Transactional
|
public void addSteelCheckRecord(SteelCheckRecord steelCheckRecord){
|
if(steelCheckRecord.getCheckId() == null){
|
//增加操作
|
steelCheckRecordMapper.insert(steelCheckRecord);
|
}else{
|
//修改操作
|
steelCheckRecordMapper.update(steelCheckRecord);
|
}
|
|
}
|
|
/**
|
* 修改
|
* @param steelCheckRecord
|
*/
|
public void update(SteelCheckRecord steelCheckRecord){
|
steelCheckRecordMapper.update(steelCheckRecord);
|
}
|
|
/**
|
* 删除
|
* @param checkId
|
*/
|
public void delete(Serializable checkId){
|
steelCheckRecordMapper.deletelogic(checkId);
|
}
|
}
|