zhaowenxuan
昨天 dedacd79c93f8ef95e0cb986f5e7fbd27ddbd907
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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);
    }
}