package com.ltkj.hosp.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.ltkj.common.utils.DateUtils;
|
import com.ltkj.hosp.domain.TjContract;
|
import com.ltkj.hosp.mapper.TjContractMapper;
|
import com.ltkj.hosp.service.ITjContractService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* 合同Service业务层处理
|
*
|
* @author ltkj_赵佳豪&李格
|
* @date 2023-02-17
|
*/
|
@Service
|
public class TjContractServiceImpl extends ServiceImpl<TjContractMapper, TjContract> implements ITjContractService {
|
@Autowired
|
private TjContractMapper tjContractMapper;
|
|
/**
|
* 查询合同
|
*
|
* @param id 合同主键
|
* @return 合同
|
*/
|
@Override
|
public TjContract selectTjContractById(Long id) {
|
return tjContractMapper.selectTjContractById(id);
|
}
|
|
/**
|
* 查询合同列表
|
*
|
* @param tjContract 合同
|
* @return 合同
|
*/
|
@Override
|
public List<TjContract> selectTjContractList(TjContract tjContract) {
|
return tjContractMapper.selectTjContractList(tjContract);
|
}
|
|
/**
|
* 新增合同
|
*
|
* @param tjContract 合同
|
* @return 结果
|
*/
|
@Override
|
public int insertTjContract(TjContract tjContract) {
|
tjContract.setCreateTime(DateUtils.getNowDate());
|
return tjContractMapper.insertTjContract(tjContract);
|
}
|
|
/**
|
* 修改合同
|
*
|
* @param tjContract 合同
|
* @return 结果
|
*/
|
@Override
|
public int updateTjContract(TjContract tjContract) {
|
tjContract.setUpdateTime(DateUtils.getNowDate());
|
return tjContractMapper.updateTjContract(tjContract);
|
}
|
|
/**
|
* 批量删除合同
|
*
|
* @param ids 需要删除的合同主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteTjContractByIds(Long[] ids) {
|
return tjContractMapper.deleteTjContractByIds(ids);
|
}
|
|
/**
|
* 删除合同信息
|
*
|
* @param id 合同主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteTjContractById(Long id) {
|
return tjContractMapper.deleteTjContractById(id);
|
}
|
}
|